mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Explicitly enable docker shared-pid for e2e_node
This also renames isSharedPIDNamespaceEnabled() to isSharedPIDNamespaceSupported() to be more accurate.
This commit is contained in:
parent
145c343273
commit
765374ce03
@ -40,11 +40,11 @@ var _ = framework.KubeDescribe("Docker features [Feature:Docker]", func() {
|
|||||||
It("processes in different containers of the same pod should be able to see each other", func() {
|
It("processes in different containers of the same pod should be able to see each other", func() {
|
||||||
// TODO(yguo0905): Change this test to run unless the runtime is
|
// TODO(yguo0905): Change this test to run unless the runtime is
|
||||||
// Docker and its version is <1.13.
|
// Docker and its version is <1.13.
|
||||||
By("Check whether shared PID namespace is enabled.")
|
By("Check whether shared PID namespace is supported.")
|
||||||
isEnabled, err := isSharedPIDNamespaceEnabled()
|
isEnabled, err := isSharedPIDNamespaceSupported()
|
||||||
framework.ExpectNoError(err)
|
framework.ExpectNoError(err)
|
||||||
if !isEnabled {
|
if !isEnabled {
|
||||||
framework.Skipf("Skipped because shared PID namespace is not enabled.")
|
framework.Skipf("Skipped because shared PID namespace is not supported by this docker version.")
|
||||||
}
|
}
|
||||||
|
|
||||||
By("Create a pod with two containers.")
|
By("Create a pod with two containers.")
|
||||||
|
@ -43,9 +43,9 @@ func getDockerAPIVersion() (semver.Version, error) {
|
|||||||
return semver.MustParse(version.APIVersion + ".0"), nil
|
return semver.MustParse(version.APIVersion + ".0"), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// isSharedPIDNamespaceEnabled returns true if the Docker version is 1.13.1+
|
// isSharedPIDNamespaceSupported returns true if the Docker version is 1.13.1+
|
||||||
// (API version 1.26+), and false otherwise.
|
// (API version 1.26+), and false otherwise.
|
||||||
func isSharedPIDNamespaceEnabled() (bool, error) {
|
func isSharedPIDNamespaceSupported() (bool, error) {
|
||||||
version, err := getDockerAPIVersion()
|
version, err := getDockerAPIVersion()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
|
@ -155,6 +155,7 @@ func (e *E2EServices) startKubelet() (*server, error) {
|
|||||||
"--serialize-image-pulls", "false",
|
"--serialize-image-pulls", "false",
|
||||||
"--pod-manifest-path", manifestPath,
|
"--pod-manifest-path", manifestPath,
|
||||||
"--file-check-frequency", "10s", // Check file frequently so tests won't wait too long
|
"--file-check-frequency", "10s", // Check file frequently so tests won't wait too long
|
||||||
|
"--docker-disable-shared-pid=false",
|
||||||
// Assign a fixed CIDR to the node because there is no node controller.
|
// Assign a fixed CIDR to the node because there is no node controller.
|
||||||
//
|
//
|
||||||
// Note: this MUST be in sync with with the IP in
|
// Note: this MUST be in sync with with the IP in
|
||||||
|
Loading…
Reference in New Issue
Block a user