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

Skip to content

Conversation

@dougsland
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

So crio callers can pick their PID namespace approach. This seems
like something that folks might want to configure per-pod, or possibly
even per-container, but for now follow --enable-shared-pid-namespace
and make it per-crio-daemon.

The "Deprecated:" paragraph approach in Go comments is recommended in
1.

I tried to find a more compact form for the REDIS_IN_INFRA test, but:

  • =~ is not in POSIX 2, so we need to use Bash's internal [[.
  • '[ ! {expression} ]' is in POSIX 2, but Bash's [[ seems to look
    for ! before doing variable expansion.

Because of those, we can't use POSIX's ${parameter:+word} 3:

NOT="!"
[[ ${REDIS_IN_INFRA:+${NOT}} "$output" =~ "redis" ]]

and the best alternative I can find is the if/else that I've gone with
in this commit.

The ADDITIONAL_CRIO_OPTIONS approach is easier to maintain than the
old approach with settings for every option, because we no longer need
to maintain defaults in two locations (lib/config.go and
test/helpers.bash). For this commit, I've only dropped
ENABLE_SHARED_PID_NAMESPACE, but we may want to extend this approach
to more variables in the future.

PIDNamespaceType follows the ImageVolumes pattern at Mrunal's
recommendation 4.

Based on: #1280

Signed-off-by: W. Trevor King [email protected]
Signed-off-by: Douglas Schilling Landgraf [email protected]

So crio callers can pick their PID namespace approach.  This seems
like something that folks might want to configure per-pod, or possibly
even per-container, but for now follow --enable-shared-pid-namespace
and make it per-crio-daemon.

The "Deprecated:" paragraph approach in Go comments is recommended in
[1].

I tried to find a more compact form for the REDIS_IN_INFRA test, but:

* =~ is not in POSIX [2], so we need to use Bash's internal [[.
* '[ ! {expression} ]' is in POSIX [2], but Bash's [[ seems to look
  for ! before doing variable expansion.

Because of those, we can't use POSIX's ${parameter:+word} [3]:

  NOT="!"
  [[ ${REDIS_IN_INFRA:+${NOT}} "$output" =~ "redis" ]]

and the best alternative I can find is the if/else that I've gone with
in this commit.

The ADDITIONAL_CRIO_OPTIONS approach is easier to maintain than the
old approach with settings for every option, because we no longer need
to maintain defaults in two locations (lib/config.go and
test/helpers.bash).  For this commit, I've only dropped
ENABLE_SHARED_PID_NAMESPACE, but we may want to extend this approach
to more variables in the future.

PIDNamespaceType follows the ImageVolumes pattern at Mrunal's
recommendation [4].

[1]: https://blog.golang.org/godoc-documenting-go-code
[2]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
[3]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
[4]: #1280 (comment)

Based on: #1280

Signed-off-by: W. Trevor King <[email protected]>
Signed-off-by: Douglas Schilling Landgraf <[email protected]>
@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/feature Categorizes issue or PR as related to a new feature. labels Apr 16, 2020
@openshift-ci-robot
Copy link

@dougsland: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

1 similar comment
@openshift-ci-robot
Copy link

@dougsland: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 16, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dougsland
To complete the pull request process, please assign giuseppe
You can assign the PR to them by writing /assign @giuseppe in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link

@dougsland: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/openshift-jenkins/critest_rhel d4b2b15 link /test critest_rhel
ci/openshift-jenkins/e2e_rhel d4b2b15 link /test e2e_rhel
ci/openshift-jenkins/integration_crun d4b2b15 link /test integration_crun
ci/openshift-jenkins/e2e_crun d4b2b15 link /test e2e_crun
ci/openshift-jenkins/integration_rhel d4b2b15 link /test integration_rhel
ci/openshift-jenkins/e2e_features_rhel d4b2b15 link /test e2e_features_rhel
ci/openshift-jenkins/e2e_fedora d4b2b15 link /test e2e_fedora
ci/openshift-jenkins/e2e_crun_cgroupv2 d4b2b15 link /test e2e_cgroupv2
ci/openshift-jenkins/e2e_features_fedora d4b2b15 link /test e2e_features_fedora
ci/openshift-jenkins/integration_fedora d4b2b15 link /test integration_fedora
ci/openshift-jenkins/critest_fedora d4b2b15 link /test critest_fedora
ci/openshift-jenkins/integration_crun_cgroupv2 d4b2b15 link /test integration_cgroupv2
ci/kata-jenkins d4b2b15 link /test kata-containers

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@mrunalp
Copy link
Member

mrunalp commented Apr 17, 2020

This isn't really needed since k8s added support for sharing pid namespaces at the pod level.

@dougsland
Copy link
Contributor Author

This isn't really needed since k8s added support for sharing pid namespaces at the pod level.

Sure @mrunalp. Thanks!

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

Labels

dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants