From 63712cbb1c3ec6c80dee9588dacee2717d8fff14 Mon Sep 17 00:00:00 2001 From: Wlodzimierz Borkowski Date: Tue, 5 Apr 2016 13:03:31 +0200 Subject: [PATCH] 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 --- hack/local-up-cluster.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 71735181e83..ca5bd9022d9 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -305,7 +305,7 @@ function start_kubelet { which chcon > /dev/null ; 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." - 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." fi fi