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

Misleading error message while renaming a tenant to a name which already exists #1001

Closed
shuklanirdesh82 opened this issue Mar 7, 2017 · 1 comment

Comments

@shuklanirdesh82
Copy link
Contributor

Steps to reproduce:

  1. create two tenants T1 and T2
  2. invoke vmdkops_admin tenant ls to verify tenants correctly or not
  3. rename one of the tenant with the existing tenant name i.e. invoke vmdkops_admin.py tenant update --name T1 --new-name T2 where as T2 is already present in the system

on ESX

[root@sc-rdops-vm10-dhcp-36-198:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py tenant ls
Uuid                                  Name      Description               Default_datastore  VM_list         
------------------------------------  --------  ------------------------  -----------------  --------------  
11111111-1111-1111-1111-111111111111  _DEFAULT  This is a default tenant  vsanDatastore                      
c308b6a2-1b00-450a-bb95-275b958ffde7  T1                                  vsanDatastore                      
42b1a76c-65df-4cf6-b18d-9dd17b684a9b  T2                                  vsanDatastore      vmFolderPhoton  

[root@sc-rdops-vm10-dhcp-36-198:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py tenant ls
Uuid                                  Name      Description               Default_datastore  VM_list         
------------------------------------  --------  ------------------------  -----------------  --------------  
11111111-1111-1111-1111-111111111111  _DEFAULT  This is a default tenant  vsanDatastore                      
c308b6a2-1b00-450a-bb95-275b958ffde7  T1                                  vsanDatastore                      
42b1a76c-65df-4cf6-b18d-9dd17b684a9b  T2                                  vsanDatastore      vmFolderPhoton  

[root@sc-rdops-vm10-dhcp-36-198:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py tenant update --name T1 --new-name T2
Tenant T1 already exists
[root@sc-rdops-vm10-dhcp-36-198:~] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py status
Version: 0.12.3f64805-0.0.1
Status: Running
Pid: 1321926
@shuklanirdesh82 shuklanirdesh82 modified the milestones: Future, v1 GA Mar 7, 2017
@msterin msterin changed the title Getting misleading error message while renaming the tenant with a name which is already present in the inventory Misleading error message while renaming a tenant to a name which already exists Mar 7, 2017
@tusharnt tusharnt modified the milestones: 0.15, v1 GA May 2, 2017
@tusharnt tusharnt assigned shaominchen and pshahzeb and unassigned pshahzeb and shaominchen May 2, 2017
@tusharnt tusharnt assigned govint and unassigned pshahzeb May 12, 2017
@govint
Copy link
Contributor

govint commented May 16, 2017

Current code seems to work ok.

/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
05c0d4b2-9066-4945-bdd4-50d91fe3a554 user_tenant_2 _VM_DS
e180f3bf-9609-405a-ab93-735fed311a2c user_tenant_1 _VM_DS

/usr/lib/vmware/vmdkops/bin/vmdkops_admin.py vmgroup update --name user_tenant_1 --new-name user_tenant_2
Vmgroup user_tenant_2 already exists

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

No branches or pull requests

5 participants