Skip to content

Commit

Permalink
fix(host): backup guest dirty shutdown (#19620)
Browse files Browse the repository at this point in the history
backup guest dirty shutdown master request sync status,
slave request dirty start.
  • Loading branch information
wanyaoqi authored Mar 5, 2024
1 parent 3e1e6a7 commit 023c365
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/hostman/guestman/qemu-kvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 023c365

Please sign in to comment.