-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
ceph: correctly return if multus was applied #6152
Conversation
We must only return if multus got configured successfully. Signed-off-by: Sébastien Han <seb@redhat.com>
@@ -523,6 +523,7 @@ func deleteCSIDriverResources( | |||
} | |||
|
|||
func applyCephClusterNetworkConfig(objectMeta *metav1.ObjectMeta, rookclientset rookclient.Interface) (bool, error) { | |||
var isMultusApplied bool | |||
cephClusters, err := rookclientset.CephV1().CephClusters(objectMeta.Namespace).List(metav1.ListOptions{}) |
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 related to this PR, but still a question objectMeta.Namespace
is the namespace of the operator as csi pods will start in rook operator namespace. will this check passes if we have ceph clusters in different namespaces?
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.
@rohan47 is working on a fix for this.
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.
So if the CephCluster is not in the operator namespace this won't work.
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.
LGTM
} | ||
} | ||
|
||
return true, nil | ||
return isMultusApplied, nil |
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.
@leseb do we need this bool ? or cant we just survive with 'error' return in caller for nil , or error ? :)
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.
The bool checks whether multus is applied and error checks for any underlaying error so I think it's cleaner this way :)
Description of your changes:
We must only return if multus got configured successfully.
Signed-off-by: Sébastien Han seb@redhat.com
Which issue is resolved by this Pull Request:
Resolves #6151
Checklist:
make codegen
) has been run to update object specifications, if necessary.