Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@umohnani8
Copy link
Member

If the pid namespace mode is set to POD, then the container's namespace
should be set to the namespace of the pod infra container.

To test this, make sure to add FEATURE_GATES="${FEATURE_GATES},PodShareProcessNamespace=true" to hack/local-cluster-up.sh - this enable the feature.

Signed-off-by: umohnani8 [email protected]

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes labels Feb 28, 2018
@wking
Copy link
Contributor

wking commented Feb 28, 2018

I think the CRI-O side of this needs to be a bit more nuanced than “ignore EnableSharedPIDNamespace if the kublet asks us to”. Can we deprecate EnableSharedPIDNamespace? What purpose does it serve now that CRI covers that idea?

#1280 is also in flight in this space, although it needs a rebase. I'm fine with this PR going in first and don't expect significant conflicts; just something to be aware of.

@mrunalp
Copy link
Member

mrunalp commented Mar 1, 2018

I think that we can get rid of the flag as kube has a similar flag to enable/disable the feature.

@umohnani8
Copy link
Member Author

Removed the EnableSharedPIDNamespace flag.
@mrunalp should I get rid of the namespace tests as the flag has been removed? Not sure how to test my changes as the pid namespace mode will be coming from kube.

@mrunalp
Copy link
Member

mrunalp commented Mar 1, 2018

@umohnani8 Yes, we should remove the existing tests that use that flag and add another integration test that sets pid namespace sharing to pod in the sandbox config. Take a look at my PR to update k8s that we merged. It has some similar changes to network namespace handling in the integration tests.

vendor.conf Outdated
@@ -1,11 +1,11 @@
k8s.io/kubernetes 7488d1c9210e60aef9ad49f07cb5d8a24152db88 https://github.com/kubernetes/kubernetes
k8s.io/kubernetes fe0e80e8dafcdfde9778380f40346bfa75bad0f7 https://github.com/kubernetes/kubernetes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let us switch to the latest version in release-1.0 branch and also change to the same in the e2e tests https://github.com/kubernetes-incubator/cri-o/blob/master/contrib/test/integration/main.yml#L121

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated vendor and yaml to use the release 1.10 branch.
Added integration test.

@umohnani8
Copy link
Member Author

Added test and update the main.yaml file.
Vendoring from last commit of release-1.10.

@mrunalp
Copy link
Member

mrunalp commented Mar 2, 2018

/test all

vars:
force_clone: True
k8s_git_version: "master"
k8s_git_version: "release-1.10"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we intend to track k8s' master in our master branch?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wking We will track release-1.10 in master till we make a branch for it next week. At that point we can switch back to master.

if ctx.GlobalIsSet("pids-limit") {
config.PidsLimit = ctx.GlobalInt64("pids-limit")
}
if ctx.GlobalIsSet("enable-shared-pid-namespace") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The man pages need updating too (e.g. here).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the man page. Thanks for catching that!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other man page too ;).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Removed it from helpers.bash as well. I think I got all of them now :)

@rhatdan
Copy link
Contributor

rhatdan commented Mar 2, 2018

Since we have tests passing, should we merge now and get the man page fixes in a different PR?

These changes allow for the container's pid namespace to be set to the same
as the pod infra container's namespace if the pid namespace mode is set to POD

Signed-off-by: umohnani8 <[email protected]>
@umohnani8
Copy link
Member Author

@runcom should we run tests on this?

@rhatdan
Copy link
Contributor

rhatdan commented Mar 2, 2018

/test all

If the pid namespace mode is set to POD, then the container's namespace
should be set to the namespace of the pod infra container.

Signed-off-by: umohnani8 <[email protected]>
@mrunalp
Copy link
Member

mrunalp commented Mar 2, 2018

restarted travis

@mrunalp
Copy link
Member

mrunalp commented Mar 2, 2018

/test all

Copy link
Member

@mrunalp mrunalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants