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

deprecate the allowRemoteStorageConsumer spec from storageCluster #3019

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

rewantsoni
Copy link
Member

@rewantsoni rewantsoni commented Feb 6, 2025

The PR does the following:

  1. Deprecate the spec allowRemoteStorageConsumer from storageCluster API
  2. Remove all references of allowRemoteStorageConsumer and the annotation ocs.openshift.io/deployment-mode
  3. Stop reconciling the mirroring field in the cephblockpool controller (this was done as mirroring for internal mode was controlled via the ocs.openshift.io/deployment-mode annotation)
  4. Stop creating/managing the default svg as that will be handled with provider-client communication
  5. Always set DisableCSIDriver to true in ocs-operator-config
  6. Fix the tests
  7. Deploy ocs-client op along with the ocs-op in the ci

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 6, 2025
Copy link
Contributor

openshift-ci bot commented Feb 6, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@rewantsoni rewantsoni force-pushed the allowremotestorageconsuemrs branch 3 times, most recently from 2f49263 to 01d4434 Compare February 6, 2025 12:46
@rewantsoni rewantsoni marked this pull request as ready for review February 6, 2025 13:01
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 6, 2025
@rewantsoni
Copy link
Member Author

/hold for testing

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 6, 2025
@rewantsoni rewantsoni changed the title deprecate and remove the allowRemoteStorageConsumer spec from storageCluster deprecate the allowRemoteStorageConsumer spec from storageCluster Feb 6, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

were these removed code paths in this file guarding against X from happening or ensuring that X happens? if it's the latter where is the replacement?

as an example

  1. if it's not provider mode do X
  2. if it's provider mode do X

Copy link
Member Author

Choose a reason for hiding this comment

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

The code paths that are removed in this profile were ensuring that mirroring of cephblockpool is established for DR. The replacement for that Mirroring controller, that handles mirroring of blockpools as well as radosnamespace.
There would need to be adjustments in MCO op as well such that they follow the new method of setting up RDR

Copy link
Contributor

Choose a reason for hiding this comment

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

There would need to be adjustments in MCO

  • Ack, this what I was looking for, thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

better not to move this code, let the implicit rns & default svg continue to be created in this reconcile itself as the same code will anyways need to run even at storageconsumer controller if moved after a check.

in consumer controller we just perform the check to create or not to create an svg. let's try to move the pieces as less as possible until it goes against final design/outcome, like in storage classes it's a must but not for svg.

Copy link
Member

Choose a reason for hiding this comment

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

Why, shouldnt we need to have storageconsumer as the source of truth for the SVG and RNS? we should not be creating it in multiple classes

if sc.Spec.AllowRemoteStorageConsumers {
util.AddAnnotation(nb, "MulticloudObjectGatewayProviderMode", "true")
}
util.AddAnnotation(nb, "MulticloudObjectGatewayProviderMode", "true")
Copy link
Contributor

Choose a reason for hiding this comment

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

does any change to this needs a touch in Noobaa? Let's note such instances directly on corresponding Jira for posterity.

can you get more info on this? is removing this check makes MCG behave differently than internal mode, which we don't want.

Copy link
Member Author

Choose a reason for hiding this comment

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

Adding this annotation sets the "RESTRICT_RESOURCE_DELETION" env variable in noobaa. This ensures that the bucket can be deleted only by the owner of the bucket and not by any other noobaa account.
cc: @ezio-auditore

Copy link
Contributor

Choose a reason for hiding this comment

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

How would that affect users who deletes buckets using S3? or using the new s3 bowser experience?

if r.AvailableCrds[VirtualMachineCrdName] {
ret = append(ret, newCephBlockPoolVirtualizationStorageClassConfiguration(initData))
}
//TODO: will be removed when we start handling kubevirt class through provider-client communication
Copy link
Contributor

Choose a reason for hiding this comment

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

as mentioned above, pls add these notes to corresponding Jira as well, preferably as a single comment (after PR merge)?

Copy link
Member Author

Choose a reason for hiding this comment

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

ack, I will add these to jira

@rewantsoni rewantsoni force-pushed the allowremotestorageconsuemrs branch from 01d4434 to e1d602d Compare February 10, 2025 13:04
@rewantsoni
Copy link
Member Author

/test ocs-operator-bundle-e2e-aws

deprecate allowremotestorageconsumer flag from the storagecluster
spec

Signed-off-by: Rewant Soni <[email protected]>
Signed-off-by: Rewant Soni <[email protected]>
@rewantsoni rewantsoni force-pushed the allowremotestorageconsuemrs branch 3 times, most recently from 000a473 to 6a5c83d Compare February 27, 2025 15:41
@rewantsoni
Copy link
Member Author

/test ocs-operator-bundle-e2e-aws

@@ -18,29 +18,6 @@ import (

type ocsCephBlockPools struct{}

// ensures that peer cluster secret exists and adds it to CephBlockPool
func (o *ocsCephBlockPools) addPeerSecretsToCephBlockPool(r *StorageClusterReconciler, storageCluster *ocsv1.StorageCluster, poolName, poolNamespace string) *cephv1.MirroringPeerSpec {
Copy link
Member

Choose a reason for hiding this comment

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

This commit is having 3 different changes? can we move specific changes to a commit (with details) so that it helps in reviewing and captures the history on why its changed

Copy link
Member

Choose a reason for hiding this comment

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

Why, shouldnt we need to have storageconsumer as the source of truth for the SVG and RNS? we should not be creating it in multiple classes

@@ -56,15 +56,19 @@ func newCephFilesystemGroupSnapshotClassConfiguration(instance *ocsv1.StorageClu
return GroupSnapshotClassConfiguration{
groupSnapshotClass: newVolumeGroupSnapshotClass(instance, cephfsGroupSnapshotter),
reconcileStrategy: ReconcileStrategy(instance.Spec.ManagedResources.CephFilesystems.ReconcileStrategy),
disable: instance.Spec.AllowRemoteStorageConsumers,
//TODO: This resource will be managed by the provider-client flow, replacing it with same field used to disable
Copy link
Member

Choose a reason for hiding this comment

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

open a jira task for the specific TODO so that we dont miss it

Copy link
Member Author

Choose a reason for hiding this comment

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

There is a jira already present and Malay is working on it: #3037

@@ -186,6 +186,20 @@ func (t *DeployManager) generateClusterObjects(ocsCatalogImage string, subscript
}
ocsSubscription.SetGroupVersionKind(schema.GroupVersionKind{Group: v1alpha1.SchemeGroupVersion.Group, Kind: "Subscription", Version: v1alpha1.SchemeGroupVersion.Version})

ocsClientSubscription := v1alpha1.Subscription{
Copy link
Member

Choose a reason for hiding this comment

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

can you please add a comment for this change?

if sc.Spec.AllowRemoteStorageConsumers {
util.AddAnnotation(nb, "MulticloudObjectGatewayProviderMode", "true")
}
util.AddAnnotation(nb, "MulticloudObjectGatewayProviderMode", "true")
Copy link
Contributor

Choose a reason for hiding this comment

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

How would that affect users who deletes buckets using S3? or using the new s3 bowser experience?

@rewantsoni rewantsoni force-pushed the allowremotestorageconsuemrs branch from 6a5c83d to e151088 Compare March 3, 2025 05:41
Copy link
Contributor

openshift-ci bot commented Mar 3, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rewantsoni
Once this PR has been reviewed and has the lgtm label, please ask for approval from nb-ohad. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Remove the deployment mode annotation ref from cephblockpool reconcile
since mirroring will be handled by the mirroring controller

Signed-off-by: Rewant Soni <[email protected]>
@rewantsoni rewantsoni force-pushed the allowremotestorageconsuemrs branch from e151088 to 6f8d16f Compare March 3, 2025 05:43
Signed-off-by: Rewant Soni <[email protected]>
@rewantsoni rewantsoni force-pushed the allowremotestorageconsuemrs branch from 6f8d16f to 551fa90 Compare March 3, 2025 05:45
@rewantsoni
Copy link
Member Author

/test ocs-operator-bundle-e2e-aws

@rewantsoni rewantsoni force-pushed the allowremotestorageconsuemrs branch from 551fa90 to b908cc2 Compare March 3, 2025 09:46
@rewantsoni rewantsoni force-pushed the allowremotestorageconsuemrs branch from b908cc2 to 2581fae Compare March 3, 2025 12:42
Copy link
Contributor

openshift-ci bot commented Mar 3, 2025

@rewantsoni: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ocs-operator-bundle-e2e-aws 2581fae link true /test ocs-operator-bundle-e2e-aws

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants