-
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
proxmox: Add clone parameter #3930
proxmox: Add clone parameter #3930
Conversation
Hm. It fails with an error that the |
Co-authored-by: Felix Fontein <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
Ah never mind this, I wasn't running my own code :') |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
While debugging I discovered that I get "400 Bad Request: Parameter verification failed" (PVE v7.1-8) errors even when not running my own changes when I try to create a new container. So that's a bit of a bummer (and oversight that I didn't try that first 😅) |
Ah, I found the culprit. It's a bit disappointing that |
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Felix Fontein <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
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.
Looks reasonable to me. Let's see what the modue maintainers say about this.
If nobody complains, I'll merge this in a few days. |
Backport to stable-4: 💚 backport PR created✅ Backport PR branch: Backported as #3992 🤖 @patchback |
* proxmox: Add clone parameter * Add changelog fragment * Add version_added Co-authored-by: Felix Fontein <[email protected]> * Add PR URL to changelog fragment Co-authored-by: Felix Fontein <[email protected]> * Clarify what content_check does * Split up try/except block to give a separate error message when creation pre-checks fail * Create seperate case for cloning * Prevent 'clone' argument from being removed * Fix double argument, add todo's * Check if to be cloned container actually exists * Adjust module options dependencies * Require 'storage' parameter when cloned container is not a template and ignore otherwise * Don't only create linked clones of template containers * Fix pylint errors * Add extra example * Minor language fix * Add clone_type parameter to specify cloning behaviour * I can't find if openvz nodes have this clone API, so just don't support it * Remove unrelated changes * Don't pass unused kwargs * Revert more unrelated changes * Remove required_together clone and clone_type because clone_type has a default choice * Fix clone_type reference Co-authored-by: Felix Fontein <[email protected]> * Fix missing period Co-authored-by: Felix Fontein <[email protected]> * Fix redundant period Co-authored-by: Felix Fontein <[email protected]> * Fix redundant period Co-authored-by: Felix Fontein <[email protected]> Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit b0c27f7)
@m-rtijn thanks for your contribution! |
* proxmox: Add clone parameter * Add changelog fragment * Add version_added Co-authored-by: Felix Fontein <[email protected]> * Add PR URL to changelog fragment Co-authored-by: Felix Fontein <[email protected]> * Clarify what content_check does * Split up try/except block to give a separate error message when creation pre-checks fail * Create seperate case for cloning * Prevent 'clone' argument from being removed * Fix double argument, add todo's * Check if to be cloned container actually exists * Adjust module options dependencies * Require 'storage' parameter when cloned container is not a template and ignore otherwise * Don't only create linked clones of template containers * Fix pylint errors * Add extra example * Minor language fix * Add clone_type parameter to specify cloning behaviour * I can't find if openvz nodes have this clone API, so just don't support it * Remove unrelated changes * Don't pass unused kwargs * Revert more unrelated changes * Remove required_together clone and clone_type because clone_type has a default choice * Fix clone_type reference Co-authored-by: Felix Fontein <[email protected]> * Fix missing period Co-authored-by: Felix Fontein <[email protected]> * Fix redundant period Co-authored-by: Felix Fontein <[email protected]> * Fix redundant period Co-authored-by: Felix Fontein <[email protected]> Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit b0c27f7) Co-authored-by: Martijn <[email protected]>
SUMMARY
This PR adds a 'clone' parameter to the proxmox module to clone a container. The implementation is based on the clone option in the proxmox_kvm module.
ISSUE TYPE
COMPONENT NAME
proxmox
WIP
A small todo list of things which I already know I should do:
Check if the older OpenVZ type also supports the clone API operation just like the LXC one. If not, make sure that the clone operation is only used with LXC-enabled proxmox nodes.Not solved, just ignored: it now fails when using this on a node that does not use LXC. A note is added in the documentation.required_if[('state', 'present' ...
accordingly