-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: clear message on why snapshot creation failed #165
Comments
If we had the Correlation ID of the request, we could check in our internal tracing system what exactly went wrong, but it looks like the Packer Plugin has no way to to enable those yet. I will open a PR for this. I have also opened hetznercloud/hcloud-go#411 to make sure we print the trace id for any server errors. |
Packer automatically redirects the output from go `log` to wherever it needs to be. If users set `PACKER_LOG=1`, the logs will be printed to `stderr`. https://developer.hashicorp.com/packer/docs/plugins/creation#logging-and-debugging Closes #165
🤖 I have created a release *beep* *boop* --- ## [1.4.0](v1.3.0...v1.4.0) (2024-05-06) ### Features * enable hcloud-go debug logging ([#167](#167)) ([1ab544e](1ab544e)), closes [#165](#165) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Both improvements were released in 1.4.0, so if this ever happens again, please open a new ticket with the improved error message :) |
We are still facing this issue and this happened to me 5-6 times during the weekend. In most cases it's going well but sometimes it's existing with ==> hcloud: This can take some time
==> hcloud: Could not create snapshot: Creating image failed because of an unknown error. (unknown_error)
==> hcloud: Provisioning step had errors: Running the cleanup provisioner, if present...
==> hcloud: Destroying server...
==> hcloud: Deleting temporary SSH key...
Build 'hcloud' errored after 11 minutes 15 seconds: Could not create snapshot: Creating image failed because of an unknown error. (unknown_error)
==> Wait completed after 11 minutes 15 seconds
==> Some builds didn't complete successfully and had errors:
--> hcloud: Could not create snapshot: Creating image failed because of an unknown error. (unknown_error)
==> Builds finished but no artifacts were created.
$ packer version
Packer v1.9.5
Your version of Packer is out of date! The latest version
is 1.10.3. You can update by downloading from www.packer.io/downloads
$ packer plugins installed
/home/k7/.config/packer/plugins/github.com/hetznercloud/hcloud/packer-plugin-hcloud_v1.4.0_x5.0_linux_amd64 |
Weird that the correlation IDs are not in the error messages, I just tested myself, and the correlation IDs are present in the API response headers for this endpoint. Could you please double-check the version of the hcloud packer plugin that you are using? To fix your issue, I suggest that you open a support ticket so we can share more data, and debug this further. |
I build a lot snapshots with
packer-plugin-hcloud
for quick iterations and lately I'm experiencing the following error.Build 'hcloud' errored after 13 minutes 2 seconds: Could not create snapshot: Creating image failed because of an unknown error. (unknown_error)
The only solution we have for now is to trigger the build again. This issue requests having a clear message on why the snapshot was not created. Was it timed out or something else happened?
Happy to provider more inputs here if required.
The text was updated successfully, but these errors were encountered: