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

Add VM_Name in config DB #1130

Closed
pdhamdhere opened this issue Mar 31, 2017 · 0 comments · Fixed by #1151
Closed

Add VM_Name in config DB #1130

pdhamdhere opened this issue Mar 31, 2017 · 0 comments · Fixed by #1151

Comments

@pdhamdhere
Copy link
Contributor

Current Admin CLI logic is to persist the VM uuid and query VM name on demand. With shared multi-tenancy, user can run vmdkops_admin vmgroup vm ls and command must display VMs running on another ESX host as well.

  1. VM1 belongs to ESX1, VM2 belongs to ESX2. ESX1 and ESX2 are configured to a shared datastore.
  2. Admin creates T1 on ESX1 and adds VM1 to T1
  3. Admin runs “vmdkops_admin tenant vm ls” on ESX2 – BROKEN!

Proposed Solution:
Add VM_Name in DB. If FindVMByUuid() fails then use VM_Name in DB which may be stale in rare cases. Once we have property collector, this issue will go away.

Fix should be backward compatible i.e. for existing entries in DB with no VM_Name, it should log UUID.

Making it P0 since it is must-fix for cross-esx tenant configuration.

CC/ @shaominchen @lipingxue

@pdhamdhere pdhamdhere added this to the 0.14 milestone Mar 31, 2017
@lipingxue lipingxue assigned lipingxue and pshahzeb and unassigned lipingxue Apr 3, 2017
pshahzeb pushed a commit that referenced this issue Apr 6, 2017
1. Persisting VM name along with VM id and tenant id in config db
when vm becomes a part of tenant. Updating the db manager api to accept
list of tuple of vm id and name instead of just vm id

2. tenant object contains the list of tuple of vm id and names of VMs that
are part of the tenant. Doing this saves trip to db while verifying params
for tenant operations

3. Bumping the db version to 1.2.
andling db schema upgrade from previous db version for vms table.
Leaving the vm name None in db for VMs for which VM name couldn't be
resolved during upgrade. Handling VM names which are None gracefully when
printing them

Testing:
Updating related test cases for auth_data manager, vmdkops and admin cli

Fixes #1130
pshahzeb pushed a commit that referenced this issue Apr 10, 2017
1. Persisting VM name along with VM id and tenant id in config db
when vm becomes a part of tenant. Updating the db manager api to accept
list of tuple of vm id and name instead of just vm id

2. tenant object contains the list of tuple of vm id and names of VMs that
are part of the tenant. Doing this saves trip to db while verifying params
for tenant operations

3. Bumping the db version to 1.2.
andling db schema upgrade from previous db version for vms table.
Leaving the vm name None in db for VMs for which VM name couldn't be
resolved during upgrade. Handling VM names which are None gracefully when
printing them

Testing:
Updating related test cases for auth_data manager, vmdkops and admin cli

Fixes #1130
pshahzeb pushed a commit that referenced this issue Apr 10, 2017
1. Persisting VM name along with VM id and tenant id in config db
when vm becomes a part of tenant. Updating the db manager api to accept
list of tuple of vm id and name instead of just vm id

2. tenant object contains the list of tuple of vm id and names of VMs that
are part of the tenant. Doing this saves trip to db while verifying params
for tenant operations

3. Bumping the db version to 1.2.
andling db schema upgrade from previous db version for vms table.
Leaving the vm name None in db for VMs for which VM name couldn't be
resolved during upgrade. Handling VM names which are None gracefully when
printing them

Testing:
Updating related test cases for auth_data manager, vmdkops and admin cli

Fixes #1130
pshahzeb pushed a commit that referenced this issue Apr 11, 2017
* Persisting VM name in config DB

1. Persisting VM name along with VM id and tenant id in config db
when vm becomes a part of tenant. Updating the db manager api to accept
list of tuple of vm id and name instead of just vm id

2. tenant object contains the list of tuple of vm id and names of VMs that
are part of the tenant. Doing this saves trip to db while verifying params
for tenant operations

3. Bumping the db version to 1.2.
andling db schema upgrade from previous db version for vms table.
Leaving the vm name None in db for VMs for which VM name couldn't be
resolved during upgrade. Handling VM names which are None gracefully when
printing them

Testing:
Updating related test cases for auth_data manager, vmdkops and admin cli

Fixes #1130
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants