Closed yujunz closed 5 years ago
@yujunz, did you solve the problem? Thanks.
No. I didn't go further in this issue.
I also confirmed this error happened.
I also come to meet with this error when building ecs image without any vpc setting.
The reason is that packer does not delete the vswitch before delete the vpc.
My solution is:
As you create the vpc manually, packer will not try to delete the vpc and there will no error appear.
@yujunz @li-wu @mosuke5
This should be a bug and need to be fixed.
@yujunz @mosuke5 Packer will try to delete the resource it created, but the resource cleanup has dependence. In generally the dependency result can be cleanup in one minute. I can increase the waiting time to reduce the error like this, but if you can provide more information is better that I can check what's the real reason lead the dependency can't be release in time?
@zhuzhih2017 error log:
alicloud-ecs: Error deleting vpc, it may still be around: Aliyun API Error: RequestId: 5AA4595B-5AF2-41C2-BE1B-CA4506EA38BB Status Code: 400 Code: Forbbiden Message: Active custom route in vpc.
@zhuzhih2017 here is the error log:
alicloud-ecs: Error deleting vpc, it may still be around: Aliyun API Error: RequestId: 2800BBD5-04A3-49C8-85A1-8F6D7148FB0B Status Code: 400 Code: Forbbiden Message: Active custom route in vpc.
@willmao , thanks for providing the workaround. I will have a try.
@willmao , I tried your solution: create a VPC and delete the virtual switch in it and add and option with vpc_id: <vpc id>
but it failed with error: errored: The specified vpc {vpc id} doesn't exist.
any suggestion?
@li-wu just make sure the vpc_id field is correctly set.
@li-wu i have made a PR to the packer official repo and fixed this issue.
@willmao Thanks for providing the fix.
if this is now fixed should this be closed?
The images created successfully but error deleting VPC.
The vpc can be deleted from console successfully although it includes a route table.