Image Name does not show up when new instance are launched using horizon dashboard

Bug #1645418 reported by Milan Potdar
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Invalid
Undecided
Unassigned

Bug Description

After creating a new instance from horizon dashboard with boot source as image, the image name does not show up in the table.

Logs shows missing value for "image ref" attribute.

NOTE: When the instance is launch using CLI the image name is there on horizon.

Tags: nova
Revision history for this message
Eddie Ramirez (ediardo) wrote :

Output of CLI and logs:
(openstack) server create --image cirros-0.3.4-x86_64-uec --flavor m1.tiny test123

API request (CLI):
2016-11-28 17:49:54.334 DEBUG nova.api.openstack.wsgi [req-a4b779df-6c01-4959-a89b-e23b4c69c690 admin admin] Action: 'create', calling method: <bound method ServersController.create of <nova.api.openstack.compute.servers.ServersController object at 0x7f1a7b8c0f90>>, body: {"server": {"min_count": 1, "flavorRef": "1", "name": "test123", "imageRef": "b3074817-17b2-425b-b700-45d0229f38c1", "max_count": 1}} from (pid=8612) _process_stack /opt/stack/nova/nova/api/openstack/wsgi.py:631

API request (Horizon):
2016-11-28 17:56:47.157 DEBUG nova.api.openstack.wsgi [req-9c4d8ef5-d620-49aa-af5c-6ee344f84433 admin admin] Action: 'create', calling method: <bound method ServersController.create of <nova.api.openstack.compute.servers.ServersController object at 0x7f1a7b8c0f90>>, body: {"server": {"name": "TEST987", "imageRef": "", "availability_zone": "nova", "block_device_mapping_v2": [{"boot_index": "0", "uuid": "b3074817-17b2-425b-b700-45d0229f38c1", "volume_size": 1, "device_name": "vda", "source_type": "image", "destination_type": "volume", "delete_on_termination": false}], "flavorRef": "1", "OS-DCF:diskConfig": "AUTO", "max_count": 1, "min_count": 1, "networks": [{"uuid": "7a272073-e59a-4c85-ae41-23c4faf32fba"}], "security_groups": [{"name": "394a4e19-5ca9-4516-a410-2589f680c3b2"}]}} from (pid=8612) _process_stack /opt/stack/nova/nova/api/openstack/wsgi.py:631

Note that imageRef is empty if the instance is launched using Horizon.

tags: added: nova
Revision history for this message
Eddie Ramirez (ediardo) wrote :

Nova docs: http://developer.openstack.org/api-ref/compute/?expanded=create-server-detail

imageRef body string The UUID of the image to use for your server instance. This is not required in case of boot from volume. In all other cases it is required and must be a valid UUID otherwise API will return 400.

siva (ramoju)
Changed in horizon:
assignee: nobody → siva (ramoju)
Revision history for this message
Shreyas MM (mmshreyas) wrote :

Image name does not appear in horizon, i experience only when we create new volume at the time of instance creation in other cases the image name will be shown,in attachment d2 and demo instances have volume attached

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

When you launch a server with boot from volume, Nova API does not return 'image' information, so this is the expected behavior.

Changed in horizon:
status: New → Invalid
assignee: siva (ramoju) → nobody
Revision history for this message
Frank Gemein (fgemein) wrote :

Hi
It doesn't matter if I start an instance from volume or from images, as long as it's started from the dashboard, the image_ref column of the nova.instance table does not receive an entry.
When I create an instance with the openstack client, or the nova client, or even with heat, the image_ref receives the right information.
I've tried the ocata Ubuntu cloud archive repo package, the git stable/ocata branch and the ubuntu pike repo.
My environment is stable/ocata on Ubuntu 16.04 with a ceph pools for epehemeral storage, cinder volumes, glance images and cinder-backup.

I'm running a central ELK cluster that collects all logfiles and there are no related errors whatsoever, as far as I can see. It did work until I've updated the environment several weeks ago.

I strongly suspect that it has to be related to the horizon soft, as sometimes, when I try to start from an image the pop dialog doesn't show the image selection and on top inside the drop-down source selection this very image is not one of the available items to chose.

It's really driving me nuts slowly.
Any help is highly appreciated.

Best
Frank

Revision history for this message
Andreas Krebs (wintamute) wrote :

Hi,
I'm seeing the same behaviour like Frank, similar setup, Ubuntu 16.04 with ubuntu pike repo, installed via kolla-ansible with ceph as storage backend.
Creating instances via CLI works, using Horizon fails due to empty image_ref and the request sent to nova-compute (python module nova.virt.libvirt.vif).
In Horizon I select 'Image' as boot source and add the image from the picker.
Looking at the POST data to the /api/nova/servers endpoint, the json data contains the correct id (see attached json data).
I'm still digging through the code, and pointers would be appreciated.

Cheers,
Andreas

Revision history for this message
Andreas Krebs (wintamute) wrote :

{
  "availability_zone": "nova",
  "config_drive": false,
  "user_data": "",
  "disk_config": "AUTO",
  "instance_count": 1,
  "name": "demo11",
  "scheduler_hints": {},
  "security_groups": [
    "d04585af-e108-4c41-88bb-b8fed8a5eca9"
  ],
  "create_volume_default": true,
  "source_id": null,
  "block_device_mapping_v2": [
    {
      "device_name": "vda",
      "source_type": "image",
      "destination_type": "volume",
      "delete_on_termination": false,
      "uuid": "fca70396-a188-49c1-8aa6-491cd5cb012c",
      "boot_index": "0",
      "volume_size": 1
    }
  ],
  "flavor_id": "1",
  "nics": [
    {
      "net-id": "2904f661-d2e0-4a05-8343-b30ab492786f",
      "v4-fixed-ip": ""
    }
  ],
  "key_name": "mykey"
}

Revision history for this message
Andreas Krebs (wintamute) wrote :

Ok, after lots of debugging I found the problem which turned out to be something completely different.
When creating an instance with Horizon a boot volume based on the selected image is created by cinder-volume.
Due to an incorrect rbd_secret_uuid in cinder-volume.conf, libvirt received the wrong user secret and couldn't boot the new instance because the new volume could not be accessed. Unfortunately the errors in the logs didn't give helpful information in this case.

Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) wrote :

hi .. i'm facing the same problem. Please see attached screenshot

Changed in horizon:
status: Invalid → Confirmed
Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) wrote :

I've disabled the default-create-volume in horizon configuration then its showing the image name.

Sorry for the inconvenience.

Changed in horizon:
status: Confirmed → Invalid
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.