Error running openshift/origin docker: Error runni

2019-06-02 07:57发布

问题:

When I run the openshift/origin docker image , I see this error in logs of the container ($ docker logs origin).

Error running 'chcon' to set the kubelet volume root directory SELinux context

Is this a known issue or can it be ignored or did I miss anything?

The commandline I used is as docker run -d --name "origin" -e "http_proxy=$http_proxy" -e "https_proxy=$https_proxy" -e "no_proxy=$no_proxy" --privileged --pid=host --net=host -v /:/rootfs:ro -v /var/run:/var/run:rw -v /sys:/sys openshift/origin start --cors-allowed-origins='.*'

Some information of my OS and environment: 3.12.28-4-default SUSE Linux Enterprise Server 12 (x86_64) VERSION = 12 PATCHLEVEL = 0 NAME="SLES" VERSION="12" VERSION_ID="12" PRETTY_NAME="SUSE Linux Enterprise Server 12" ID="sles"

回答1:

That error can be ignored unless you are trying to run with SELinux enabled. The container is trying to set the label on the volumes directory to ensure that labels are properly inherited.