mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(host): backup guest dirty shutdown (#19620)
backup guest dirty shutdown master request sync status, slave request dirty start.
This commit is contained in:
@@ -920,8 +920,11 @@ func (s *SKVMGuestInstance) ImportServer(pendingDelete bool) {
|
||||
if s.IsDirtyShotdown() && !pendingDelete {
|
||||
log.Infof("Server dirty shutdown or a daemon %s", s.GetName())
|
||||
|
||||
if s.Desc.IsMaster || s.Desc.IsSlave ||
|
||||
len(s.GetNeedMergeBackingFileDiskIndexs()) > 0 {
|
||||
if len(s.GetNeedMergeBackingFileDiskIndexs()) > 0 {
|
||||
go s.DirtyServerRequestStart()
|
||||
} else if s.Desc.IsMaster {
|
||||
go s.SyncStatus("Server dirty shutdown")
|
||||
} else if s.Desc.IsSlave {
|
||||
go s.DirtyServerRequestStart()
|
||||
} else {
|
||||
s.StartGuest(context.Background(), nil, jsonutils.NewDict())
|
||||
|
||||
Reference in New Issue
Block a user