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

Old VM name persists in vmgroup members after photon host VM renaming in vsphere #1357

Closed
vxav opened this issue Jun 6, 2017 · 6 comments
Closed

Comments

@vxav
Copy link

vxav commented Jun 6, 2017

After renaming a Photon host VM (in vsphere) that is part of a vmgroup, the old name persist in the list of member VMs.

This prevents (at least that's what I was doing) the removal of the vmgroup.

To workaround it I opened vmdkops_config.db with SQLite Browser and removed the vm record, which allowed me to remove the vmgroup.

@msterin msterin assigned pshahzeb and unassigned pshahzeb Jun 8, 2017
@msterin
Copy link
Contributor

msterin commented Jun 8, 2017

@pshahzeb - looks like we need to track rename events in VMChangeListener to update the db.

@shuklanirdesh82 shuklanirdesh82 added this to the 0.16 milestone Jun 9, 2017
@shaominchen shaominchen added the P1 label Jun 20, 2017
@shaominchen shaominchen modified the milestones: 0.17, 0.16 Jun 20, 2017
@shaominchen
Copy link
Contributor

Cross-esx multi tenancy related issue and it's a corner case, so we are moving it to 0.17 release. We can pull it back if we have bandwidth since this is a customer issue.

@tusharnt tusharnt modified the milestones: Future, 0.17 Jul 17, 2017
@tusharnt
Copy link
Contributor

tusharnt commented Jul 17, 2017

Cross ESX multi tenancy feature is experimental.So pushing this issue on the back burner for now.

@vxav Please take a look at our current design. We would love to hear your feedback!

@shaominchen
Copy link
Contributor

Correctness issue - marking as mustfix for Kubecon release.

@shuklanirdesh82
Copy link
Contributor

@vxav can you please try with the latest (0.17 release VIB)?

I have tried on my end and couldn't reproduce the reported issue, sharing the steps with you that I have performed.

Using latest VIB: 0.17.c2aef31

[root@promc-2n-dhcp105-97:~] esxcli storage guestvol status
=== Service: 
Version: 0.17.c2aef31-0.0.1
Status: Running
Pid: 8147852
Port: 1019
LogConfigFile: /etc/vmware/vmdkops/log_config.json
LogFile: /var/log/vmware/vmdk_ops.log
LogLevel: INFO
=== Authorization Config DB: 
DB_LocalPath: /etc/vmware/vmdkops/auth-db
DB_SharedLocation: N/A
DB_Mode: SingleNode (local DB exists)

Steps performed

  1. check out vmgroup listing
[root@promc-2n-dhcp105-97:~] esxcli storage guestvol vmgroup ls
Uuid                                  Name      Description                  Default_datastore  VM_list
------------------------------------  --------  ---------------------------  -----------------  -------
11111111-1111-1111-1111-111111111111  _DEFAULT  This is the default vmgroup  _VM_DS      
  1. create vmgroup T11
[root@promc-2n-dhcp105-97:~] esxcli storage guestvol vmgroup create --name=T11 --vm-list=photon2 --default-datastore=datastore1
vmgroup 'T11' is created. Do not forget to run 'vmgroup vm add' to add vm to vmgroup.
[root@promc-2n-dhcp105-97:~] esxcli storage guestvol vmgroup ls
Uuid                                  Name      Description                  Default_datastore  VM_list
------------------------------------  --------  ---------------------------  -----------------  -------
11111111-1111-1111-1111-111111111111  _DEFAULT  This is the default vmgroup  _VM_DS                    
b29b73ef-698b-4a2d-93e5-67874c97c54f  T11                                    datastore1         photon2
  1. rename vm photon2 => photon3
  2. invoke vmgroup ls again
[root@promc-2n-dhcp105-97:~] esxcli storage guestvol vmgroup ls
Uuid                                  Name      Description                  Default_datastore  VM_list
------------------------------------  --------  ---------------------------  -----------------  -------
11111111-1111-1111-1111-111111111111  _DEFAULT  This is the default vmgroup  _VM_DS                    
b29b73ef-698b-4a2d-93e5-67874c97c54f  T11                                    datastore1         photon3
  1. remove vm from vm group and delete vmgroup
[root@promc-2n-dhcp105-97:~] esxcli storage guestvol vmgroup vm rm --name=T11 --vm-list=photon3
vmgroup vm rm succeeded
[root@promc-2n-dhcp105-97:~] esxcli storage guestvol vmgroup ls
Uuid                                  Name      Description                  Default_datastore  VM_list
------------------------------------  --------  ---------------------------  -----------------  -------
11111111-1111-1111-1111-111111111111  _DEFAULT  This is the default vmgroup  _VM_DS                    
b29b73ef-698b-4a2d-93e5-67874c97c54f  T11                                    datastore1                
[root@promc-2n-dhcp105-97:~] esxcli storage guestvol vmgroup rm --name=T11
vmgroup rm succeeded
[root@promc-2n-dhcp105-97:~] esxcli storage guestvol vmgroup ls
Uuid                                  Name      Description                  Default_datastore  VM_list
------------------------------------  --------  ---------------------------  -----------------  -------
11111111-1111-1111-1111-111111111111  _DEFAULT  This is the default vmgroup  _VM_DS   

@shuklanirdesh82
Copy link
Contributor

@vxav I am closing this issue please reopen with steps if you are still running into the issue.

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

7 participants