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

update the cephblockpool reonciler to disable mirroring #2795

Merged
merged 3 commits into from
Sep 13, 2024

Conversation

rewantsoni
Copy link
Member

When mirroring on storageCluster was disabled, the cephblockpool mirroring was not disabled, this could break the DR as MCO enables/disables the mirroring on the cephblockpool via storageCluster.

Hence, with this PR we are making the mirroring spec on the storageCluster as a pointer and enabling/disabling mirroring on cephblockpool only if the value is set. If mirroring is set to nil other controller will be able to make changes on the mirroring field on the cephblockpool.

@rewantsoni
Copy link
Member Author

Testing:

[rewantsoni odf] k get storagecluster ocs-storagecluster -oyaml | yq '.spec.mirroring' && k get cephblockpool ocs-storagecluster-cephblockpool -oyaml | yq '.spec.mirroring'
null
{}

Enabled from storageCluster:
[rewantsoni odf] k get storagecluster ocs-storagecluster -oyaml | yq '.spec.mirroring' && echo "" && k get cephblockpool ocs-storagecluster-cephblockpool -oyaml | yq '.spec.mirroring'
enabled: true
peerSecretNames:
  - ux-cert-secret

enabled: true
mode: image
peers:
  secretNames:
    - ux-cert-secret
    
Disable from storageCluster:
[rewantsoni odf] k get storagecluster ocs-storagecluster -oyaml | yq '.spec.mirroring' && echo "" && k get cephblockpool ocs-storagecluster-cephblockpool -oyaml | yq '.spec.mirroring'
enabled: false

{}

Not set on storageCluster:
[rewantsoni odf] k get storagecluster ocs-storagecluster -oyaml | yq '.spec.mirroring' && echo "" && k get cephblockpool ocs-storagecluster-cephblockpool -oyaml | yq '.spec.mirroring'
null

enabled: true
mode: image

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 13, 2024
Copy link
Contributor

openshift-ci bot commented Sep 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: iamniting, rewantsoni

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 Sep 13, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 6cbff2c into red-hat-storage:main Sep 13, 2024
11 checks passed
@rewantsoni
Copy link
Member Author

/cherry-pick release-4.17

@openshift-cherrypick-robot

@rewantsoni: new pull request created: #2796

In response to this:

/cherry-pick release-4.17

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.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants