-
Notifications
You must be signed in to change notification settings - Fork 1.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
Improve Proxmox volume handling #8542
Improve Proxmox volume handling #8542
Conversation
using black via trunk.io
- make mount creation idempotent: Mounts created using the special syntax "<storage>:<size>" no longer create a new volume each time - add new keys for easier mount creation & management
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.
Thanks for your contribution!
Link to pull request Co-authored-by: Felix Fontein <[email protected]>
- Fix options defined as values - Document mutual exclusivity - Fix option hierarchy - Add version_added tag
This comment was marked as outdated.
This comment was marked as outdated.
This reverts commit ca7214f.
This comment was marked as outdated.
This comment was marked as outdated.
Update documentation wording Co-authored-by: Felix Fontein <[email protected]>
Update documentation wording Co-authored-by: Felix Fontein <[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.
hi @Lithimlin
Thanks for your contribution! I got a few comments on it, see below.
Add suggested punctuation to documentation Co-authored-by: Alexei Znamensky <[email protected]>
Accept suggested review change Co-authored-by: Alexei Znamensky <[email protected]>
@Lithimlin This PR contains |
cdcc844
to
2d364aa
Compare
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
If nobody objects I'll merge this tomorrow. |
Backport to stable-9: 💚 backport PR created✅ Backport PR branch: Backported as #8622 🤖 @patchback |
* proxmox: basic linting using black via trunk.io * proxmox: refactor mount handling (#8407) - make mount creation idempotent: Mounts created using the special syntax "<storage>:<size>" no longer create a new volume each time - add new keys for easier mount creation & management * proxmox: add changelog fragment * proxmox(fix): fix occasional syntax error * Update changelogs/fragments/8542-fix-proxmox-volume-handling.yml Link to pull request Co-authored-by: Felix Fontein <[email protected]> * Update documentation - Fix options defined as values - Document mutual exclusivity - Fix option hierarchy - Add version_added tag * Revert "proxmox: basic linting" This reverts commit ca7214f. * proxmox: Fix documentation * Fix list identifier in documentation * pass volume options as dict instead of list * Update plugins/modules/proxmox.py Update documentation wording Co-authored-by: Felix Fontein <[email protected]> * Update plugins/modules/proxmox.py Update documentation wording Co-authored-by: Felix Fontein <[email protected]> * proxmox: ensure values of `disk_volume` and `mount_volumes.*` dicts are strings * proxmox(fix): correct indentation * Apply suggestions from code review: punctuation Add suggested punctuation to documentation Co-authored-by: Alexei Znamensky <[email protected]> * Update plugins/modules/proxmox.py: vol_string building Accept suggested review change Co-authored-by: Alexei Znamensky <[email protected]> * proxmox: Use better string check and conversion --------- Co-authored-by: Felix Fontein <[email protected]> Co-authored-by: Alexei Znamensky <[email protected]> (cherry picked from commit 6cefde6)
@Lithimlin thanks for your contribution! |
#8622) Improve Proxmox volume handling (#8542) * proxmox: basic linting using black via trunk.io * proxmox: refactor mount handling (#8407) - make mount creation idempotent: Mounts created using the special syntax "<storage>:<size>" no longer create a new volume each time - add new keys for easier mount creation & management * proxmox: add changelog fragment * proxmox(fix): fix occasional syntax error * Update changelogs/fragments/8542-fix-proxmox-volume-handling.yml Link to pull request Co-authored-by: Felix Fontein <[email protected]> * Update documentation - Fix options defined as values - Document mutual exclusivity - Fix option hierarchy - Add version_added tag * Revert "proxmox: basic linting" This reverts commit ca7214f. * proxmox: Fix documentation * Fix list identifier in documentation * pass volume options as dict instead of list * Update plugins/modules/proxmox.py Update documentation wording Co-authored-by: Felix Fontein <[email protected]> * Update plugins/modules/proxmox.py Update documentation wording Co-authored-by: Felix Fontein <[email protected]> * proxmox: ensure values of `disk_volume` and `mount_volumes.*` dicts are strings * proxmox(fix): correct indentation * Apply suggestions from code review: punctuation Add suggested punctuation to documentation Co-authored-by: Alexei Znamensky <[email protected]> * Update plugins/modules/proxmox.py: vol_string building Accept suggested review change Co-authored-by: Alexei Znamensky <[email protected]> * proxmox: Use better string check and conversion --------- Co-authored-by: Felix Fontein <[email protected]> Co-authored-by: Alexei Znamensky <[email protected]> (cherry picked from commit 6cefde6) Co-authored-by: JL Euler <[email protected]>
I noticed a problem that I hadn't tested after my last commit: @felixfontein since this was your comment, I'd like to talk about the conversion again. |
* proxmox: basic linting using black via trunk.io * proxmox: refactor mount handling (ansible-collections#8407) - make mount creation idempotent: Mounts created using the special syntax "<storage>:<size>" no longer create a new volume each time - add new keys for easier mount creation & management * proxmox: add changelog fragment * proxmox(fix): fix occasional syntax error * Update changelogs/fragments/8542-fix-proxmox-volume-handling.yml Link to pull request Co-authored-by: Felix Fontein <[email protected]> * Update documentation - Fix options defined as values - Document mutual exclusivity - Fix option hierarchy - Add version_added tag * Revert "proxmox: basic linting" This reverts commit ca7214f. * proxmox: Fix documentation * Fix list identifier in documentation * pass volume options as dict instead of list * Update plugins/modules/proxmox.py Update documentation wording Co-authored-by: Felix Fontein <[email protected]> * Update plugins/modules/proxmox.py Update documentation wording Co-authored-by: Felix Fontein <[email protected]> * proxmox: ensure values of `disk_volume` and `mount_volumes.*` dicts are strings * proxmox(fix): correct indentation * Apply suggestions from code review: punctuation Add suggested punctuation to documentation Co-authored-by: Alexei Znamensky <[email protected]> * Update plugins/modules/proxmox.py: vol_string building Accept suggested review change Co-authored-by: Alexei Znamensky <[email protected]> * proxmox: Use better string check and conversion --------- Co-authored-by: Felix Fontein <[email protected]> Co-authored-by: Alexei Znamensky <[email protected]>
* proxmox: basic linting using black via trunk.io * proxmox: refactor mount handling (ansible-collections#8407) - make mount creation idempotent: Mounts created using the special syntax "<storage>:<size>" no longer create a new volume each time - add new keys for easier mount creation & management * proxmox: add changelog fragment * proxmox(fix): fix occasional syntax error * Update changelogs/fragments/8542-fix-proxmox-volume-handling.yml Link to pull request Co-authored-by: Felix Fontein <[email protected]> * Update documentation - Fix options defined as values - Document mutual exclusivity - Fix option hierarchy - Add version_added tag * Revert "proxmox: basic linting" This reverts commit ca7214f. * proxmox: Fix documentation * Fix list identifier in documentation * pass volume options as dict instead of list * Update plugins/modules/proxmox.py Update documentation wording Co-authored-by: Felix Fontein <[email protected]> * Update plugins/modules/proxmox.py Update documentation wording Co-authored-by: Felix Fontein <[email protected]> * proxmox: ensure values of `disk_volume` and `mount_volumes.*` dicts are strings * proxmox(fix): correct indentation * Apply suggestions from code review: punctuation Add suggested punctuation to documentation Co-authored-by: Alexei Znamensky <[email protected]> * Update plugins/modules/proxmox.py: vol_string building Accept suggested review change Co-authored-by: Alexei Znamensky <[email protected]> * proxmox: Use better string check and conversion --------- Co-authored-by: Felix Fontein <[email protected]> Co-authored-by: Alexei Znamensky <[email protected]>
and ansible-collections#8720 It is still not working and maybe my attempt to allow fractional volume sizes again broke something, too.
SUMMARY
Fixes #8407
Makes the creation of new volumes idempotent and adds new keys with better readability.
ISSUE TYPE
COMPONENT NAME
proxmox
ADDITIONAL INFORMATION
Here is a sample playbook to test the new features/bug fixes:
Note: To test bind mounting, we actually need to use the
root@pam
user with its password. Even a token owned by that user will not work due to missing permissions.Output: