mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(region): update rescuing status to rescue (#19543)
This commit is contained in:
@@ -47,7 +47,7 @@ const (
|
||||
VM_UNSYNC = "unsync"
|
||||
|
||||
VM_START_RESCUE = "start_rescue"
|
||||
VM_RESCUING = "rescuing"
|
||||
VM_RESCUE = "rescue"
|
||||
VM_STOP_RESCUE = "stop_rescue"
|
||||
VM_START_RESCUE_FAILED = "start_rescue_failed"
|
||||
VM_STOP_RESCUE_FAILED = "stop_rescue_failed"
|
||||
|
||||
@@ -112,7 +112,7 @@ func (self *StartRescueTask) OnRescueStartServerComplete(ctx context.Context, gu
|
||||
logclient.AddActionLogWithStartable(self, guest, logclient.ACT_VM_START_RESCUE, guest.GetShortDesc(ctx), self.UserCred, true)
|
||||
|
||||
// Set guest status to rescue running
|
||||
guest.SetStatus(ctx, self.UserCred, api.VM_RESCUING, "OnRescueStartServerComplete")
|
||||
guest.SetStatus(ctx, self.UserCred, api.VM_RESCUE, "OnRescueStartServerComplete")
|
||||
self.SetStageComplete(ctx, nil)
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ func (self *StopRescueTask) OnInit(ctx context.Context, obj db.IStandaloneModel,
|
||||
// Flow: stop -> modify startvm script for rescue -> start
|
||||
guest := obj.(*models.SGuest)
|
||||
// Check if guest is running
|
||||
if guest.Status == api.VM_RUNNING || guest.Status == api.VM_RESCUING {
|
||||
if guest.Status == api.VM_RUNNING || guest.Status == api.VM_RESCUE {
|
||||
self.StopServer(ctx, guest)
|
||||
} else {
|
||||
self.ClearRescue(ctx, guest)
|
||||
|
||||
Reference in New Issue
Block a user