Uploading OVA to Glance via Horizon Fails

Bug #1641383 reported by Jay Jahns
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Jay Jahns

Bug Description

If a user wishes to upload an image to Glance that is an OVA file, the import fails because the disk_format gets marked as "bare" and the container_format is not taken into account.

I've checked the dashboard for images and found this problem can be very easily fixed by checking if the user specified ova in the form and updating these 2 settings.

dashboards/project/images/images/forms.py after line 63
    elif disk_format == 'ova':
        # The ova format requires glance to set the disk format to vmdk and
        # the container format to ova in order for glance to accept the image
        # and to allow successful launch of the image. OVA does not support
        # a container format of bare.
        container_format = 'ova'
        disk_format = 'vmdk'

Upon adding this change, OVAs can be added via the UI without error, and Glance can launch the OVA as expected. This only impacts single-disk OVA.

Can someone verify this for me so we know on our side this is the correct action? I'm not totally familiar with contributing to the project, so I'm working on that internally as well.

Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

Please provide a Horizon version.

Changed in horizon:
status: New → Incomplete
Revision history for this message
Jay Jahns (jjahns) wrote :

I found the issue in Mitaka, but this is in Master as well.

Revision history for this message
Jay Jahns (jjahns) wrote :

I'll submit a patch for this. I do not see any major issues with adding this functionality that I can see.

Changed in horizon:
assignee: nobody → Jay Jahns (jjahns)
status: Incomplete → In Progress
Revision history for this message
Jay Jahns (jjahns) wrote :

I pushed https://review.openstack.org/#/c/407847/ in but the bug did not update. I didn't put the right value for the bug in the commit message.

Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/416374

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/416376

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (stable/mitaka)

Change abandoned by Jay Jahns (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/416376
Reason: Sorry - I noticed now.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (stable/newton)

Change abandoned by Jay Jahns (<email address hidden>) on branch: stable/newton
Review: https://review.openstack.org/416374
Reason: Abandoning

David Lyle (david-lyle)
Changed in horizon:
status: Fix Committed → In Progress
importance: Undecided → Low
Changed in horizon:
milestone: none → ocata-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/407847
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=3f1e0fad92ec6031e17b556609ca940c8a20a165
Submitter: Jenkins
Branch: master

commit 3f1e0fad92ec6031e17b556609ca940c8a20a165
Author: Jay Jahns <email address hidden>
Date: Tue Dec 6 20:41:04 2016 -0800

    Allow OVA upload for images

    The OpenStack CLI allows the upload of OVA for images if the container format is
    set to ova. This patch allows a user to upload a OVA to Glance through the UI,
    changing the container_format to ova and the disk_format to vmdk.

    Change-Id: I1483b28ae4a1918a03798c4ef1bb94540fdb3386
    Closes-Bug: #1641383

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 11.0.0.0b3

This issue was fixed in the openstack/horizon 11.0.0.0b3 development milestone.

Guillaume (vatlas)
information type: Public → Public Security
Guillaume (vatlas)
information type: Public Security → Public
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.