Broken OVA Import on VMwareVCDriver

Bug #1649232 reported by Fabian Wiesel
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Medium
Unassigned

Bug Description

If a user places an OVA on Glance with its own storage independent of the VCenter, the import fails in nova with not finding the file in the vmware_temp directory.

I am using mitaka on a VCenter 6.0, but looking at the code, I would say it affects also liberty and later versions, when the Glance isn't storing the images directly in the VCenter (e.g Swift store)

I created an OVA image in Glance (Swift backed), and then started a VM with the image.
The import fails with a missing file.

Essentially, the code is broken here:
https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vmops.py#L620-L629

`image_prepare` creates some temporary directory, which is never used in `image_fetch` aka `_fetch_image_as_ova`, and `image_cache` expects the imported image there.

However, the function `_fetch_image_as_ova` imports the OVA as a VM, which places the root disk in a folder named as the imported image name.

Attached is a patch, which makes the `_fetch_image_as_ova` function move the image to the cache directory, and changes the `image_prepare` and `image_cache` function to a noop.

Revision history for this message
Fabian Wiesel (fabian-wiesel) wrote :
Matt Riedemann (mriedem)
tags: added: vmware
Tracy Jones (tjones-i)
Changed in nova:
assignee: nobody → Zhongcheng Lao (zlao)
importance: Undecided → Medium
Changed in nova:
status: New → In Progress
Revision history for this message
Sean Dague (sdague) wrote :

Automatically discovered version mitaka in description. If this is incorrect, please update the description to include 'nova version: ...'

tags: added: openstack-version.mitaka
Revision history for this message
Sean Dague (sdague) wrote :

There are no currently open reviews on this bug, changing the status back to the previous state and unassigning. If there are active reviews related to this bug, please include links in comments.

Changed in nova:
status: In Progress → New
assignee: Zhongcheng Lao (zlao) → nobody
Sean Dague (sdague)
Changed in nova:
status: New → Confirmed
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.