Wrap call to extension_supported on Launch Instance with try/except

Bug #1262223 reported by Lin Hua Cheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Lin Hua Cheng
Havana
Fix Released
Low
Lin Hua Cheng

Bug Description

https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py#L142

        if api.nova.extension_supported("BlockDeviceMappingV2Boot",
                                        request):
            source_type_choices.append(("volume_image_id",
                    _("Boot from image (creates a new volume).")))
        source_type_choices.append(("volume_snapshot_id",

extension_supported call can fail, we need to wrap this with try-except

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

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

Changed in horizon:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/62899
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=2f85688ee629f84f36019391f460ff00c6b1501c
Submitter: Jenkins
Branch: master

commit 2f85688ee629f84f36019391f460ff00c6b1501c
Author: Lin Hua Cheng <email address hidden>
Date: Wed Dec 18 06:33:25 2013 -0800

    Wrap call to extension_supported with try/except

    Change-Id: I290b2cdc8dda116b48ccda73ec29e5f454febef0
    Closes-Bug: #1262223

Changed in horizon:
status: In Progress → Fix Committed
Changed in horizon:
milestone: none → icehouse-2
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to horizon (stable/havana)

Reviewed: https://review.openstack.org/59740
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=2c1f1f39565ca7bdc8a7bde2ce45f2a0019357da
Submitter: Jenkins
Branch: stable/havana

commit 2c1f1f39565ca7bdc8a7bde2ce45f2a0019357da
Author: Lin Hua Cheng <email address hidden>
Date: Thu Oct 17 13:02:23 2013 -0700

    Add check for BlockDeviceMappingV2 nova extension

    Booting instance from image (creates a volume) option is using
    the new BDM format when submitting the create server request to
    Nova. Adding a check for Nova extensions if it is supported
    before displaying the option.

    Closes-bug: #1223875

    In the original fix API call is not wrapped with try/except
    and it was fixed in bug 1262223 in master. The fix is also
    cherry-picked from commit a10436e6a376fb2c3478796e7ad728eb0e1f0ba3.

    Related-bug: #1262223

    Change-Id: Ie0b2b5d574babc910e2dac7ce9e3ab6603382ffb
    (cherry picked from commit a10436e6a376fb2c3478796e7ad728eb0e1f0ba3)

tags: added: in-stable-havana
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-2 → 2014.1
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.