-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Openstack provider : after image upgrade, refresh fails #2189
Comments
@fdebonneval Did you use the UUID in your Terraform config? Or did you use a "common" name such as "Ubuntu 14.04"?
Most cloud providers will keep the same "common" name when doing an image update. This way, though the UUID may change, the name used to reference the image stays the same. If you used the UUID, you may be able to change it in the Terraform state file, but I'm not 100% sure about that. If you didn't use the UUID, though, let me know. I'm quite curious to see why this error would occur and if it's possible to fix. |
Hi Jo, Thanks for tour concern about my issue. I used the uuid in my .tf stack. It seems that in the "cache update" phase terraform collects the running Then it stops because it finds a diff with the new uuid. To quick fix, I manually destroyed the vms and run "apply". Foucault
|
Just re-reviewing this issue. I think it can be closed since this really isn't a bug in the code. It's an unfortunate side-effect of referencing images by UUID and having the image yanked from the image catalog -- so totally outside of Terraform. |
SGTM - thanks @jtopjian! |
I just ran into this issue, and I'm not sure I agree. Couldn't terraform handle this more gracefully, and assume that if the image is not found it no longer exists? Is there any reason not to proceed with planning/applying on the assumption that the image has changed? |
Hi @cpitman - reviewing again, I think you're right that TF shouldn't error out on refresh / plan, even if the image does disappear out from under us. Reopening so we can take a second look at the failure mode here. |
The reason I brushed this off as a non-TF issue was that this would effectively make However, after re-re-reviewing all of the above, I do see that I overlooked the obvious: maybe the implementation for this would all take place during the "update" phase? So, during creation, error out if an image cannot be found. But during the update, forcefully make the image data Is this a suitable fix? Or is there a pattern/solution more closer to the Terraform core that should be used? Is this situation present in any other provider, and if so, how is it resolved there? |
Looks perfect aproach to me. Thx
|
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Hi,
I deployed a stack on our Openstack env, everything went well.
Our ops team upgraded the Ubuntu image I used to boot my vms (image uuid changed).
The image ID changed so when terraform tried to refresh the local state file, I had an error because the original image was not available anymore in Glance catalog.
I'am now stuck, neither "plan", "destroy", "apply" go through. It ends with the error :
Error refreshing state: 5 error(s) occurred:
{"itemNotFound": {"message": "Image not found.", "code": 404}}
[...]
The text was updated successfully, but these errors were encountered: