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

external: separate rgw endpoint validation from cephfs and rbd sc #2585

Merged

Conversation

parth-gr
Copy link
Member

@parth-gr parth-gr commented Apr 24, 2024

currently, if the rgw endpoint is not reachable
all the storageclass creation fails
The fix will make the rgw endpoint validation separate and will create rbd and cephfs storageclasses if rgw endpoints validation fails

@parth-gr parth-gr changed the title external: seaprate rgw endpoint validation from cephfs and rbd storag… Bug 2213757: external: seaprate rgw endpoint validation from cephfs and rbd storag… Apr 24, 2024
@openshift-ci openshift-ci bot added the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Apr 24, 2024
Copy link
Contributor

openshift-ci bot commented Apr 24, 2024

@parth-gr: This pull request references Bugzilla bug 2213757, which is valid.

No validations were run on this bug

Requesting review from QA contact:
/cc @vavuthu

In response to this:

Bug 2213757: external: seaprate rgw endpoint validation from cephfs and rbd storag…

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.

@openshift-ci openshift-ci bot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Apr 24, 2024
Copy link
Contributor

openshift-ci bot commented Apr 24, 2024

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: vavuthu.

Note that only red-hat-storage members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@parth-gr: This pull request references Bugzilla bug 2213757, which is valid.

No validations were run on this bug

Requesting review from QA contact:
/cc @vavuthu

In response to this:

Bug 2213757: external: seaprate rgw endpoint validation from cephfs and rbd storag…

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.

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.

@parth-gr
Copy link
Member Author

/assign @iamniting

@agarwal-mudit agarwal-mudit changed the title Bug 2213757: external: seaprate rgw endpoint validation from cephfs and rbd storag… external: seaprate rgw endpoint validation from cephfs and rbd storag… May 7, 2024
@openshift-ci openshift-ci bot removed 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 May 7, 2024
Copy link
Contributor

openshift-ci bot commented May 7, 2024

@parth-gr: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

external: seaprate rgw endpoint validation from cephfs and rbd storag…

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.

@agarwal-mudit
Copy link
Member

/cherry-pick release-4.16

@openshift-cherrypick-robot

@agarwal-mudit: once the present PR merges, I will cherry-pick it on top of release-4.16 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.16

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.

@agarwal-mudit
Copy link
Member

/retest

if err != nil {
return err
}
rgwEndpoint = d.Data[externalCephRgwEndpointKey]
// rgw-endpoint is no longer needed in the 'd.Data' dictionary,
// and can be deleted
// created an issue in rook to add `CephObjectStore` type directly in the JSON output
// https://github.com/rook/rook/issues/6165
delete(d.Data, externalCephRgwEndpointKey)
Copy link
Contributor

Choose a reason for hiding this comment

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

If we delete the rgw endpoint from the d.Data and let's say for some reason the ocs-operator pod got restarted before the CR is created, we will loose the end point value.

Copy link
Member Author

Choose a reason for hiding this comment

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

If the ocs-operator is re-started we will re-fecth the data from the secret, using retrieveExternalSecretData so all the fields will get back

@malayparida2000
Copy link
Contributor

…eclass

currently if the rgw endpoint is not reachable all the storageclass creation fails Fix will make the rgw endpoint validation separate and will create rbd and cephfs storageclasses if rgw endpoints validation fails

Signed-off-by: parth-gr paarora@redhat.com (cherry picked from commit b847eee)

Please correct the PR desc, seems like it's missing half sentence or something.

@parth-gr parth-gr changed the title external: seaprate rgw endpoint validation from cephfs and rbd storag… external: seaprate rgw endpoint validation from cephfs and rbd sc May 13, 2024
Copy link
Contributor

@umangachapagain umangachapagain left a comment

Choose a reason for hiding this comment

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

Since we do not have E2E test coverage for this, please test it manually and ensure the changes work as expected.

currently if the rgw endpoint is not reachable
all the storageclass creation fails
Fix will make the rgw endpoint validation separate and will
create rbd and cephfs storageclasses if rgw endpoints validation
fails

Signed-off-by: parth-gr <partharora1010@gmail.com>
@parth-gr
Copy link
Member Author

parth-gr commented May 14, 2024

Testing result:

Delete the rbd and rgw storageclass

[rider@localhost Downloads]$ kubectl delete storageclass ocs-external-storagecluster-ceph-rbd
storageclass.storage.k8s.io "ocs-external-storagecluster-ceph-rbd" deleted
[rider@localhost Downloads]$ 
[rider@localhost Downloads]$ kubectl delete storageclass ocs-external-storagecluster-ceph-rgw
storageclass.storage.k8s.io "ocs-external-storagecluster-ceph-rgw" deleted
[rider@localhost Downloads]$ 
[rider@localhost Downloads]$ 
[rider@localhost Downloads]$ kubectl get storageclass
NAME                                 PROVISIONER                             RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
ocs-external-storagecluster-cephfs   openshift-storage.cephfs.csi.ceph.com   Delete          Immediate              true                   24h
openshift-storage.noobaa.io          openshift-storage.noobaa.io/obc         Delete          Immediate              false                  24h
thin-csi (default)                   csi.vsphere.vmware.com                  Delete          WaitForFirstConsumer   true                   25h
[rider@localhost Downloads]$ 

Updated the secret to unreachable rgw endpoint

{"level":"error","ts":"2024-05-14T08:22:05Z","logger":"controllers.StorageCluster","msg":"RGW endpoint is not reachable.","Request.Namespace":"openshift-storage","Request.Name":"ocs-external-storagecluster","RGWEndpoint":"10.1.115.108:8080","error":"dial tcp 10.1.115.108:8080: i/o timeout","stacktrace":"github.com/red-hat-storage/ocs-operator/v4/controllers/storagecluster.(*StorageClusterReconciler).createExternalStorageClusterResources\n\t/workspace/controllers/storagecluster/external_resources.go:435\ngithub.com/red-hat-storage/ocs-operator/v4/controllers/storagecluster.(*ocsExternalResources).ensureCreated\n\t/workspace/controllers/storagecluster/external_resources.go:270\ngithub.com/red-hat-storage/ocs-operator/v4/controllers/storagecluster.(*StorageClusterReconciler).reconcilePhases\n\t/workspace/controllers/storagecluster/reconcile.go:433\ngithub.com/red-hat-storage/ocs-operator/v4/controllers/storagecluster.(*StorageClusterReconciler).Reconcile\n\t/workspace/controllers/storagecluster/reconcile.go:176\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:119\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:316\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227"}
{"level":"error","ts":"2024-05-14T08:22:05Z","logger":"controllers.StorageCluster","msg":"Could not create ExternalStorageClusterResource.","Request.Namespace":"openshift-storage","Request.Name":"ocs-external-storagecluster","StorageCluster":{"name":"ocs-external-storagecluster","namespace":"openshift-storage"},"error":"dial tcp 10.1.115.108:8080: i/o timeout","stacktrace":"github.com/red-hat-storage/ocs-operator/v4/controllers/storagecluster.(*ocsExternalResources).ensureCreated\n\t/workspace/controllers/storagecluster/external_resources.go:272\ngithub.com/red-hat-storage/ocs-operator/v4/controllers/storagecluster.(*StorageClusterReconciler).reconcilePhases\n\t/workspace/controllers/storagecluster/reconcile.go:433\ngithub.com/red-hat-storage/ocs-operator/v4/controllers/storagecluster.(*StorageClusterReconciler).Reconcile\n\t/workspace/controllers/storagecluster/reconcile.go:176\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:119\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:316\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227"}
{"level":"info","ts":"2024-05-14T08:22:05Z","logger":"controllers.StorageCluster","msg":"Could not update StorageCluster status.","Request.Namespace":"openshift-storage","Request.Name":"ocs-external-storagecluster","StorageCluster":{"name":"ocs-external-storagecluster","namespace":"openshift-storage"}}
{"level":"error","ts":"2024-05-14T08:22:05Z","msg":"Reconciler error","controller":"storagecluster","controllerGroup":"ocs.openshift.io","controllerKind":"StorageCluster","StorageCluster":{"name":"ocs-external-storagecluster","namespace":"openshift-storage"},"namespace":"openshift-storage","name":"ocs-external-storagecluster","reconcileID":"1d9a004e-e099-4ef6-8797-e8a3d9d9387b","error":"dial tcp 10.1.115.108:8080: i/o timeout","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:329\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227"}
{"level":"info","ts":"2024-05-14T08:22:05Z","logger":"controllers.StorageCluster","msg":"Reconciling external StorageCluster.","Request.Namespace":"openshift-storage","Request.Name":"ocs-external-storagecluster","StorageCluster":{"name":"ocs-external-storagecluster","namespace":"openshift-storage"}}
{"level":"info","ts":"2024-05-14T08:22:05Z","logger":"controllers.StorageCluster","msg":"Monitoring Information found. Monitoring will be enabled on the external cluster.","Request.Namespace":"openshift-storage","Request.Name":"ocs-external-storagecluster","CephCluster":{"name":"ocs-external-storagecluster","namespace":"openshift-storage"}}

Still the rbd storageclass gets created:

[rider@localhost Downloads]$ kubectl get storageclass
NAME                                   PROVISIONER                             RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
ocs-external-storagecluster-ceph-rbd   openshift-storage.rbd.csi.ceph.com      Delete          Immediate              true                   2s
ocs-external-storagecluster-cephfs     openshift-storage.cephfs.csi.ceph.com   Delete          Immediate              true                   24h
openshift-storage.noobaa.io            openshift-storage.noobaa.io/obc         Delete          Immediate              false                  24h
thin-csi (default)                     csi.vsphere.vmware.com                  Delete          WaitForFirstConsumer   true                   25h
[rider@localhost Downloads]$ 

@parth-gr
Copy link
Member Author

/backport 4.16

@parth-gr
Copy link
Member Author

Since we do not have E2E test coverage for this, please test it manually and ensure the changes work as expected.

@umangachapagain added the testing results

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

openshift-ci bot commented May 14, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: parth-gr, umangachapagain

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 May 14, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 409a0df into red-hat-storage:main May 14, 2024
11 checks passed
@openshift-cherrypick-robot

@agarwal-mudit: new pull request created: #2607

In response to this:

/cherry-pick release-4.16

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.

@travisn travisn changed the title external: seaprate rgw endpoint validation from cephfs and rbd sc external: separate rgw endpoint validation from cephfs and rbd sc May 14, 2024
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.

None yet

6 participants