forked from rook/rook
ceph: correctly return if multus was applied
We must only return if multus got configured successfully. Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
@@ -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{})
|
||||
if err != nil {
|
||||
return false, errors.Errorf("failed to find CephClusters in namespace %q", objectMeta.Namespace)
|
||||
@@ -533,10 +534,11 @@ func applyCephClusterNetworkConfig(objectMeta *metav1.ObjectMeta, rookclientset
|
||||
if err != nil {
|
||||
return false, errors.Wrapf(err, "failed to apply multus configuration to CephCluster %q", cephCluster.Name)
|
||||
}
|
||||
isMultusApplied = true
|
||||
}
|
||||
}
|
||||
|
||||
return true, nil
|
||||
return isMultusApplied, nil
|
||||
}
|
||||
|
||||
// createCSIDriverInfo Registers CSI driver by creating a CSIDriver object
|
||||
|
||||
Reference in New Issue
Block a user