Merge pull request #5143 from wanyaoqi/bugfix/wyq/misc-fix-200217

misc bugfix: check scsi driver on add disk
This commit is contained in:
yunion-ci-robot
2020-02-18 09:39:38 +08:00
committed by GitHub
4 changed files with 43 additions and 2 deletions
+1
View File
@@ -2124,6 +2124,7 @@ func (self *SGuest) PerformAttachnetwork(ctx context.Context, userCred mcclient.
defer host.ClearSchedDescCache()
for i := 0; i < count; i++ {
_, err = self.attach2NetworkDesc(ctx, userCred, host, input.Nets[i], pendingUsage, nil)
logclient.AddSimpleActionLog(self, logclient.ACT_ATTACH_NETWORK, input.Nets[i], userCred, err == nil)
if err != nil {
quotas.CancelPendingUsage(ctx, userCred, pendingUsage, pendingUsage)
return nil, httperrors.NewBadRequestError(err.Error())
@@ -29,6 +29,7 @@ func (self *HAGuestDeployTask) OnDeployGuestComplete(
}
func (self *HAGuestDeployTask) DeployBackup(ctx context.Context, guest *models.SGuest, data jsonutils.JSONObject) {
self.SetStage("OnDeploySlaveGuestComplete", nil)
host := models.HostManager.FetchHostById(guest.BackupHostId)
err := guest.GetDriver().RequestDeployGuestOnHost(ctx, guest, host, self)
if err != nil {