Launch instance only lists snapshots of images not created with a new volume

Bug #1627619 reported by Kenji Ishii
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Wangliangyu

Bug Description

In launch instance modal, a user can choose a boot source.
When a user select 'Instance Snapshots', snapshots are listed.

However, these snapshots are not all.
At the moment, there are listed only snapshots created from a instance not creating new volume.

As far as I know, when a user create a snapshot created from a instance with new volume, it doesn't have image_type.
Instead of this, this has 'block_device_mapping' object. This object has 'source_type' attribute like below.

----
block_device_mapping='[{"guest_format": null, "boot_index": 0, "delete_on_termination": false, "no_device": null, "snapshot_id": "267a6729-056a-42b0-adaf-9d24eaeca67f", "device_name": "/dev/vda", "disk_bus": "virtio", "image_id": null, "source_type": "snapshot", "tag": null, "device_type": "disk", "volume_id": null, "destination_type": "volume", "volume_size": 1}]'
----

Horizon is judging by only image_type but it seems not to be enough.

ref:properties of snapshots created from a instance with new volume
----
base_image_ref='', bdm_v2='True', block_device_mapping='[{"guest_format": null, "boot_index": 0, "delete_on_termination": false, "no_device": null, "snapshot_id": "267a6729-056a-42b0 |
| | -adaf-9d24eaeca67f", "device_name": "/dev/vda", "disk_bus": "virtio", "image_id": null, "source_type": "snapshot", "tag": null, "device_type": "disk", "volume_id": null, |
| | "destination_type": "volume", "volume_size": 1}]', kernel_id='0dafcdfc-4f80-4bf1-9e78-d4e9c5c8ef8c', ramdisk_id='baa56d26-6dfd-48c5-8f3d-230d9688de84', root_device_name='/dev/vda'
----

ref: properties of snapshots created from a instance not creating new volume.
----
base_image_ref='7c732922-6cb5-4b08-9247-13d4440ee992', image_location='snapshot', image_state='available', image_type='snapshot', instance_uuid='355dbfa8-c654-4dc3-a26d-c6b80383d2dd', kernel_id='0dafcdfc-4f80-4bf1-9e78-d4e9c5c8ef8c', owner_id='a25277ddba2b48ad969fedac2511ff1f', ramdisk_id='baa56d26-6dfd-48c5-8f3d-230d9688de84',
----

Kenji Ishii (ken-ishii)
summary: - A part of Instance snapshots in launch instance are not listed
+ A part of Instance snapshots are not listed in launch instance
Changed in horizon:
assignee: nobody → Kenji Ishii (ken-ishii)
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/379274

Changed in horizon:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Rob Cresswell (<email address hidden>) on branch: master
Review: https://review.openstack.org/379274
Reason: Abandoned due to inactivity. Feel free to restore and work on it if you have time

Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote : Re: A part of Instance snapshots are not listed in launch instance

Removed assignee due to inactivity. Feel free to reassign yourself if you get time to work on it.

Changed in horizon:
assignee: Kenji Ishii (ken-ishii) → nobody
status: In Progress → New
summary: - A part of Instance snapshots are not listed in launch instance
+ Some instance snapshots are not listed in launch instance
Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

This is reproducible on master (queens)

summary: - Some instance snapshots are not listed in launch instance
+ Launch instance only lists snapshots of images not created with a new
+ volume
Changed in horizon:
status: New → Confirmed
importance: Undecided → Medium
Wangliangyu (wangly)
Changed in horizon:
assignee: nobody → Wangliangyu (wangly)
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/548181

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Ivan Kolodyazhny (<email address hidden>) on branch: master
Review: https://review.openstack.org/548181
Reason: This review is > 4 months without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Changed in horizon:
assignee: Wangliangyu (wangly) → Akihiro Motoki (amotoki)
Akihiro Motoki (amotoki)
Changed in horizon:
assignee: Akihiro Motoki (amotoki) → Wangliangyu (wangly)
milestone: none → stein-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/548181
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=5f4057f8b5ebc9909f153f85875c131701f00fd1
Submitter: Zuul
Branch: master

commit 5f4057f8b5ebc9909f153f85875c131701f00fd1
Author: wangliangyu <email address hidden>
Date: Mon Feb 26 18:05:25 2018 +0800

    Show snapshots list correctly when launching instance

    In launch instance modal, when a user selects 'Instance Snapshots',
    not all snapshots are listed. The snapshots which are created from
    an instance with new volume or an instance created from volume
    or volume snapshot don't have 'image_type' but 'block_device_mapping'.
    So, judging only by image_type is not enough.

    Change-Id: I7e175b6a7260ca3d82560427a8f742f8cfa35565
    Closes-Bug: #1627619

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

This issue was fixed in the openstack/horizon 15.0.0.0b2 development milestone.

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.