Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating sysctls for 3.11 #10361

Merged
merged 1 commit into from
Aug 6, 2018
Merged

Conversation

kalexand-rh
Copy link
Contributor

@kalexand-rh kalexand-rh commented Jun 22, 2018

@kalexand-rh kalexand-rh added this to the Next Release milestone Jun 22, 2018
@kalexand-rh kalexand-rh self-assigned this Jun 22, 2018
@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 22, 2018
- name: net.ipv4.route.min_pmtu
value: "552"
- name: kernel.msgmax
value: "65536"
Copy link

@php-coder php-coder Jun 25, 2018

Choose a reason for hiding this comment

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

Why the sysctl values have been changed? I'm not against such a change but I'd like to ensure that there is no mistakes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@php-coder, that's what the K8 doc used:

  securityContext:
    sysctls:
    - name: kernel.shm_rmid_forced
      value: "0"
    - name: net.ipv4.route.min_pmtu
      value: "552"
    - name: kernel.msgmax
      value: "65536"

Choose a reason for hiding this comment

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

Ok; perhaps our example with kernel.msgmax=1 2 3 was wrong.

Copy link
Member

Choose a reason for hiding this comment

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

For {product-title} 3.3.1, the following sysctls are supported (whitelisted) in
the safe set:
Currently, {product-title} supports, or whitelists, the following sysctls
in the safe set:

- *_kernel.shm_rmid_forced_*
- *_net.ipv4.ip_local_port_range_*
Copy link
Member

Choose a reason for hiding this comment

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

net.ipv4.tcp_syncookies is in the safe set as well

Copy link
Contributor Author

@kalexand-rh kalexand-rh Jun 26, 2018

Choose a reason for hiding this comment

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

@ingvagabund, how long has net.ipv4.tcp_syncookies been in the safe set? (I can open up a separate PR to fix older versions, if applicable.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here's a PR to make that change in older versions: #11232

@kalexand-rh kalexand-rh added the peer-review-needed Signifies that the peer review team needs to review this PR label Jul 31, 2018
@kalexand-rh
Copy link
Contributor Author

@stuartchuan, will you PTAL?

@openshift/team-documentation PTAL 🌠

With the warning above in mind, the cluster administrator can allow certain
unsafe sysctls for very special situations, e.g., high-performance or real-time
With the previous warning in mind, the cluster administrator can allow certain
unsafe sysctls for very special situations such as high-performance or real-time
Copy link
Contributor

Choose a reason for hiding this comment

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

@kalexand-rh Should this be more explicit to point to the previous warning?

Enabling unsafe sysctls

The use of unsafe sysctls is at-your-own-risk. See the xref:linktext[previous warning].

The cluster administrator can allow...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right that it could be clearer, but I don't want to add an xref that I'll have to remove next month. I might move that paragraph into the previous section - if these were modules, that detail would belong in the concept instead of the task.

Copy link
Contributor

Choose a reason for hiding this comment

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

@kalexand-rh I would think you want the warning in both the concept and the task. But, that is a debate for later...


Sysctls are set on pods using annotations. They apply to all containers in the
same pod.
Sysctls are set on pods using the pod's securityContext. The securityContext
Copy link
Contributor

Choose a reason for hiding this comment

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

Other references to securityContext take markup, securityContext or *securityContext*

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's a parameter, so securityContext is correct.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree!

@@ -135,31 +136,49 @@ ifdef::openshift-origin[]
endif::[]

[[setting-sysctls-for-a-pod]]
== Setting Sysctls for a Pod
== Setting sysctls for a pod
Copy link
Contributor

Choose a reason for hiding this comment

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

@kalexand-rh This heading appears to be formatted incorrectly on the View page here. But, I think it is OK; the formatting looks off in all points in the repo history since the ifdefs were added right before the heading.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting. It looks ok in a local build, too. Thanks for checking it.

...
----

[NOTE]
====
A pod with the unsafe sysctls specified above will fail to launch on any node
that has not enabled those two unsafe sysctls explicitly. As with node-level
that has not explicitly enabled those two unsafe sysctls. As with node-level
Copy link
Contributor

Choose a reason for hiding this comment

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

s/that has not explicitly enabled//that the admin has not explicitly enabled/which were not explicitly enabled/ ??
Currently, it sounds like the node enables the sysctls itself.

@mburke5678
Copy link
Contributor

@kalexand-rh A few comments. Otherwise LGTM

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 31, 2018
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 31, 2018
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 31, 2018
@openshift-docs-preview-bot

The preview will be availble shortly at:

@kalexand-rh kalexand-rh added peer-review-done Signifies that the peer review team has reviewed this PR and removed peer-review-needed Signifies that the peer review team needs to review this PR labels Jul 31, 2018
@kalexand-rh
Copy link
Contributor Author

@mdshuai PTAL

@ghost
Copy link

ghost commented Aug 6, 2018

Checked and LGTM

@kalexand-rh
Copy link
Contributor Author

Thank you @wjiangjay!

@kalexand-rh kalexand-rh merged commit a8a0ad8 into openshift:master Aug 6, 2018
@kalexand-rh
Copy link
Contributor Author

/cherrypick enterprise-3.11

@kalexand-rh kalexand-rh deleted the issue10225 branch August 6, 2018 12:31
@openshift-cherrypick-robot

@kalexand-rh: new pull request created: #11384

In response to this:

/cherrypick enterprise-3.11

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch/enterprise-3.11 peer-review-done Signifies that the peer review team has reviewed this PR size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants