-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Describe the bug
If a VM is deployed in the cluster, and one physical machine is replaced (using the replace_machine playbook and re-launching seapath_setup_main), the VM XML is not coherent with the new state of the cluster.
Investigation
When deploying a VM, vm_manager fills in the RBD disk access in the Libvirt XML file.
Particularly, it uses the list of all the OSDs in the cluster, see https://github.com/seapath/vm_manager/blob/main/vm_manager/vm_manager_cluster.py#L75-L97
This results in this particular hunk being added to the XML
<source protocol='rbd' name='rbd/vm' index='1'>
<host name='node1' port='6789'/>
<host name='node2' port='6789'/>
<host name='node3' port='6789'/>
</source>
When replacing a physical machine, this XML will not be updated and the VM will not be aware of the new physical machine.
IMO we should revert #71 and seapath/ansible@cc36f5c#diff-debca51e4f5ea0815578cce92a61921b0b053d5854970b76b8bdd5bfba4a0063
I'm open to a better solution if any.
Work-around
Either redeploy the VM or update its XML following https://lf-energy.atlassian.net/wiki/spaces/SEAP/pages/534052902/Update+a+virtual+machine#Updating-VM-configuration-or-metadata