Skip to content

Provide a writable location for flexvolume plugins#315

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
gnufied:change-kubelet-config
Jan 19, 2019
Merged

Provide a writable location for flexvolume plugins#315
openshift-merge-robot merged 1 commit into
openshift:masterfrom
gnufied:change-kubelet-config

Conversation

@gnufied

@gnufied gnufied commented Jan 15, 2019

Copy link
Copy Markdown
Member

Fixes https://jira.coreos.com/browse/STOR-157

This parameter can not be configured via KubeletConfiguration because of kubernetes/kubernetes#72937

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 15, 2019
@gnufied

gnufied commented Jan 15, 2019

Copy link
Copy Markdown
Member Author

corresponding change will also be needed to controller-manager fwiw.

@ashcrow

ashcrow commented Jan 16, 2019

Copy link
Copy Markdown
Member

/retest

@cgwalters

Copy link
Copy Markdown
Member

Every config change needs to be (rather tediously) reflected in pkg/controller/template/test_data/ too. When I working on adding a new unit in #273
I ended up doing: for x in openstack none aws; do cp --reflink=auto pkg/controller/template/test_data/templates/{libvirt,$x}/master/units/rhcos-initial-pivot.service; done
although your case is a bit different.

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.

Comment thread templates/master/01-master-kubelet/_base/units/kubelet.yaml Outdated
@gnufied

gnufied commented Jan 16, 2019

Copy link
Copy Markdown
Member Author

@cgwalters yep. I am going to push that stuff. I had that updated yesterday night, I forgot to push.

@ashcrow

ashcrow commented Jan 16, 2019

Copy link
Copy Markdown
Member

Unit tests look like they need updating. The end results no longer look like what was expected.

@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 17, 2019

@kikisdeliveryservice kikisdeliveryservice left a comment

Copy link
Copy Markdown
Contributor

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!

Comment thread pkg/controller/template/test_data/README.md Outdated
Comment thread pkg/controller/template/test_data/README.md Outdated
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 18, 2019
@gnufied
gnufied force-pushed the change-kubelet-config branch from ea00c90 to 635cb79 Compare January 18, 2019 01:00
@gnufied

gnufied commented Jan 18, 2019

Copy link
Copy Markdown
Member Author

/test e2e-aws

@gnufied

gnufied commented Jan 18, 2019

Copy link
Copy Markdown
Member Author

@cgwalters @ashcrow can you PTAL

Comment thread pkg/daemon/daemon.go Outdated
Comment thread pkg/daemon/update.go Outdated

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member

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).

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Related: #125

@cgwalters

Copy link
Copy Markdown
Member

Before we proceed farther - does this change have a 4.0 freeze exception?

@ashcrow

ashcrow commented Jan 18, 2019

Copy link
Copy Markdown
Member

@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?

@ashcrow

ashcrow commented Jan 18, 2019

Copy link
Copy Markdown
Member

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 18, 2019
@gnufied

gnufied commented Jan 18, 2019

Copy link
Copy Markdown
Member Author

@ashcrow @cgwalters this is a bug fix, not a new feature. Does it require 4.0 freeze exception? Adding @childsb @knobunc @tsmetana

@childsb

childsb commented Jan 18, 2019

Copy link
Copy Markdown

@gnufied bugfixes shouldn't require an exception, but you should open a bugzilla to help support that its a bug.

@gnufied

gnufied commented Jan 18, 2019

Copy link
Copy Markdown
Member Author

There is already a JIRA issue linked with the PR. How many issues must a man open to fix a bug? :D

@ashcrow

ashcrow commented Jan 18, 2019

Copy link
Copy Markdown
Member

OK, if this is indeed a bugfix it doesn't need an exception.

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 18, 2019
Comment thread pkg/daemon/daemon.go Outdated

@ashcrow ashcrow left a comment

Copy link
Copy Markdown
Member

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
@gnufied
gnufied force-pushed the change-kubelet-config branch from 635cb79 to c94174c Compare January 18, 2019 20:53
@ashcrow

ashcrow commented Jan 18, 2019

Copy link
Copy Markdown
Member

Terraform/AWS flake

/test e2e-aws-op

@ashcrow ashcrow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is much clearer 👍

@cgwalters

Copy link
Copy Markdown
Member

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 18, 2019
@kikisdeliveryservice

Copy link
Copy Markdown
Contributor

I'm going to pull this to verify. :)

@cgwalters

Copy link
Copy Markdown
Member

/assign kikisdeliveryservice

Will let her do the final lgtm.

@kikisdeliveryservice kikisdeliveryservice left a comment

Copy link
Copy Markdown
Contributor

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

@kikisdeliveryservice

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 19, 2019
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

[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

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

@kikisdeliveryservice

Copy link
Copy Markdown
Contributor

/test e2e-aws

@openshift-merge-robot
openshift-merge-robot merged commit 5b93504 into openshift:master Jan 19, 2019
ptalgulk01 pushed a commit to ptalgulk01/machine-config-operator that referenced this pull request May 15, 2026
Provide a writable location for flexvolume plugins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants