forked from rook/rook
csi: check networkFence status before deleting
earlier, we were only checking the specs of networkFence to see if unfencing is done before proceeding with deletion but we should also check the status of networkFence before proceeding with deletion. Signed-off-by: subhamkrai <srai@redhat.com>
This commit is contained in:
@@ -604,8 +604,8 @@ func (c *clientCluster) unfenceAndDeleteNetworkFence(ctx context.Context, node c
|
||||
return false, err
|
||||
}
|
||||
|
||||
if networkFence.Spec.FenceState != addonsv1alpha1.Unfenced {
|
||||
logger.Infof("waiting for network fence CR %s to get in %s state before deletion", networkFence.Name, addonsv1alpha1.Unfenced)
|
||||
if networkFence.Status.Message != addonsv1alpha1.UnFenceOperationSuccessfulMessage {
|
||||
logger.Infof("waiting for network fence CR %q status to get result %q", networkFence.Name, addonsv1alpha1.UnFenceOperationSuccessfulMessage)
|
||||
return false, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user