Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

User cannot delete a vmgroup if vm from that vmgroup gets deleted #1484

Closed
ashahi1 opened this issue Jun 26, 2017 · 1 comment
Closed

User cannot delete a vmgroup if vm from that vmgroup gets deleted #1484

ashahi1 opened this issue Jun 26, 2017 · 1 comment

Comments

@ashahi1
Copy link
Contributor

ashahi1 commented Jun 26, 2017

Issue: User cannot delete a vmgroup if vm from that vmgroup gets deleted

Test steps:

  1. Create a vmgroup and associate vm to it.
  2. Delete the vm that was added to the vmgroup.
  3. Try to remove vm from vmgroup - message Cannot find vm
  4. Try to delete vmgroup - message Cannot delete non-empty vmgroup vmgroup1. Remove VMs from the vmgroup before deleting it.

There should be some way for user to delete a vmgroup if it's vm no longer exists. In current product behavior, there is no way for user to delete it's vmgroup if VMs from that vm group get deleted.


Steps and their output are as follows:

  1. Create a vmgroup and associate VM to it.
[root@sc-rdops-vm10-dhcp-39-239:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py vmgroup create --name=vmgroup1 --default-datastore=_VM_DS --vm-list=testVM-33
vmgroup 'vmgroup1' is created. Do not forget to run 'vmgroup vm add' to add vm to vmgroup.

[root@sc-rdops-vm10-dhcp-39-239:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py vmgroup ls
Uuid                                  Name      Description                  Default_datastore  VM_list
------------------------------------  --------  ---------------------------  -----------------  ---------
11111111-1111-1111-1111-111111111111  _DEFAULT  This is the default vmgroup  _VM_DS
baf91569-a092-44b3-b6de-18677e4091b4  vmgroup1                               _VM_DS             testVM-33

  1. Deleted the vm that was added to the vmgroup.
  2. Tried removing vm from vmgroup. As expected, operation fail as vm no longer exists.
[root@sc-rdops-vm10-dhcp-39-239:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py vmgroup vm rm --name=vmgroup1 --vm-list=testVM-33
Cannot find vm testVM-33
  1. Tried removing vmgroup - could not remove vmgroup as it has vm in it even though that vm is deleted.
[root@sc-rdops-vm10-dhcp-39-239:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py vmgroup rm --name=vmgroup1
Cannot delete non-empty vmgroup vmgroup1. Remove VMs from the vmgroup before deleting it.
[root@sc-rdops-vm10-dhcp-39-239:~]
@ashahi1 ashahi1 added this to the 0.17 milestone Jun 26, 2017
@tusharnt tusharnt removed this from the 0.17 milestone Jul 18, 2017
@govint govint self-assigned this Sep 11, 2017
@govint govint added this to the Sprint - Rafiki milestone Sep 11, 2017
@govint
Copy link
Contributor

govint commented Sep 15, 2017

Fixing via #1887

@govint govint closed this as completed Sep 19, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

3 participants