Automatic merge from release/2.2.0 -> release/2.3.0

* commit 'e267bc77f2f130b62bc088b9167633c6c5761e8e':
  修正:host undo convert失败
This commit is contained in:
邱剑
2018-11-13 11:38:02 +08:00
+5
View File
@@ -25,6 +25,11 @@ func init() {
func (self *GuestDeleteTask) OnInit(ctx context.Context, obj db.IStandaloneModel, data jsonutils.JSONObject) {
guest := obj.(*models.SGuest)
host := guest.GetHost()
if guest.Hypervisor == models.HYPERVISOR_BAREMETAL && host.HostType != models.HOST_TYPE_BAREMETAL {
self.OnGuestStopComplete(ctx, obj, data)
return
}
self.SetStage("on_guest_stop_complete", nil)
err := guest.GetDriver().RequestStopGuestForDelete(ctx, guest, self)
if err != nil {