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

Code error when moving VM (in _DEFAULT) with volumes attached to other vmgroup. #1346

Closed
govint opened this issue Jun 3, 2017 · 1 comment

Comments

@govint
Copy link
Contributor

govint commented Jun 3, 2017

Was testing the vmgroup E2E tests and had a VM with a volume left attached on it (in _DEFAULT). Ran the test and got below error.

1.Same DS is associated with multiple vmgroups (test1 and test2)
/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 a default vmgroup _VM_DS
b07d8676-2cff-4d11-b612-58cd9c3dc2fd test1 datastore1
c7006ef6-8eaa-4f43-be5c-2b4b9ec36e7c test2 datastore1

  1. VM 2 is in the default and has a container running on it.
    $ docker run -it --volume-driver=vsphere -v Test_Vol50@bigone:/vol1 --name ub ubuntu
    root@6f48cce8c9a0:/#

  2. Try moving the VM to test1 vmgroup
    /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py vmgroup vm add --name=test1 --vm-list 2
    Traceback (most recent call last):
    File "/usr/lib/vmware/vmdkops/bin/vmdkops_admin.py", line 1414, in
    main()
    File "/usr/lib/vmware/vmdkops/bin/vmdkops_admin.py", line 61, in main
    args.func(args)
    File "/usr/lib/vmware/vmdkops/bin/vmdkops_admin.py", line 999, in tenant_vm_add
    return operation_fail(error_info.msg)

This doesn't happen if say VM 2 is already in test1 and has a container running. If VM 2 is moved to test2 then the move is handled correctly by failing.

/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 a default vmgroup _VM_DS
b07d8676-2cff-4d11-b612-58cd9c3dc2fd test1 datastore1 2 <--- VM 2 is in test1 and has a container running
c7006ef6-8eaa-4f43-be5c-2b4b9ec36e7c test2 datastore1

Try moving VM 2 to test2,

/usr/lib/vmware/vmdkops/bin/vmdkops_admin.py vmgroup vm add --name=test2 --vm-list 2
VM '2' has already been associated with tenant 'test1', can't add it <--------- works fine.

@govint govint changed the title vmgroup add fails when moving VM (in _DEFAULT) with volumes attached to other vmgroup. Code error when moving VM (in _DEFAULT) with volumes attached to other vmgroup. Jun 5, 2017
@shuklanirdesh82 shuklanirdesh82 modified the milestone: 0.16 Jun 6, 2017
@govint govint self-assigned this Jun 12, 2017
@govint
Copy link
Contributor Author

govint commented Jun 12, 2017

Fixed via #1390

@govint govint closed this as completed Jun 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants