From bda1319d1c5d0af48058f6a79154c687afc31709 Mon Sep 17 00:00:00 2001 From: ioito Date: Sat, 20 Apr 2019 19:07:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3openstack=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/util/openstack/instance.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/util/openstack/instance.go b/pkg/util/openstack/instance.go index e8227e9d4a..56eb4cc26b 100644 --- a/pkg/util/openstack/instance.go +++ b/pkg/util/openstack/instance.go @@ -328,8 +328,8 @@ func (instance *SInstance) GetStatus() string { case INSTANCE_STATUS_RESIZE: return api.VM_CHANGE_FLAVOR case INSTANCE_STATUS_VERIFY_RESIZE: - /// return INSTANCE_STATUS_VERIFY_RESIZE ??? use sync_status instead - return api.VM_SYNCING_STATUS + // API请求更改配置后,会有一个确认的状态,即此状态 + return api.VM_CHANGE_FLAVOR case INSTANCE_STATUS_SHELVED, INSTANCE_STATUS_SHELVED_OFFLOADED, INSTANCE_STATUS_SHUTOFF, INSTANCE_STATUS_SOFT_DELETED: return api.VM_READY default: @@ -448,7 +448,7 @@ func (region *SRegion) ChangeConfig(instance *SInstance, flavorId string) error if err != nil { return err } - if err := cloudprovider.WaitStatus(instance, INSTANCE_STATUS_VERIFY_RESIZE, time.Second*3, time.Minute*4); err != nil { + if err := cloudprovider.WaitStatus(instance, api.VM_CHANGE_FLAVOR, time.Second*3, time.Minute*4); err != nil { return err } return region.instanceOperation(instance.ID, "confirmResize")