mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
rbd: fix checkHealthyPrimary to consider up+stopped state
we need to check for image should be in up+stopped state not anyone of the state for that the we need to use OR check not the AND check. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
704cb5c941
commit
53e76fab69
@ -633,7 +633,7 @@ func checkHealthyPrimary(ctx context.Context, rbdVol *rbdVolume) error {
|
||||
return fmt.Errorf("failed to get local status: %w", err)
|
||||
}
|
||||
|
||||
if !localStatus.Up && localStatus.State != librbd.MirrorImageStatusStateStopped {
|
||||
if !localStatus.Up || localStatus.State != librbd.MirrorImageStatusStateStopped {
|
||||
return fmt.Errorf("%s %w. State is up=%t, state=%q",
|
||||
rbdVol,
|
||||
ErrUnHealthyMirroredImage,
|
||||
|
Loading…
Reference in New Issue
Block a user