Fix following node e2e issue on selinux enabled systems:

[Fail] [k8s.io] Container Runtime Conformance Test container runtime conformance blackbox test when starting a container that exits [It] should report termination message if TerminationMessagePath is set [Conformance]
/root/upstream-code/gocode/src/k8s.io/kubernetes/test/e2e_node/runtime_conformance_test.go:150
This commit is contained in:
Avesh Agarwal 2016-06-24 19:34:13 -04:00 committed by Avesh Agarwal
parent ba85ce449a
commit bf4d9b6686

View File

@ -131,6 +131,7 @@ while true; do sleep 1; done
name := "termination-message-container"
terminationMessage := "DONE"
terminationMessagePath := "/dev/termination-log"
priv := true
c := ConformanceContainer{
Framework: f,
Container: api.Container{
@ -139,6 +140,9 @@ while true; do sleep 1; done
Command: []string{"/bin/sh", "-c"},
Args: []string{fmt.Sprintf("/bin/echo -n %s > %s", terminationMessage, terminationMessagePath)},
TerminationMessagePath: terminationMessagePath,
SecurityContext: &api.SecurityContext{
Privileged: &priv,
},
},
RestartPolicy: api.RestartPolicyNever,
}