boot from image (creates as a new volume) does not work

Bug #1223875 reported by Dafna Ron
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Lin Hua Cheng
Havana
Fix Released
High
Akihiro Motoki

Bug Description

trying to launch an instance from horizon and selecting boot from image (creates a new volume) fails each time with the following error in log:

HTTP exception thrown: Invalid imageRef provided.

I have used this image to launch other "regular" instances

2013-09-11 16:20:40.347 19829 DEBUG nova.api.openstack.wsgi [req-ee257bd7-200b-41e5-b6ea-eef4d0a70b5b 0007c2f5563c4cc883c0c8d9e7f7d6f8 532307bfce18431ba50d309622619b66] Action: 'create', body: {"server": {"name": "dafna", "imageRef": "",
 "flavorRef": "1", "max_count": 1, "min_count": 1, "security_groups": [{"name": "default"}]}} _process_stack /usr/lib/python2.6/site-packages/nova/api/openstack/wsgi.py:935
2013-09-11 16:20:40.348 19829 DEBUG nova.api.openstack.wsgi [req-ee257bd7-200b-41e5-b6ea-eef4d0a70b5b 0007c2f5563c4cc883c0c8d9e7f7d6f8 532307bfce18431ba50d309622619b66] Calling method <bound method Controller.create of <nova.api.openstac
k.compute.servers.Controller object at 0x315c510>> _process_stack /usr/lib/python2.6/site-packages/nova/api/openstack/wsgi.py:936
2013-09-11 16:20:40.350 19829 INFO nova.api.openstack.wsgi [req-ee257bd7-200b-41e5-b6ea-eef4d0a70b5b 0007c2f5563c4cc883c0c8d9e7f7d6f8 532307bfce18431ba50d309622619b66] HTTP exception thrown: Invalid imageRef provided.
2013-09-11 16:20:40.351 19829 DEBUG nova.api.openstack.wsgi [req-ee257bd7-200b-41e5-b6ea-eef4d0a70b5b 0007c2f5563c4cc883c0c8d9e7f7d6f8 532307bfce18431ba50d309622619b66] Returning 400 to user: Invalid imageRef provided. __call__ /usr/lib/
python2.6/site-packages/nova/api/openstack/wsgi.py:1198
2013-09-11 16:20:40.352 19829 INFO nova.osapi_compute.wsgi.server [req-ee257bd7-200b-41e5-b6ea-eef4d0a70b5b 0007c2f5563c4cc883c0c8d9e7f7d6f8 532307bfce18431ba50d309622619b66] 10.35.64.69 "POST /v2/532307bfce18431ba50d309622619b66/servers
 HTTP/1.1" status: 400 len: 266 time: 0.0560989

Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

Need to verify and diagnose for RC1

Changed in horizon:
importance: Undecided → High
milestone: none → havana-rc1
status: New → Triaged
Revision history for this message
Matthias Runge (mrunge) wrote :

During launch, states cycle from build via network to Block Device Mapping, where it fails.

Creating block devices from image fails, too.

Revision history for this message
Matthias Runge (mrunge) wrote :

I assume, this is connected to bug https://bugs.launchpad.net/bugs/1231887

Revision history for this message
Matthias Runge (mrunge) wrote :

when using an iso, this works for me. Seems to be a bug in cinder.

Changed in horizon:
assignee: nobody → Gabriel Hurley (gabriel-hurley)
Changed in horizon:
milestone: havana-rc1 → none
Revision history for this message
nick dallamora (ndallamora) wrote :

is there a 1:1 workaround for this? i'm experiencing this bug and am also unable to attach a volume to the instance.

Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

This is a different issue from the bug marked as duplicate.

When the "boot from image (create a volume)" is selected, Horizon makes a call to novaclient servers.create() passing the BDM format (block_device_mapping_v2 as parameter). In this format, the imageID is passed in the block_device_mapping_v2 dict object instead of passing it directly to novaclient as imageRef parameter.

The BDM format is a Nova extension "os-block-device-mapping-v2-boot". If this is not enabled in Nova, it result to the error message reported "Invalid imageRef provided".

Reference https://wiki.openstack.org/wiki/BlockDeviceConfig#API_data_model_and_backwards_compat_issues

We should be checking the Nova extensions and hide the option to boot from image (create a volume) if not supported.

Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

I'm going to remove the link to the duplicate bug: bug #1231887. Since this is a different issue from Bock.

Changed in horizon:
assignee: Gabriel Hurley (gabriel-hurley) → Lin Hua Cheng (lin-hua-cheng)
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/52496

Changed in horizon:
status: Triaged → In Progress
Changed in horizon:
milestone: none → icehouse-1
Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

Dahna or Nick: Can you confirm if this is root case of your issue?

List the Nova V2 extensions and see if you can find "BlockDeviceMappingV2" there.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

Is it havana-backport-potential?

tags: added: havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/52496
Committed: http://github.com/openstack/horizon/commit/a10436e6a376fb2c3478796e7ad728eb0e1f0ba3
Submitter: Jenkins
Branch: master

commit a10436e6a376fb2c3478796e7ad728eb0e1f0ba3
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.

    Change-Id: Ie0b2b5d574babc910e2dac7ce9e3ab6603382ffb
    Closes-bug: 1223875

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

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/59740

Akihiro Motoki (amotoki)
tags: removed: havana-backport-potential
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : 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)

Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-1 → 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.