vCenter virt driver cannot get vmdk root disk when vSAN used

Bug #1634340 reported by YuYang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Undecided
Stephen Finucane

Bug Description

1.vSphere6.0
2.vsan
3.when vm take a snapshot ,and the vm's volume(vmdk), vmdk path is :
uuid-xxx.vmdk

like:
[WYYVSANDATASTOR] 03450058-011c-029a-4f63-90b11c2437ba/d577cd50-2bc3-42c6-bc39-f424b3690fdc-000001.vmdk

in current code :
1./nova/nova/virt/vmwareapi/vm_util.py in method get_vmdk_info(session,vm_ref,uuid=Node)
2.get the root_disk use : uuid.vmdk,like d577cd50-2bc3-42c6-bc39-f424b3690fdc.vmdk
3.so this method can not get the root disk.

Tags: vmware vsan
YuYang (yuyangwang1985)
Changed in nova:
assignee: nobody → YuYang (yuyangwang1985)
YuYang (yuyangwang1985)
Changed in nova:
status: New → In Progress
status: In Progress → Fix Committed
YuYang (yuyangwang1985)
Changed in nova:
status: Fix Committed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/402256

YuYang (yuyangwang1985)
Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Jay Pipes (jaypipes) wrote : Re: nova vmware get vmdk root disk

Please do not set bugs to Fix Committed manually. When a patch is merged, the bug will automatically be set to Fix Committed.

Changed in nova:
status: Fix Committed → In Progress
summary: - nova vmware get vmdk root disk
+ vCenter virt driver cannot get vmdk root disk when vSAN used
tags: added: vmware vsan
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/408490

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Matt Riedemann (<email address hidden>) on branch: master
Review: https://review.openstack.org/402256
Reason: This looks abandoned. If you plan on pursuing this, please restore, rebase and address review feedback.

Changed in nova:
assignee: YuYang (yuyangwang1985) → Sihan Wang (wsihan)
Revision history for this message
Sihan Wang (wsihan) wrote :

The bug is missing information

two cases
1. nova instance snapshot, we make sure to coalesce the disk and export.

2. vsphere snapshot, it is not supported to do that. We can not snapshot nova instance in vsphere.

If not provided how to reproduce it, I would suggest we could close this bug.

Sihan Wang (wsihan)
Changed in nova:
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by YuYang (<email address hidden>) on branch: master
Review: https://review.openstack.org/408490
Reason: will Resubmit by new code!

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by YuYang (<email address hidden>) on branch: master
Review: https://review.openstack.org/402256
Reason: will Resubmit by new code!

Revision history for this message
YuYang (yuyangwang1985) wrote :

hi:
 frist:
 Sihan Wang,when a vm has snapshot,the vm'root device will like this:
[vsanDatastore] 4e06e658-afa1-e450-7fe1-90b11c1a5073/79834d95-edbc-4542-88d5-f5c16f4f8aa0-000001.vmdk
the openstack code get the root device(in the https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vm_util.py) use :
path = ds_obj.DatastorePath.parse(device.backing.fileName)
                if root_disk and path.basename == root_disk:
                    root_device = device
                vmdk_device = device

it will get error.

and then,in the customer site,they will backup with third party product.will snapshot the vm.so the openstack get the root device will get error.when i add the code adapte the condition Isn't it better to?

YuYang (yuyangwang1985)
Changed in nova:
assignee: Sihan Wang (wsihan) → YuYang (yuyangwang1985)
status: Invalid → In Progress
Revision history for this message
Sihan Wang (wsihan) wrote :

Hi Yang,

Are you doing snapshot in nova instance or snapshot directly in vsphere?

Sihan

Revision history for this message
YuYang (yuyangwang1985) wrote :

hi Sihan:
 the snapshot create use vcenter,because customer use third product to backup vm.
 the third backup product is to crate snapshot and then backup .
 so when the vm has snapshot,the openstack get the root device will get error.and then ,i add :
                 if root_disk and (path.basename == root_disk + ".vmdk"
                                  or
                                  path.basename.startswith(root_disk + "-")):
 then this code will good whether or not has snapshot!

 thanks!

Revision history for this message
YuYang (yuyangwang1985) wrote :

hi Sihan:
   i think add this condition,not affect original logic,also can Compatible more condition.
   thanks!

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/454441

Changed in nova:
assignee: YuYang (yuyangwang1985) → Stephen Finucane (stephenfinucane)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.