shell: stop long running jobs if lock is lost

This commit is contained in:
chrislu committed 2022-08-22 14:12:23 -07:00
1 parent 601ba5fb68
commit 676e27c589
7 files changed
+29

No files matched your search

@@ -104,6 +104,10 @@ func (c *commandVolumeFixReplication) Do(args []string, commandEnv *CommandEnv,
}
}
if !commandEnv.isLocked() {
return fmt.Errorf("lock is lost")
}
if len(overReplicatedVolumeIds) > 0 {
if err := c.deleteOneVolume(commandEnv, writer, takeAction, overReplicatedVolumeIds, volumeReplicas, allLocations, pickOneReplicaToDelete); err != nil {
return err