-
Notifications
You must be signed in to change notification settings - Fork 413
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
Provide a writable location for flexvolume plugins #315
Provide a writable location for flexvolume plugins #315
Conversation
corresponding change will also be needed to controller-manager fwiw. |
/retest |
Every config change needs to be (rather tediously) reflected in It is tempting though to change the unit tests to only verify e.g. a few cases rather than duplicating all the data again 8 times. |
@cgwalters yep. I am going to push that stuff. I had that updated yesterday night, I forgot to push. |
Unit tests look like they need updating. The end results no longer look like what was expected. |
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.
Just a small typo fix. Thanks so much for adding this documentation!
ea00c90
to
635cb79
Compare
/test e2e-aws |
@cgwalters @ashcrow can you PTAL |
pkg/daemon/update.go
Outdated
@@ -84,6 +84,11 @@ func (dn *Daemon) update(oldConfig, newConfig *mcfgv1.MachineConfig) error { | |||
return fmt.Errorf("%s", msg) | |||
} | |||
|
|||
// Create direcotry path for flexvolume plugin | |||
if err = dn.fileSystemClient.MkdirAll(pathFlexVolumePlugin, DefaultDirectoryPermissions); err != nil { |
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 don't think we want this as Go code; it should just be an Ignition config like any others. Specifically an entry in directories
; see the Ignition spec.
IOW you'd want this to be a file in templates
like how we have the kubelet.yaml
there.
However - looking at render.go
, we'd need to extend it with e.g. directories
.
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.
okay, do you want me do that as part of this PR? I am kinda new to this code base, I am still trying to grok how Ignition spec works.
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.
No worries @gnufied!
If the Ignition config comes through the install process Ignition will do exactly what is needed (creating the directories, dropping the file, etc..).
If it comes down through MCD then MCD itself has a subset of Ignition implementation to create files/dirs/etc.. I think this would make more sense within this area and/or here.
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.
Is the goal here to just create the dir (that is always the same dir location) and never do anything else with it in the MCD?
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.
For clarity, templates is fine. If you need to do some kind of operations then the areas I pointed out would be where to add logic.
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.
Goal is just to create the directory. We don't need to do anything else in MCD.
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 agree with @cgwalters that templates makes more sense.
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.
Based on coreos/ignition#706 you could probably "cheat" and make a .dummy
file there or so (assuming kubelet won't try to load a .dummy
or whatever file as a plugin).
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.
Yeah I think that would work. Kubelet seems to skip loading files that begin with .
as plugins.
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.
Related: #125
Before we proceed farther - does this change have a 4.0 freeze exception? |
@cgwalters I did not see it upon quick scan of the list. @gnufied can you confirm that this does or does not have the exception approval? |
/hold |
@ashcrow @cgwalters this is a bug fix, not a new feature. Does it require 4.0 freeze exception? Adding @childsb @knobunc @tsmetana |
@gnufied bugfixes shouldn't require an exception, but you should open a bugzilla to help support that its a bug. |
There is already a JIRA issue linked with the PR. How many issues must a man open to fix a bug? :D |
OK, if this is indeed a bugfix it doesn't need an exception. /hold cancel |
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.
A couple of requests added in comments ... but I'm following the logic now 😄
Fix tests and add a note about how to update testdata
635cb79
to
c94174c
Compare
/test e2e-aws-op |
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.
This is much clearer 👍
/approve |
I'm going to pull this to verify. :) |
/assign kikisdeliveryservice Will let her do the final lgtm. |
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.
Testing results:
Applied updated MCC to cluster and saw new configs for both master and worker were generated and contained:
ExecStart=/usr/bin/hyperkube \
kubelet \
...
--volume-plugin-dir=/etc/kubernetes/kubelet-plugins/volume/exec \
Manually verify dir created by sshing into master and worker:
[core@... ~]$ cd /etc/kubernetes/kubelet-plugins/volume/exec
[core@... exec]$ ls
[core@... exec]$
Finally check for the hidden dummy file:
[core@... exec]$ ls -a
. .. .dummy
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, gnufied, kikisdeliveryservice The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test e2e-aws |
Fixes https://jira.coreos.com/browse/STOR-157
This parameter can not be configured via
KubeletConfiguration
because of kubernetes/kubernetes#72937