-
Notifications
You must be signed in to change notification settings - Fork 185
controller: handle internal client in provider mode upgrade #3157
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
base: main
Are you sure you want to change the base?
controller: handle internal client in provider mode upgrade #3157
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rewantsoni 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 |
|
||
clusterID := util.GetClusterID(ctx, r.Client, &log) | ||
|
||
internalConsumer := clusterID != "" && clusterID == storageConsumer.Status.Client.ClusterID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's requeue if the clusterID is empty, better be correct rather than skipping it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we need to adjust this file some more as not to create a storageconsumer for upgraded provider mode internal consumer and also not to reconcile configmap?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, will do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not reconciling CM needs a discussion probably w/ Ohad as he opposed to that earlier.
bf13971
to
1854534
Compare
1854534
to
6535cbc
Compare
6535cbc
to
763aa63
Compare
/hold |
spec.StorageClasses = []ocsv1alpha1.StorageClassSpec{ | ||
{Name: util.GenerateNameForCephBlockPoolStorageClass(storageCluster)}, | ||
{Name: util.GenerateNameForCephFilesystemStorageClass(storageCluster)}, | ||
func (r *StorageConsumerUpgradeReconciler) reconcileStorageConsumer( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any reason duplicating it here, the minute provider internal consumer is marked as internal storagecluster controller will reconcile it and fills the necessary spec, moreover this is overwritten as well.
let me know if I'm misunderstanding anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be called for both internal consumers and external consumers that were in provider mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, that's the missing piece, thanks.
Signed-off-by: Rewant Soni <[email protected]>
763aa63
to
c1dce98
Compare
Signed-off-by: Rewant Soni <[email protected]>
c1dce98
to
89c9973
Compare
@rewantsoni: The following test failed, say
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. |
The internal Client/consumer in provider mode needs to be handled differently.
We need to onboard the client to the internal consumer. Hence, from the upgrade controller, we are creating a consumer/configMap, updating the client status to point to this new consumer, and in the end, deleting the old storage consumer.
We also need to restart ocs-provider-server as stores a cache of UUIDs of consumers
Fixes: https://issues.redhat.com/browse/DFBUGS-2290