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

[cinder-csi-plugin] Allow multiple config files #1476

Merged
merged 2 commits into from Jun 11, 2021

Conversation

mdbooth
Copy link
Contributor

@mdbooth mdbooth commented Apr 9, 2021

This change allows cinder-csi-plugin to be invoked with multiple config
files. These will be parsed sequentially in the order specified. Values
in later config files override values in earlier config files.

This makes 'layered' configurations simpler to manage. For example a
base configuration containing authentication information and a per-node
override configuration which applies only to a single node. Keeping
these in separate files simplifies the task of changing the base
configuration for all nodes.

What this PR does / why we need it:

Which issue this PR fixes(if applicable):
fixes #1481

Special notes for reviewers:

Release note:

[cinder-csi-plugin] The --cloud-config option may now be given multiple times. Multiple configuration files will be merged, with later configuration files taking precedence.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 9, 2021
@k8s-ci-robot
Copy link
Contributor

Welcome @mdbooth!

It looks like this is your first PR to kubernetes/cloud-provider-openstack 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/cloud-provider-openstack has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @mdbooth. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 9, 2021
@mdbooth
Copy link
Contributor Author

mdbooth commented Apr 9, 2021

/cc @Fedosin @mandre

@k8s-ci-robot
Copy link
Contributor

@mdbooth: GitHub didn't allow me to request PR reviews from the following users: mandre.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @Fedosin @mandre

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.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 9, 2021

Build failed.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 9, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 9, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 9, 2021

Build failed.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 9, 2021

Build failed.

@jichenjc
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 12, 2021
@jichenjc
Copy link
Contributor

@mdbooth can you help to open an issue and put the reason/purpose of this PR there?
I think it's reasonable change and this might need further doc as well (not in this PR is ok)
but some info in the issue itself will be easier to track

@mdbooth
Copy link
Contributor Author

mdbooth commented Apr 12, 2021

Thanks, @jichenjc. I opened #1481 which has a much more complete description of where this is coming from and hopefully other ways it could potentially be used.

Incidentally this is my first time submitting any k8s feature, so please let me know if there's anything I can do to help you and myself.

pkg/csi/cinder/openstack/openstack.go Outdated Show resolved Hide resolved
pkg/csi/cinder/openstack/openstack.go Outdated Show resolved Hide resolved
@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 12, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 12, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 12, 2021

Build failed.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 12, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 12, 2021

Build failed.

@mdbooth
Copy link
Contributor Author

mdbooth commented May 18, 2021

/test cloud-provider-openstack-e2e-test-csi-cinder
/test cloud-provider-openstack-multinode-csi-migration-test

@k8s-ci-robot
Copy link
Contributor

@mdbooth: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test pull-cloud-provider-openstack-check
  • /test pull-cloud-provider-openstack-test

Use /test all to run all jobs.

In response to this:

/test cloud-provider-openstack-e2e-test-csi-cinder
/test cloud-provider-openstack-multinode-csi-migration-test

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.

Copy link

@raildo raildo left a comment

Choose a reason for hiding this comment

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

LGTM

@lingxiankong
Copy link
Contributor

/test cloud-provider-openstack-e2e-test-csi-cinder

@k8s-ci-robot
Copy link
Contributor

@lingxiankong: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test pull-cloud-provider-openstack-check
  • /test pull-cloud-provider-openstack-test

Use /test all to run all jobs.

In response to this:

/test cloud-provider-openstack-e2e-test-csi-cinder

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.

@theopenlab-ci
Copy link

theopenlab-ci bot commented May 23, 2021

Build failed.

This will be added as metadata to every Cinder volume created by this plugin.
</dd>
</dl>

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you convert those using markdown? The pure HTML would make it harder to maintain.

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 can't, because AFAICT this is the 'supported' way to do description lists. I don't like it either, but I couldn't find anything better.

Do you know a better way to do this?

Copy link
Contributor

Choose a reason for hiding this comment

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

@lingxiankong
Copy link
Contributor

I can confirm the failed jobs have nothing to do with this PR, from the log, the cinder-csi components are all up and running. The failure is due to the CI cloud provider issue.

@jichenjc @ramineni @chrigl we can also consider using the similar CI job I did for occm, so we could have more control of the cloud resources (in devstack) created, also benefit from the latest version Cinder features.

For this PR, please leave your comments, we shouldn't let the contributors wait for so long for the reasons they couldn't control.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 3, 2021
@ramineni
Copy link
Contributor

ramineni commented Jun 7, 2021

updated description to link correct issue.
@mdbooth could you add alternate manifests as discussed in issue

@mdbooth
Copy link
Contributor Author

mdbooth commented Jun 7, 2021

updated description to link correct issue.
@mdbooth could you add alternate manifests as discussed in issue

Will do, although it will be a few days before I get back to this.

@ramineni
Copy link
Contributor

ramineni commented Jun 9, 2021

@mdbooth code looks good to me. Please add alternate manifests with examples in seperate PR.
Lets just wait for one functional job run before merge.

@ramineni
Copy link
Contributor

ramineni commented Jun 9, 2021

/test cloud-provider-openstack-e2e-test-csi-cinder

@k8s-ci-robot
Copy link
Contributor

@ramineni: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test pull-cloud-provider-openstack-check
  • /test pull-cloud-provider-openstack-test

Use /test all to run all jobs.

In response to this:

/test cloud-provider-openstack-e2e-test-csi-cinder

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.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Jun 9, 2021

Build succeeded.

@ramineni
Copy link
Contributor

/test cloud-provider-openstack-multinode-csi-migration-test

@k8s-ci-robot
Copy link
Contributor

@ramineni: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test pull-cloud-provider-openstack-check
  • /test pull-cloud-provider-openstack-test

Use /test all to run all jobs.

In response to this:

/test cloud-provider-openstack-multinode-csi-migration-test

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.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Jun 10, 2021

Build succeeded.

@ramineni
Copy link
Contributor

/approve

@mdbooth Please update docs in seperate PR

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ramineni

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 11, 2021
@k8s-ci-robot k8s-ci-robot merged commit cc9c107 into kubernetes:master Jun 11, 2021
@artpej
Copy link

artpej commented Jun 11, 2021

Yesterday csi cinder plugin was able to retrieve instance id using metadata service or config drive, today it seems that nodeid is mandatory. did i miss something?

  • thank for your work -

@lingxiankong
Copy link
Contributor

What do you mean by "nodeid is mandatory"? From #1565 I can see it's deprecated and shouldn't be needed.

@ramineni
Copy link
Contributor

@artpej Yes, Its not a mandatory/required argument and the value is not used anywhere. Please share the logs

@artpej
Copy link

artpej commented Jun 14, 2021

@lingxiankong @ramineni , thanks for your response, I just ran another try and everything works as expected (without the need to specify the nodeid). I should had encounter a problem with the image cache. Sorry for the inconvenience.

However the documentation in this PR specify that the node-id is required ( still present in the master branch https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/cinder-csi-plugin/using-cinder-csi-plugin.md#command-line-arguments ). It confused me a bit.

Finally thanks for your opensource work i really appreciate, and sorry for my poorly english speaking 😉 .

@ramineni
Copy link
Contributor

However the documentation in this PR specify that the node-id is required ( still present in the master branch https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/cinder-csi-plugin/using-cinder-csi-plugin.md#command-line-arguments ). It confused me a bit.

@artpej Thanks for pointing. Raised a PR to fix the doc. #1573

powellchristoph pushed a commit to powellchristoph/cloud-provider-openstack that referenced this pull request Jan 19, 2022
* [cinder-csi-plugin] Allow multiple --cloud-config (kubernetes#1481)

This change allows cinder-csi-plugin to be invoked with multiple config
files. These will be parsed sequentially in the order specified. Values
in later config files override values in earlier config files.

This makes 'layered' configurations simpler to manage. For example a
base configuration containing authentication information and a per-node
override configuration which applies only to a single node. Keeping
these in separate files simplifies the task of changing the base
configuration for all nodes.

* [cinder-csi-plugin] Document command-line arguments
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

[cinder-csi-plugin] Allow passing multiple config files
10 participants