fix(region): avoid network create failed when vpc is ok but wire not sync

This commit is contained in:
Qu Xuan
2021-04-21 14:50:05 +08:00
parent 09c3527fa7
commit 63a2faea7d
+5 -4
View File
@@ -1234,15 +1234,16 @@ func (self *SManagedVirtualizationRegionDriver) RequestCreateVpc(ctx context.Con
}
}
err = vpc.SyncRemoteWires(ctx, userCred)
if err != nil {
return nil, errors.Wrap(err, "vpc.SyncRemoteWires")
}
err = vpc.SyncWithCloudVpc(ctx, userCred, ivpc, nil)
if err != nil {
return nil, errors.Wrap(err, "vpc.SyncWithCloudVpc")
}
err = vpc.SyncRemoteWires(ctx, userCred)
if err != nil {
return nil, errors.Wrap(err, "vpc.SyncRemoteWires")
}
return nil, nil
})
return nil