diff --git a/cmd/cdi-cloner/clone-source.go b/cmd/cdi-cloner/clone-source.go index a61bdd6ec6..1ff75a56a5 100644 --- a/cmd/cdi-cloner/clone-source.go +++ b/cmd/cdi-cloner/clone-source.go @@ -150,7 +150,7 @@ func newTarReader(preallocation bool) (io.ReadCloser, error) { "lost+found": struct{}{}, } - args := []string{"cv"} + args := []string{"/usr/bin/tar", "cv"} if !preallocation { // -S is used to handle sparse files. It can only be used when preallocation is not requested args = append(args, "-S") @@ -175,7 +175,9 @@ func newTarReader(preallocation bool) (io.ReadCloser, error) { args = append(args, "--files-from", "/dev/null") } - cmd := exec.Command("/usr/bin/tar", args...) + klog.Infof("Executing %+v", args) + + cmd := exec.Command(args[0], args[1:]...) cmd.Dir = mountPoint stdout, err := cmd.StdoutPipe() diff --git a/tests/framework/framework.go b/tests/framework/framework.go index aa5d3516a8..2d1499b243 100644 --- a/tests/framework/framework.go +++ b/tests/framework/framework.go @@ -223,6 +223,9 @@ func (f *Framework) CreateNamespace(prefix string, labels map[string]string) (*v } // pod-security.kubernetes.io/: labels["pod-security.kubernetes.io/enforce"] = "restricted" + if utils.IsOpenshift(f.K8sClient) { + labels["security.openshift.io/scc.podSecurityLabelSync"] = "false" + } ns := &v1.Namespace{ ObjectMeta: metav1.ObjectMeta{