-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Attempt 2: Bump GCE containerVM to container-v1-3-v20160517 (Docker 1.11.1) again. #26001
Conversation
err = ioutil.WriteFile(path, []byte(fmt.Sprintf("%d", uint32(1000000))), 0644) | ||
if err != nil { | ||
return fmt.Errorf("failed to update %s: %v", path, err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we would rebuild the image... should we do this in the salt configuration as a temporary measure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just don't want to cut another image release since it is time sink at validation stage. We shouldn't put this to image once we finished the validation. I am ok to go with salt, but thought there is no difference since it is a temporary solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc/ @mikedanese for salt configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The difference is we can limit the change in salt to the container VM GCE setup, but here it goes out to everyone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this one is goes to everyone. The number I chose (1000000) is actually the default one for other os distro including CoreOS, GCI, etc. If you want, I can read the number and reconfig it if the configured number < the default one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikedanese is ok with updating this through salt. I will re-do this then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave up on salt. Here is the block change I made,
{% if grains.cloud is defined
and grains.cloud == 'gce' %}
/proc/sys/kernel/keys/root_maxkeys:
file.managed:
- content: |
- '200000'
- replace: True
- show_diff: True
{% endif %}
But salt think the file has right content, and refuse to update:
[INFO ] Running state [/proc/sys/kernel/keys/root_maxkeys] at time 00:27:59.681909
[INFO ] Executing state file.managed for /proc/sys/kernel/keys/root_maxkeys
[INFO ] File /proc/sys/kernel/keys/root_maxkeys is in the correct state
[INFO ] Completed state [/proc/sys/kernel/keys/root_maxkeys] at time 00:27:59.684949
ID: /proc/sys/kernel/keys/root_maxkeys
Comment: File /proc/sys/kernel/keys/root_maxkeys is in the correct state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh well... let's just try to remember to remove this once the fix gets in the image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have set sysctl's before and we have always done it in code. Why wouldn't you want this in all clouds? I prefer this approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1. We need to change this logic to be run only when needed.
Addressed the comments, PTAL? |
if err != nil { | ||
return fmt.Errorf("failed to update %s: %v", maxkey_path, err) | ||
} | ||
const maxbyte_path = "/proc/sys/kernel/keys/root_maxbytes" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: no underscore in go constants
LGTM |
This PR is fine. But I'd rather see this logic reside in |
LGTM |
@k8s-bot test this issue: #IGNORE |
@timstclair Like what we discussed offline, we changed the PR to log the warning instead of crashing kubelet since we run our builds as docker container. Also add the logic only updates the file when the value is smaller than the default one. PTAL. Thanks! |
const minKeys uint64 = 1000000 | ||
key, err := ioutil.ReadFile(maxkeysPath) | ||
if err != nil { | ||
glog.Warningf("Cannot read keys quota in %s", maxkeysPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log the error as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
A couple nits. |
Adding LGTM, but please add the |
We need to start our soaking tests against docker 1.11.1 for 1.3 as early as possible. Bump the priority to p1. |
are smaller than the default ones.
Rebased again! :-) |
@k8s-bot ok to test |
as buildcop: demoting to p2 because we have some p1 PRs to fix flaky tests and those should merge first. this should still merge before morning if SQ doesn't break horribly. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit a8ac041. |
Automatic merge from submit-queue |
@dchen1107, FYI, this PR doesn't change the container vm version. The commit probably got lost due to the previous revert/rebase. |
Oh no! |
Workaround the issue of small root_maxkeys on the debian based container-vm image, and bump our image to the new alpha version for docker 1.11.1 validation.
ref: #23397 #25893
cc/ @vishh @timstclair