Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

castorsky
Copy link
Contributor

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.

Note: compatibility with Proxmox VE version < 8.0.0 was broken since the API was changed upstream.

Additionally, I made a brief refactoring of methods in proxmox_disk module and added one new method to the proxmox module utility (api_task_complete). This method expands the api_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
  • Bugfix Pull Request
  • Refactoring Pull Request
COMPONENT NAME

proxmox_disk

ADDITIONAL INFORMATION

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.
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module module_utils module_utils plugins plugin (any type) labels Dec 16, 2024
@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Dec 16, 2024
@ansibullbot ansibullbot removed ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Dec 16, 2024
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-9 Automatically create a backport for the stable-9 branch backport-10 Automatically create a backport for the stable-10 branch labels Dec 16, 2024
Copy link
Collaborator

@russoz russoz left a 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.

Co-authored-by: Alexei Znamensky <[email protected]>
Copy link
Collaborator

@russoz russoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@felixfontein
Copy link
Collaborator

Hmm, does

Note: compatibility with Proxmox VE version < 8.0.0 was broken since the API was changed upstream.

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.

@castorsky
Copy link
Contributor Author

this PR is backwards incompatible with versions of Proxmox where this module works fine

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.

@felixfontein
Copy link
Collaborator

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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-9 Automatically create a backport for the stable-9 branch backport-10 Automatically create a backport for the stable-10 branch bug This issue/PR relates to a bug check-before-release PR will be looked at again shortly before release and merged if possible. module_utils module_utils module module plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants