-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
If mountPath is missing, prefix with root dir. #55665
Conversation
/lgtm |
/approve no-issue |
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.
Need to remove all the apiserver validation, too.
And update API docs (comments)
And regenerate all the crap
@@ -111,6 +111,23 @@ func (kl *Kubelet) makeDevices(pod *v1.Pod, container *v1.Container) ([]kubecont | |||
return devices, nil | |||
} | |||
|
|||
func makeAbsolutePath(goos, path string) string { |
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.
Should this just be in kubelet_windows.go and kubelet_linux.go files?
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 like it here better, since that way it will run in the unit tests on either platform.
??? Only part of it will run in unit tests on either patform. There should
be no difference in LOCs-executed, just in where the code lives and whether
it is compiled in or not?
…On Tue, Nov 14, 2017 at 5:27 PM, Brendan Burns ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pkg/kubelet/kubelet_pods.go
<#55665 (comment)>
:
> @@ -111,6 +111,23 @@ func (kl *Kubelet) makeDevices(pod *v1.Pod, container *v1.Container) ([]kubecont
return devices, nil
}
+func makeAbsolutePath(goos, path string) string {
I like it here better, since that way it will run in the unit tests on
either platform.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#55665 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFVgVGJfEXgwAk8C5c3bhnJvSYW-T74wks5s2j35gaJpZM4Qc00v>
.
|
No, if you notice, the absolute path function takes the |
If we keep the validation, it fires most of the time, but sometimes wrongly.
I think it's simpler just to remove it. @saad-ali - do you disagree?
…On Tue, Nov 14, 2017 at 8:22 PM, Brendan Burns ***@***.***> wrote:
Also, can I get a decision between @thockin <https://github.com/thockin>
and @saad-ali <https://github.com/saad-ali> about whether or not to rip
out the validation?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#55665 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFVgVKZyFalIPrYAWKWl6Lb28EPy7yLyks5s2mcggaJpZM4Qc00v>
.
|
fwiw, it never fires wrongly. it sometimes doesn't fire when it should... Again, don't feel strongly either way, just looking for consensus. |
Friendly ping on this. Given @thockin's desire to get this in for 1.9, I need a quick consensus... thanks |
I agree, let's pull it out. |
ok, will do. |
Validation removed, documentation updated, please take another look... I tried to regenerate things, but none of the scripts I ran seemed to actually make any changes. I guess I'll see if automated unit tests pass, and fix any problems that might occur... |
/retest |
Unit test needs to be updated for removal of validation:
Otherwise LGTM |
@saad-ali test fixed (that's what I get for not re-running tests after a rebase sigh) ptal, thanks! |
LGTM 👍 |
/lgtm |
/lgtm |
/approve no-issue |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: andyzhangx, brendandburns, saad-ali No associated issue. Update pull-request body to add a reference to an issue, or get approval with The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 55908, 55829, 55293, 55653, 55665). If you want to cherry-pick this change to another branch, please follow the instructions here. |
@brendanburns so will this PR cherry-pick to v1.8? I can help do that. |
If
mountPath
is not absolute, add the os-specific root directory as a prefix.Ref: #51240
https://groups.google.com/forum/#!topic/kubernetes-sig-storage/k_0Wr2kYkpU
@thockin @saad-ali @andyzhangx
Note to @thockin I left the validation in place, in seems like it is a net win, since it will give a decent
error message to most people, but the fall-back defaulting is there if it doesn't catch 'c:'
I'm happy to rip out the validation if that is preferable to everyone. Let me know.