tencentcloud-cvm Failed to wait for instance ready: instance(ins-xxxx) not exist
Opened this issue · 10 comments
This issue was originally opened by @virain as hashicorp/packer#10396. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Overview of the Issue
I used the packer to package the image. An ansible syntax error occurred. The packer stopped running and deleted the instance. After running the packer again, the prompt failed to wait for instance ready: instance (INS XXX) not exist
packer 1.6.5
error logs
==> tencentcloud-cvm.tencentcloud: Trying to use existing securitygroup: sg-ni4d1vkh...
tencentcloud-cvm.tencentcloud: Securitygroup found: default
2020/12/16 17:39:08 packer-builder-tencentcloud-cvm plugin: 2020/12/16 17:39:08 step_run_instance.go:198: [DEBUG]getUserData: user_data:
==> tencentcloud-cvm.tencentcloud: Trying to create a new instance...
tencentcloud-cvm.tencentcloud: Waiting for instance ready
==> tencentcloud-cvm.tencentcloud: Failed to wait for instance ready: instance(ins-jnoiqr60) not exist
==> tencentcloud-cvm.tencentcloud: Deleting instance because of error...
==> tencentcloud-cvm.tencentcloud: Failed to terminate instance(ins-jnoiqr60), please delete it manually: [TencentCloudSDKError] Code=InvalidInstanceId.NotFound, Message=The specified instance ID `['ins-jnoiqr60']` is not found., RequestId=ccb15216-aac2-4344-ae56-d8579418acfe
==> tencentcloud-cvm.tencentcloud: Deleting keypair because of error...
2020/12/16 17:39:09 [INFO] (telemetry) ending
==> Wait completed after 3 seconds 64 milliseconds
Build 'tencentcloud-cvm.tencentcloud' errored after 3 seconds 64 milliseconds: instance(ins-jnoiqr60) not exist
Hello @virain
Sorry for the long long delay due to no notifications.
Is this happen now?
Hello @virain
I am sorry about that, I have try create a image and confirm it works.
If you still have any problems, please post it here.
@likexian Now the same problem occurs again. This time, after packaging multiple images successfully, the error invalidinstanceid.notfound occurs again. It seems that CVM was not created successfully, packer could not get the instance, and I could not see the creation of CVM from Tencent cloud console.Does the API have restrictions on creating CVMs, which makes it impossible to create CVMs after creating a certain number of CVMs?
==> tencentcloud-cvm.tencentcloud: Trying to create a new instance...
==> tencentcloud-cvm.tencentcloud: Trying to create a new instance...
tencentcloud-cvm.tencentcloud: Subnet found: default
==> tencentcloud-cvm.tencentcloud: Trying to use existing securitygroup: sg-ni4d1vkh...
tencentcloud-cvm.tencentcloud: Subnet found: default
==> tencentcloud-cvm.tencentcloud: Trying to use existing securitygroup: sg-ni4d1vkh...
tencentcloud-cvm.tencentcloud: Waiting for instance ready
tencentcloud-cvm.tencentcloud: Waiting for instance ready
tencentcloud-cvm.tencentcloud: Securitygroup found: default
2021/11/13 14:32:35 packer-builder-tencentcloud-cvm plugin: 2021/11/13 14:32:35 step_run_instance.go:198: [DEBUG]getUserData: user_data:
==> tencentcloud-cvm.tencentcloud: Trying to create a new instance...
tencentcloud-cvm.tencentcloud: Securitygroup found: default
2021/11/13 14:32:36 packer-builder-tencentcloud-cvm plugin: 2021/11/13 14:32:36 step_run_instance.go:198: [DEBUG]getUserData: user_data:
==> tencentcloud-cvm.tencentcloud: Trying to create a new instance...
tencentcloud-cvm.tencentcloud: Waiting for instance ready
tencentcloud-cvm.tencentcloud: Waiting for instance ready
==> tencentcloud-cvm.tencentcloud: Failed to wait for instance ready: instance(ins-lf982wdg) not exist
==> tencentcloud-cvm.tencentcloud: Deleting instance because of error...
==> tencentcloud-cvm.tencentcloud: Failed to wait for instance ready: instance(ins-qfv552ci) not exist
==> tencentcloud-cvm.tencentcloud: Deleting instance because of error...
==> tencentcloud-cvm.tencentcloud: Failed to wait for instance ready: instance(ins-dxj5drnm) not exist
==> tencentcloud-cvm.tencentcloud: Deleting instance because of error...
==> tencentcloud-cvm.tencentcloud: Failed to terminate instance(ins-lf982wdg), please delete it manually: [TencentCloudSDKError] Code=InvalidInstanceId.NotFound, Message=The specified instance ID `['ins-lf982wdg']` is not found., RequestId=a8ff558e-7a6f-47ad-818e-f95a43f0fc08
2021/11/13 14:32:36 [INFO] (telemetry) ending tencentcloud-cvm.tencentcloud
Build 'tencentcloud-cvm.tencentcloud' errored after 2 seconds 462 milliseconds: instance(ins-lf982wdg) not exist
2021/11/13 14:32:36 [INFO] (telemetry) ending tencentcloud-cvm.tencentcloud
==> tencentcloud-cvm.tencentcloud: Failed to terminate instance(ins-qfv552ci), please delete it manually: [TencentCloudSDKError] Code=InvalidInstanceId.NotFound, Message=The specified instance ID `['ins-qfv552ci']` is not found., RequestId=f0abe63c-1399-4ad9-bfd4-6b025769923e
Build 'tencentcloud-cvm.tencentcloud' errored after 2 seconds 477 milliseconds: instance(ins-qfv552ci) not exist
==> tencentcloud-cvm.tencentcloud: Failed to wait for instance ready: instance(ins-m5qgd6km) not exist
==> tencentcloud-cvm.tencentcloud: Deleting instance because of error...
2021/11/13 14:32:36 [INFO] (telemetry) ending tencentcloud-cvm.tencentcloud
==> tencentcloud-cvm.tencentcloud: Failed to terminate instance(ins-dxj5drnm), please delete it manually: [TencentCloudSDKError] Code=InvalidInstanceId.NotFound, Message=The specified instance ID `['ins-dxj5drnm']` is not found., RequestId=e2be99c0-2f7a-4beb-819b-458687f00c5d
Build 'tencentcloud-cvm.tencentcloud' errored after 2 seconds 650 milliseconds: instance(ins-dxj5drnm) not exist
==> tencentcloud-cvm.tencentcloud: Failed to terminate instance(ins-m5qgd6km), please delete it manually: [TencentCloudSDKError] Code=InvalidInstanceId.NotFound, Message=The specified instance ID `['ins-m5qgd6km']` is not found., RequestId=2dcd4b8f-a9d4-4d27-9829-dc3c5bc2575a
2021/11/13 14:32:36 [INFO] (telemetry) ending tencentcloud-cvm.tencentcloud
==> Wait completed after 2 seconds 749 milliseconds
2021/11/13 14:32:36 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2021/11/13 14:32:36 machine readable: tencentcloud-cvm.tencentcloud,error []string{"instance(ins-m5qgd6km) not exist"}
==> Builds finished but no artifacts were created.
2021/11/13 14:32:36 [INFO] (telemetry) Finalizing.
Build 'tencentcloud-cvm.tencentcloud' errored after 2 seconds 749 milliseconds: instance(ins-m5qgd6km) not exist
==> Wait completed after 2 seconds 749 milliseconds
==> Some builds didn't complete successfully and had errors:
--> tencentcloud-cvm.tencentcloud: instance(ins-m5qgd6km) not exist
==> Builds finished but no artifacts were created.
2021/11/13 14:32:38 waiting for all plugin processes to complete...
2021/11/13 14:32:38 /usr/bin/packer: plugin process exited
2021/11/13 14:32:38 /usr/bin/packer: plugin process exited
2021/11/13 14:32:38 /usr/bin/packer: plugin process exited
2021/11/13 14:32:38 /usr/bin/packer: plugin process exited
@virain not sure if it’s the same issue that I face. Try changing the instance name?
@virain not sure if it’s the same issue that I face. Try changing the instance name?
Yep,Change the instance name to create
Yes, try change the instance name, when there are multiple buildings, uses difference instance name.