mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Automatic merge from release/2.2.0 -> release/2.3.0
* commit 'e267bc77f2f130b62bc088b9167633c6c5761e8e': 修正:host undo convert失败
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user