fix(region): eip_allocate_task: set eip status allocate_fail on task failure

This commit is contained in:
Yousong Zhou
2020-12-16 17:42:58 +08:00
parent 4a8eee0db3
commit 719a9608c7
+1
View File
@@ -39,6 +39,7 @@ func init() {
}
func (self *EipAllocateTask) onFailed(ctx context.Context, eip *models.SElasticip, reason jsonutils.JSONObject) {
eip.SetStatus(self.UserCred, api.EIP_STATUS_ALLOCATE_FAIL, reason.String())
self.setGuestAllocateEipFailed(eip, reason)
self.SetStageFailed(ctx, reason)
}