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

Bug 2049075: csi: cleanup csi driver resources when zero cephclusters exist #346

Merged

Conversation

Rakshith-R
Copy link
Member

This commit modifies ceph-csi controller to be able to cleanup
ceph-csi deployment,daemonset,services & csidriver objects
when no cephcluster exists.

It makes the following changes:

  • redundant check for tp.DriverNamePrefix is removed.
  • retry to start drivers within reconcile loop is removed,
    controller will retry in case of error now.
  • stopDrivers() will now return error in case of failure.
  • predicate delete func will now respond to cephcluster deletion.
  • CSI resources will be cleaned up when cephcluster does not exist.

Fixes: rook#9697

Signed-off-by: Rakshith R rar@redhat.com
(cherry picked from commit 1e9920f)
(cherry picked from commit 2027e7f)

Description of your changes:

Which issue is resolved by this Pull Request:
Resolves #

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Skip Tests for Docs: Add the flag for skipping the build if this is only a documentation change. See here for the flag.
  • Skip Unrelated Tests: Add a flag to run tests for a specific storage provider. See test options.
  • Reviewed the developer guide on Submitting a Pull Request
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.
  • Pending release notes updated with breaking and/or notable changes, if necessary.
  • Upgrade from previous release is tested and upgrade user guide is updated, if necessary.
  • Code generation (make codegen) has been run to update object specifications, if necessary.

This commit modifies ceph-csi controller to be able to cleanup
ceph-csi deployment,daemonset,services & csidriver objects
when no cephcluster exists.

It makes the following changes:
- redundant check for tp.DriverNamePrefix is removed.
- retry to start drivers within reconcile loop is removed,
  controller will retry in case of error now.
- stopDrivers() will now return error in case of failure.
- predicate delete func will now respond to cephcluster deletion.
- CSI resources will be cleaned up when cephcluster does not exist.

Fixes: rook#9697

Signed-off-by: Rakshith R <rar@redhat.com>
(cherry picked from commit 1e9920f)
(cherry picked from commit 2027e7f)
@openshift-ci openshift-ci bot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Feb 15, 2022
@openshift-ci
Copy link

openshift-ci bot commented Feb 15, 2022

@Rakshith-R: This pull request references Bugzilla bug 2049075, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

2 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

No GitHub users were found matching the public email listed for the QA contact in Bugzilla (ammahapa@redhat.com), skipping review request.

In response to this:

Bug 2049075: csi: cleanup csi driver resources when zero cephclusters exist

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.

@Rakshith-R
Copy link
Member Author

/cc @red-hat-storage/rook-admins @agarwal-mudit @red-hat-storage/ceph-csi-admins

@openshift-ci openshift-ci bot requested review from agarwal-mudit and a team February 15, 2022 06:10
@leseb
Copy link

leseb commented Feb 15, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 15, 2022
@leseb
Copy link

leseb commented Feb 15, 2022

/approve

@openshift-ci
Copy link

openshift-ci bot commented Feb 15, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: leseb, Rakshith-R

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 15, 2022
@openshift-merge-robot openshift-merge-robot merged commit 43fe1fc into red-hat-storage:release-4.10 Feb 15, 2022
@openshift-ci
Copy link

openshift-ci bot commented Feb 15, 2022

@Rakshith-R: All pull requests linked via external trackers have merged:

Bugzilla bug 2049075 has been moved to the MODIFIED state.

In response to this:

Bug 2049075: csi: cleanup csi driver resources when zero cephclusters exist

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.

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. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
3 participants