Commit 63712cbb authored by Wlodzimierz Borkowski's avatar Wlodzimierz Borkowski

invalid arg during applying SELinux label

Tested with ubuntu 16.04 with selinux support. Actually after chcon with long label got: Invalid argument from cmd
parent b8d00085
...@@ -305,7 +305,7 @@ function start_kubelet { ...@@ -305,7 +305,7 @@ function start_kubelet {
which chcon > /dev/null ; then which chcon > /dev/null ; then
if [[ ! $(ls -Zd /var/lib/kubelet) =~ system_u:object_r:svirt_sandbox_file_t:s0 ]] ; then if [[ ! $(ls -Zd /var/lib/kubelet) =~ system_u:object_r:svirt_sandbox_file_t:s0 ]] ; then
echo "Applying SELinux label to /var/lib/kubelet directory." echo "Applying SELinux label to /var/lib/kubelet directory."
if ! chcon -R system_u:object_r:svirt_sandbox_file_t:s0 /var/lib/kubelet; then if ! sudo chcon -Rt svirt_sandbox_file_t /var/lib/kubelet; then
echo "Failed to apply selinux label to /var/lib/kubelet." echo "Failed to apply selinux label to /var/lib/kubelet."
fi fi
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment