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

☂️ Migrate VM resource implementation to Plugin Framework #1231

Open
9 of 49 tasks
bpg opened this issue Apr 20, 2024 · 5 comments
Open
9 of 49 tasks

☂️ Migrate VM resource implementation to Plugin Framework #1231

bpg opened this issue Apr 20, 2024 · 5 comments
Assignees
Labels
size/XXL ✨ enhancement New feature or request
Milestone

Comments

@bpg
Copy link
Owner

bpg commented Apr 20, 2024

This is an "umbrella" ticket (call it an epic, or whatever) to track the migration of the proxmox_virtual_environment_vm resource to the Plugin Framework.

Motivation

Check out the benefits of Plugin Framework from HashiCorp. There are quite a lot.

Specific to this provider:

Challenges

  • There's a vast amount of functionality to port, and some (or most?) of it needs to be re-implemented to leverage the benefits of the Provider Framework data model/custom types.

  • Severe lack of the provider's code test coverage. The changes/re-implementation will introduce new bugs that will be hard to catch.

Compatibility

Inevitably, some attribute formats and semantics will be incompatible with the old version. Also, some attributes will be renamed/removed. Known incompatibilities are marked with ❗ below.

Implementation

The proxmox_virtual_environment_vm2 resource contains the new implementation.

Status of features/attributes:

  • Individual attributes
    • acpi
    • boot_order
    • description
    • id
    • hook_script_file_id
    • machine
    • migrate
    • name
    • node_name
    • on_boot
    • pool_id
    • protection
    • reboot
    • smbios
    • started
    • stop_on_destroy
    • tablet_device
    • tags
    • template
  • Blocks
    • agent
    • audio_device
    • bios
    • cdrom
    • clone
      • simple clone
      • migrate between nodes
    • cpu
    • disk
    • efi_disk
    • hostpci
    • initialization
    • keyboard_layout
    • kvm_arguments
    • memory
    • network_device
    • numa
    • operating_system
    • serial_device
    • scsi_hardware
    • startup
    • timeouts
      • CRUD operations
      • specific API calls (if supported/needed)
    • tpm_state
    • usb
    • vga
    • watchdog
@bpg bpg added the ✨ enhancement New feature or request label Apr 20, 2024
@bpg bpg pinned this issue Apr 20, 2024
@bpg bpg added the size/XXL label Apr 20, 2024
@bpg bpg added this to the v1.0 milestone Apr 25, 2024
@sergelogvinov
Copy link
Contributor

Hi, i think that we need to add reboot flag. which allow/skip rebooting the VM if it needed after changes.
(Currently, I usually comment out the reboot block in the code...)

Thanks.

@maksimsamt
Copy link

@bpg ,
What is the approximate forecast on this new implementation?
Unfortunately, the current implementation of proxmox_virtual_environment_vm cannot be used for clone operations, especially in prod environments. As you mentioned in your task description, there are some important issues with disk provisioning/changing/adding etc from clone vm or template. And basically in almost all scenarios (disk modify or adding new one) the issue is that the current main disk is destroyed and a new one is created.

@bpg
Copy link
Owner Author

bpg commented May 29, 2024

Hi @maksimsamt!

It's difficult to estimate, as my availability for this project is quite unpredictable. I work on it in my free time, but that's essentially it.

I'm still establishing the best approach to re-implementing the functionality, common reusable patterns, test harness, etc., and this initial stage is almost done. After that, I'll formalize the design decisions in some contribution guidelines so anyone willing to help (and speed thing up) can get on board more easily.

But for now, as you can see from the status of the checkboxes in the list above, I've only scratched the surface in terms of functionality coverage. The VM2 resource is really far away from being functionally complete.

@svengreb
Copy link
Contributor

It's important to take you time on such large topics.
"Forecasts" or "ETA" are terms that should be avoided in (non-commercial) open-source as it only creates (mental) pressure and slows down development processes.

Are all of list entries above possible to be implemented on their own or are there some dependencies between each other? I'd like to help when my (also limited) free-time allows it so when it is possible to simply pick one of those it's easy to distribute contributions.

@bpg
Copy link
Owner Author

bpg commented May 30, 2024

Are all of list entries above possible to be implemented on their own or are there some dependencies between each other? I'd like to help when my (also limited) free-time allows it so when it is possible to simply pick one of those it's easy to distribute contributions.

@svengreb Thanks for the offer, much appreciated!!
Those blocks / attributes are pretty much independent, but I still need to iron out a few general things, like code structure, conventions, and similar. I'll ping you when it's ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL ✨ enhancement New feature or request
Projects
Status: ⛔️ Blocked
Development

No branches or pull requests

4 participants