-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
DigitalOcean: Reference base image by previous snapshot name #3252
Comments
Thanks for the report. Can you try using the format |
@cbednarski Thanks for the response. Unfortunately no, using Version 0.8.0 (June 23, 2015) introduced:
Here was a previous issue #1792 that solved it by grabbing all (private) images from DO and then comparing them by name. But that behaviour was removed introducing the DO v2 API (see commit 6c6f3c2#diff-773223d4ba1a61e81daea8a8dfcdb692L294) Image names don't have to be unique, maybe therefore they removed the support. But I would rather prefer to return the newest image with a given name. |
Got it. The change that broke this is 6d31470 The reason for the change is that if you have more than 200 images the image won't necessarily come back from the API, we don't page, and doing so would be really slow. Obviously this was necessary to do the name lookup. Unfortunately the integration tests didn't catch this case. It does not look like the API call we need for this is supported so we'll likely have to rework this. https://developers.digitalocean.com/documentation/v2/#images |
Any updates on this? |
Any movement on this issue? |
@cbednarski do you have any plans to fix this soon? |
@kaelumania PR's are welcome. |
This isn't something we're targeting for 1.0, so I'm going to close this. We rely on the community to support this builder, so the best way to get this added would be to implement it. Please see the mailing list |
I have an existing snapshot created via
"snapshot_name": "my_base_0.0.1"
and then reference it in a new resource via
"image": "my_base_0.0.1"
but I am getting the error:
https://api.digitalocean.com/v2/droplets: 422 You specified an invalid image for Droplet creation.
It seems that the logic in order to read images by name (fetching private images and comparing slug, name or id) has been removed recently. At the moment the DigitalOcean API is used directly and it does not support finding images by name. I think it is not a good packer API to allow snapshots with a name and then be unable to reference this name in a following build.
The text was updated successfully, but these errors were encountered: