-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
proxmox_disk: fix async method of resize_disk #9256
base: main
Are you sure you want to change the base?
Conversation
Rewritten resizing of disk into separated function and used async method to retrieve task result. Additionally, rewritten function to detect failed tasks early, without waiting for timeout.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @castorsky thanks for your contribution!
Just two tiny adjustments in the changelog fragment formatting and we should be good to go.
changelogs/fragments/9256-proxmox_disk-fix-async-method-of-resize_disk.yml
Outdated
Show resolved
Hide resolved
changelogs/fragments/9256-proxmox_disk-fix-async-method-of-resize_disk.yml
Outdated
Show resolved
Hide resolved
Co-authored-by: Alexei Znamensky <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hmm, does
mean that this PR is backwards incompatible with versions of Proxmox where this module works fine? If that's the case, then the fix needs to be adjusted so it still works fine with older versions. |
Hi, @felixfontein! Yes, this is the case which was discussed in #9199 and which still has no clear answer. Should we support old PVE versions that were abandoned by upstream? IMO supporting of legacy unsupported version should be maintained by users of said versions themselves. I have a workaround, but I still think that this leads to module bloat. |
There has been an answer to that: #9199 (comment) As long as we do not explicitly drop support for versions we currently support (even if they have been EOLed for a long time), we have to keep support for them working. To change that we have to explicitly deprecate support and only drop it in a new major release. So for future versions we might not need to support older Proxmox versions, but for current versions we must. |
SUMMARY
This PR closes issue #9254 which was based on PR #7969.
Method for resizing disk is now aware of using asyncronous API
PUT
endpoint and correctly handles messages about errors.Additionally, I made a brief refactoring of methods in
proxmox_disk
module and added one new method to theproxmox
module utility (api_task_complete
). This method expands theapi_task_ok
method in terms of errors and timeout handling - it waits for task to complete and returns an error message if task was completed but not succesful.ISSUE TYPE
COMPONENT NAME
proxmox_disk
ADDITIONAL INFORMATION