ctyun sync fix

This commit is contained in:
tangbin
2020-02-15 16:55:30 +08:00
parent 8174145cd2
commit 5f2beae099
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -221,7 +221,7 @@ func (self *SManagedVirtualizedGuestDriver) RequestAttachDisk(ctx context.Contex
return nil, errors.Wrapf(err, "iVM.AttachDisk")
}
err = cloudprovider.Wait(time.Second*5, time.Minute*3, func() (bool, error) {
err = cloudprovider.Wait(time.Second*10, time.Minute*6, func() (bool, error) {
err := iVM.Refresh()
if err != nil {
return false, errors.Wrapf(err, "iVM.Refresh")
+5
View File
@@ -134,6 +134,11 @@ func (self *SEip) GetINetworkId() string {
func (self *SEip) GetAssociationType() string {
orders, err := self.region.GetOrder(self.WorkOrderResourceID)
if err != nil {
// bugfix: 由于没有接口可以返向查询出关联的device,这里默认关联的是server
if len(self.PortID) > 0 || len(self.PrivateIPAddress) > 0 {
return api.EIP_ASSOCIATE_TYPE_SERVER
}
log.Errorf("SEip.GetAssociationType %s", err)
return ""
}