mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #474 from ioito/bugfix/qx-rebuild-root
避免一些公有云重装系统后数据未刷新导致任务失败
This commit is contained in:
@@ -368,12 +368,15 @@ func (self *SManagedVirtualizedGuestDriver) RemoteDeployGuestForRebuildRoot(ctx
|
||||
time.Sleep(time.Second * 5)
|
||||
waited += 5
|
||||
} else {
|
||||
if idisks[0].GetGlobalId() != diskId {
|
||||
log.Errorf("system disk id inconsistent %s != %s", idisks[0].GetGlobalId(), diskId)
|
||||
if idisks[0].GetGlobalId() == diskId {
|
||||
break
|
||||
}
|
||||
if waited > maxWaitSecs {
|
||||
return nil, fmt.Errorf("inconsistent sys disk id after rebuild root")
|
||||
}
|
||||
|
||||
break
|
||||
log.Debugf("current system disk id inconsistent %s != %s, try after 5 seconds", idisks[0].GetGlobalId(), diskId)
|
||||
time.Sleep(time.Second * 5)
|
||||
waited += 5
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user