-
Notifications
You must be signed in to change notification settings - Fork 95
[Multi-ESX] vmgroup is not removable when vms are added from both ESXs (configured as MultiNode) #1188
Comments
check_volumes_mounted does findVmByUuid which is going to fail for VMs registered on some other host. This was introduced in #1060 |
Is this a doc issue? Because, when adding the VM to the vmgroup the below is done, E1: vmdkops_admin.py vmgroup vm add --name=T1 --vm-list=VM1 The vmgroup add has to be done on each ESX host thats running the VM. The user (even with a script) needs to ssh a command to the respective ESX to add VMs on each host into a vmgroup. The expectation to remove the vmgroup is incorrect in a multi-node case unless the actions during add are reversed. Which is by first removing the VMs from the vmgroup from the respective hosts and only then the vmgroup can be removed. The flexibility to remove the vmgroup with VMs in it seems impossible in a multi-node case. Given we need to init config, add VMs from multiple hosts rm too should be done on each host in this case. |
Agree. In such cases should we return with error to force user to remove the VMs from the vmgroup first (from respective esx host)? This is only for shared mode; for local mode, vmgroup with VMs in it can be deleted. This is requires user to do additional steps, but is graceful. |
Agree, given the VC based capability will remove the need to do commands per host and fact that even now it should be just SSH from a guest OS to add VMs on multiple ESX hosts, its not extra to expect the user to remove the VMs before removing the vmgroup. Config init and vmgroup add all need to be done per host anyway. |
Why not skip check_volumes_mounted check, warn user and proceed with deleting vm_group? |
It breaks the detach logic, as explained in first paragraph of description of #1045 |
@pdhamdhere @govint so the fix is: for vmgroup rm, return error to user if multinode mode and vmgroup has member VMs ? I will go ahead and generate a PR then. |
@pshahzeb I agree it makes sense to disallow deleting vmgroup if there are related volumes attached. But why don't we disallow deleting a vmgroup with some VMs? The issue here is that "Cannot find vm 564d4e04-f778-487a-5e1c-50e6215af0a5". I think we have agreed that we should persist VM names in the DB. Adding VM names in the DB should fix this issue, right? |
@shaominchen |
@pshahzeb I see. That makes sense then, as we actually need the VM MoRef object instead of just VM name here. |
…h ESXs (See original PR #1214 for the details of review comments)
Test bed setup:
Steps to reproduce:
Expectation: Admin CLI should allow to remove
T1
Current behavior: Admin CLI is not allowing to remove and throwing following error ( vm UUID is not recognized by ESX where vm is not registered)
While invoking
vmgroup rm
command from E1 (Admin CLI complains about the UUID of VM2 as it is registered on E2) and on E2 complains about UUID of VM1On E1:
on E2:
/CC @lipingxue
The text was updated successfully, but these errors were encountered: