hashicorp / packer-plugin-tencentcloud

Packer plugin for Tencent Cloud Image Builder
https://www.packer.io/docs/builders/tencentcloud-cvm
Mozilla Public License 2.0
8 stars 12 forks source link

[TencentCloud] `source_image_name` failed to retrieve source image by name #5

Closed ghost closed 1 year ago

ghost commented 3 years ago

This issue was originally opened by @jianzhiteh as hashicorp/packer#10682. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


Overview of the Issue

We try to query source_image_name by passing in the custom image name we want to create our new image from, but the build seems failed with error below:

Reference - Feature Request: https://github.com/hashicorp/packer/issues/9548

❯ packer build tencentcloud-cfs.json
tencentcloud-cvm: output will be in this color.

==> tencentcloud-cvm: Trying to check image name: our-image-name...
    tencentcloud-cvm: Image name: useable
==> tencentcloud-cvm: Trying to check source image: ...
==> tencentcloud-cvm: No image found under current instance_type(S2.MEDIUM4) restriction
Build 'tencentcloud-cvm' errored after 2 seconds 239 milliseconds: No image found under current instance_type(S2.MEDIUM4) restriction

Reproduction Steps

Steps to reproduce this issue

packer build

Packer version

1.7.0

Simplified Packer Buildfile

"source_image_name": "our-source-image-name",

Log Fragments and crash.log files

tencentcloud-cvm: output will be in this color.
2021/02/23 15:51:26 Force build: false

2021/02/23 15:51:26 On error: 
2021/02/23 15:51:26 Waiting on builds to complete...
2021/02/23 15:51:26 Starting build run: tencentcloud-cvm
2021/02/23 15:51:26 Running builder: tencentcloud-cvm
2021/02/23 15:51:26 [INFO] (telemetry) Starting builder tencentcloud-cvm
==> tencentcloud-cvm: Trying to check image name: our-image-name...
    tencentcloud-cvm: Image name: useable
==> tencentcloud-cvm: Trying to check source image: ...
2021/02/23 15:51:28 [INFO] (telemetry) ending tencentcloud-cvm
==> tencentcloud-cvm: No image found under current instance_type(S2.MEDIUM4) restriction
==> Wait completed after 1 second 730 milliseconds
2021/02/23 15:51:28 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2021/02/23 15:51:28 machine readable: tencentcloud-cvm,error []string{"No image found under current instance_type(S2.MEDIUM4) restriction"}
==> Builds finished but no artifacts were created.
2021/02/23 15:51:28 [INFO] (telemetry) Finalizing.
Build 'tencentcloud-cvm' errored after 1 second 730 milliseconds: No image found under current instance_type(S2.MEDIUM4) restriction

==> Wait completed after 1 second 730 milliseconds

==> Some builds didn't complete successfully and had errors:
--> tencentcloud-cvm: No image found under current instance_type(S2.MEDIUM4) restriction
likexian commented 3 years ago

Hello @jianzhiteh Sorry for the long long delay due to no notifications. What is you image full name in tencentcloud?

likexian commented 3 years ago

Hello @jianzhiteh I have test it and confirm it works. Please check you source image name included our-source-image-name and in the same region. If you still have problem, please post your config and source image name here, thanks.

nywilken commented 1 year ago

Going to close as this seems to be resolved. If I am mistaken please feel free to comment on the thread and I will reopen.