ScaleComputing / HyperCoreAnsibleCollection

Official Ansible collection for Scale Computing SC//HyperCore (HC3) v1 API
GNU General Public License v3.0
12 stars 8 forks source link

:lady_beetle: Bug: vm module doesn't set send cloud_init for existing VMs #340

Open ForrestHansen opened 3 weeks ago

ForrestHansen commented 3 weeks ago

Describe the bug

The vm module has a cloud_init parameter which works as described when creating new VMs. However when applied to an existing VM, the supplied cloud_init parameter is silently ignored.

To Reproduce Steps to reproduce the behavior:

  1. Run the vm module on an existing VM and provide any cloud_init parameters.
  2. Observe that the task does not error and the VM doesn't have a cloud init iso attached afterwards.

Expected behavior

Either the documentation for the vm module should state that the cloud_init parameter only applies to newly created VMs or the module should apply any cloud_init parameter to existing VMs.

System Info (please complete the following information):

Additional context

There doesn't seem to be a way to attach cloud init iso to an existing VM elsewhere in the collection, besides doing it manually with the api module.

justinc1 commented 3 weeks ago

I agree at least documentation needs to be updated.

a way to attach cloud init iso to an existing VM ... doing it manually with the api module.

You sure this can be done via API module? From memory, it might not be possible to attach cloud-init ISO to existing VM at all - either via web UI, or directly via HyperCore API. But I might be wrong here.

In general, most of cloud-init configuration is applied during VM first boot ("creation"). Attaching cloud-init ISO to existing VM will most often have limited effect - only some (maybe even no) of configuration values would be applied.

ForrestHansen commented 3 weeks ago

You sure this can be done via API module? From memory, it might not be possible to attach cloud-init ISO to existing VM at all - either via web UI, or directly via HyperCore API. But I might be wrong here.

You are correct. I attempted it with the REST API and got the same result. No error and no attached cloud-init ISO. So I don't think it's supported.