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>
(cherry picked from commit 53e76fab69
)
This commit is contained in:
parent
4b7f0a0541
commit
0e67c8da24
@ -632,7 +632,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