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] ephemeral volume removal #2602

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

sergelogvinov
Copy link
Contributor

@sergelogvinov sergelogvinov commented May 27, 2024

Disable creating new deprecated ephemeral volumes

What this PR does / why we need it:

Remove deprecated ephemeral volumes.

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

Special notes for reviewers:

Hi, @dulek i've disabled only ephemeral volume creation stage.
What do you think, we should remove all code or make it in two steps (releases)?

Thanks.

Release note:

In-line ephemeral is no longer available.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 27, 2024
@k8s-ci-robot k8s-ci-robot requested review from dulek and zetaab May 27, 2024 11:26
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 27, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @sergelogvinov. 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 27, 2024
@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 May 28, 2024
@jichenjc
Copy link
Contributor

thanks for the PR, could you please update

  • doc needed
  • release notes about this PR

@sergelogvinov sergelogvinov force-pushed the no-ephemeral branch 2 times, most recently from 1e47456 to 5f1a600 Compare May 29, 2024 11:39
@sergelogvinov sergelogvinov marked this pull request as ready for review May 29, 2024 11:39
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 29, 2024
@k8s-ci-robot k8s-ci-robot requested a review from mdbooth May 29, 2024 11:39
@sergelogvinov
Copy link
Contributor Author

/retest-required

@jichenjc
Copy link
Contributor

@sergelogvinov from the error seems more clean up needed, maybe sainty test cases?

@sergelogvinov
Copy link
Contributor Author

@jichenjc All tests passed. thanks.

@jichenjc
Copy link
Contributor

jichenjc commented Jun 4, 2024

/approve

@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 4, 2024
Comment on lines -79 to -86
_, err := ns.Cloud.GetVolume(volumeID)
if err != nil {
if cpoerrors.IsNotFound(err) {
return nil, status.Error(codes.NotFound, "Volume not found")
}
return nil, status.Errorf(codes.Internal, "GetVolume failed with error %v", err)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you remove this? This doesn't exactly feel like it's related, with "csi.storage.k8s.io/ephemeral" == "true" this code won't be exected.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, the main idea is - to remove openstack credentials dependency from node csi daemonset.

We do not need to check the existence of the Volume in the daemonset by openstack api. When the CSI sidecar calls the NodeStageVolume/NodePublishVolume function, the Volume is already attached to the VM. We just need to find the block device in the /dev/* directory. If any issues occur, the block device mounter will return an error.

I believe, this check _, err := ns.Cloud.GetVolume(volumeID) is not necessary here.

What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

It's been a while ago when this check got in in #676. @jichenjc, do you remember why it was necessary?

@kayrus, what do you think about this?

Copy link
Contributor

Choose a reason for hiding this comment

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

seems last update is commit cc73e20
but didn't find the commit message realted

I am guessing this might prevent some concurrent deletion during the actions here ..

Comment on lines -442 to -469
_, err := ns.Cloud.GetVolume(volumeID)
if err != nil {
if cpoerrors.IsNotFound(err) {
klog.V(4).Infof("NodeUnstageVolume: Unable to find volume: %v", err)
return nil, status.Error(codes.NotFound, "Volume not found")
}
return nil, status.Errorf(codes.Internal, "GetVolume failed with error %v", err)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, I think.

@jichenjc
Copy link
Contributor

if no objection, let's merge this soon

@sergelogvinov sergelogvinov force-pushed the no-ephemeral branch 2 times, most recently from 5f1a600 to c714017 Compare July 29, 2024 09:23
@sergelogvinov
Copy link
Contributor Author

i've rebased the PR... Thanks.

sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 4, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 4, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 4, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 4, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 11, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 11, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 12, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 12, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 12, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 12, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 18, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 18, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 20, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 20, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 20, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 26, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 26, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 26, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 26, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 27, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Sep 27, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Oct 2, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Oct 2, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Oct 2, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Oct 2, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Oct 2, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Oct 9, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Oct 11, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
sergelogvinov added a commit to sergelogvinov/cloud-provider-openstack that referenced this pull request Oct 14, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
k8s-ci-robot pushed a commit that referenced this pull request Oct 14, 2024
Remove openstack credits from node plugin

Signed-off-by: Serge Logvinov <[email protected]>
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.

[csi-cinder-plugin] Ephemeral Volume removal process
5 participants