Skip to content

Run E2E tests in Jenkins with SELinux enforcing #3392

Closed

Description

@pmorie

We should change the Jenkins jobs to run the E2E tests with SELinux enforcing.

Probably, we eventually need to run with enforcing AND disabled.

Activity

  1. ncdc commented on Jun 23, 2015

    @ncdc
    Contributor

    test-end-to-end-docker.sh will likely fail when trying to push to the registry, at least on F21:

    type=AVC msg=audit(1435068227.489:8918): avc:  denied  { create } for  pid=14963 comm="dockerregistry" name="docker" scontext=system_u:system_r:svirt_lxc_net_t:s0:c0,c1 tcontext=system_u:object_r:docker_var_lib_t:s0:c0,c1 tclass=dir permissive=0
    

    I have these volumes for the registry container:

    "Volumes": {
            "/dev/termination-log": "/var/lib/openshift/openshift.local.volumes/pods/60543b6f-19ae-11e5-8e88-001c422dcd49/containers/registry/1a3c95746d79b68de7644f5cbe9ac264c91f68c9294d0f4cd4f8e70a2653c565",
            "/registry": "/var/lib/openshift/openshift.local.volumes/pods/60543b6f-19ae-11e5-8e88-001c422dcd49/volumes/kubernetes.io~empty-dir/registry-storage",
            "/var/run/secrets/kubernetes.io/serviceaccount": "/var/lib/openshift/openshift.local.volumes/pods/60543b6f-19ae-11e5-8e88-001c422dcd49/volumes/kubernetes.io~secret/default-token-erllc"
        },

    Here's the label for the /registry volume:

    sudo ls -lZd /var/lib/openshift/openshift.local.volumes/pods/60543b6f-19ae-11e5-8e88-001c422dcd49/volumes/kubernetes.io~empty-dir/registry-storage
    drwxrwxrwx. root root system_u:object_r:docker_var_lib_t:s0:c0,c1 /var/lib/openshift/openshift.local.volumes/pods/60543b6f-19ae-11e5-8e88-001c422dcd49/volumes/kubernetes.io~empty-dir/registry-storage
    

    And if you run restorecon -R on /var/lib/openshift, you end up with tcontext=system_u:object_r:openshift_var_lib_t:s0:c0,c1 (which is also denied).

  2. ncdc commented on Jun 23, 2015

    @ncdc
    Contributor

    I will have a PR to fix ^^^ shortly

  3. assigned and unassigned on Sep 4, 2015
  4. danmcp commented on Sep 7, 2016

    @danmcp

    We have for quite some time now.

  5. stevekuznetsov commented on Sep 7, 2016

    @stevekuznetsov
    Contributor

    @danmcp I think we still set it to permissive add part of the vagrant-openshift provisioning

  6. reopened this on Sep 7, 2016
  7. danmcp commented on Sep 7, 2016

    @danmcp

    @stevekuznetsov You are correct. I was under the impression that was only for fedora. But it appears to be the opposite.

  8. stevekuznetsov commented on Apr 8, 2017

    @stevekuznetsov
    Contributor

    We've got SELinux on now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions