Fix dead loop while the status of volume is error#126
Fix dead loop while the status of volume is error#126lbajolet-hashicorp merged 11 commits intohashicorp:mainfrom zhenggu:main
Conversation
|
@nywilken Can you help to have a review? |
lbajolet-hashicorp
left a comment
There was a problem hiding this comment.
Hey @zhenggu,
Thanks for opening this PR! I left a couple comments on the code, I think we can iterate on that and make it something simpler/more robust, but this is a good first draft imo.
Let me know when you're ready for another pass on my end, and if you need help with landing the next steps let me know!
|
@lbajolet-hashicorp As you said, we can keep the error volume for troubleshooting, I have removed the lines for bad volume cleanup, can you review it again? |
|
@lbajolet-hashicorp any change to review again? |
|
Hi @zhenggu, Apologies it took me a bit to revisit this PR again. I'm not sure I said something to the effect of "keeping the error volume for troubleshooting", but this would be valid, however I'm not certain this is a good approach broadly speaking. The I'm worried that systematically considering volume provisioning errors as an OK scenario and not cleaning-up after us will mean that there'll be a bunch of volumes to cleanup manually after the fact, so I'm cautious on this change. One thing that I probably wasn't clear with in the first place (sorry about that), was regarding the cleanup strategy, I see we have a I would suggest maybe revisiting the logic in the
Let me know if there's something else you need from me, and if you need help with the code feel free to ping, not sure when I'll be able to, but I can take a look at it as well. Thanks! |
|
@lbajolet-hashicorp I am totally agree with you, will submit a patch soon. |
|
@lbajolet-hashicorp I have updated the patch to restruct volume clean up logic, and no issue on testing, please have a review again, thanks! |
lbajolet-hashicorp
left a comment
There was a problem hiding this comment.
Hi @zhenggu,
Thanks for the reroll, this looks cleaner to me!
I left a few last comments on the code, but I think we're close to a merge, let me know what you think and I'll let you come back to me if/when you've addressed those for another round of review.
Co-authored-by: Lucas Bajolet <105649352+lbajolet-hashicorp@users.noreply.github.com>
|
@lbajolet-hashicorp have updated the code, please have a review again. |
lbajolet-hashicorp
left a comment
There was a problem hiding this comment.
LGTM, thanks for the contribution @zhenggu!
Merging now

There is a dead loop bug that while we create a volume successfully, but after that the status of the volume becomes error, because the code
packer-plugin-openstack/builder/openstack/volume.go
Line 21 in 89e8768
It can easily be reproduce by set the volume size less than the OS image size, the debug log is following: