Rebuild instance panel does not show project images when using Glance V2

Bug #1671693 reported by MarkMielke
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Dr. Jens Harbott

Bug Description

When using Glance v2, the "rebuild instance" panel shows public images, but does not show project images.

Steps to reproduce:
* Configure Horizon to use Glance v2
* Create a private image in project A
* Rebuild an instance in project A from the instances dashboard
* The image list will show public images, but not project images

Upon more detailed investigation, the "rebuild instance" function calls code that searches for images based upon "property-owner_id", which only works in Glance v1. In Glance v2, it should use "owner".

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/444091

Changed in horizon:
assignee: nobody → MarkMielke (mark-mielke)
status: New → In Progress
Revision history for this message
Mateusz Kowalski (makowals) wrote :

Hi,

I have tagged the bug as a duplicate, but the patch is fully correct.
Just to keep it consistent and not to have two reports on the same issue.

Thanks,
Mateusz

Revision history for this message
MarkMielke (mark-mielke) wrote :

Hi Mateusz:

I don't believe this is a duplicate of #1655259.

In the other issue, which I did notice and read carefully, it said:

"When opening rebuild instance panel, the images shared with a specific project id are not shown. Only public or project-owned images are available which causes lack of some images in an environment where there are images which are neither public nor project-owned."

This seems to suggest that "project-owned images are available", which is not my observation. My observation is that "project-owned images" were not available.

I think they are separate issues with separate fixes.

I see you proposed a fix to #1655259 and it is not the same fix as my proposed fix, which also confirms it is not a duplicate.

I do see they are both related to "Rebuild instance" not showing all the images. But, that's pretty much where the similarity stops... Do you agree?

Revision history for this message
Mateusz Kowalski (makowals) wrote :

Hi,

Okay, that makes sense. After first look I see my patch should become a bit different after this one gets merged, but that's a totally different story.

Sorry for the unnecessary noise !

Cheers,
Mateusz

Revision history for this message
Jan Klare (j-klare) wrote :

Hi,

since this is not release specific or something that is new in master, i think this should also be backported to at least Newton and Ocata after merged in master.

Cheers,
Jan

Changed in horizon:
assignee: MarkMielke (mark-mielke) → Dr. Jens Rosenboom (j-rosenboom-j)
Revision history for this message
Akihiro Motoki (amotoki) wrote :

Targeting this to Pike-2 for better attraction for reviews.
I believe it is worth digging into the detail of glance v2 support.

Changed in horizon:
importance: Undecided → High
milestone: none → pike-2
tags: added: newton-backport-potential ocata-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/444091
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=445117eb1fa1cd67e21e69243fbbe12c453192fa
Submitter: Jenkins
Branch: master

commit 445117eb1fa1cd67e21e69243fbbe12c453192fa
Author: Mark Mielke <email address hidden>
Date: Thu Mar 9 23:16:51 2017 -0500

    Image list function should normalize owner filter

    The api.glance.image_list_detailed() function accepts a list of
    filters which it then translates into a form that is acceptable for
    Glance v1 or Glance v2. These translations included support for
    mapping 'is_public' to 'visibility', but did not include support for
    mapping 'property-owner_id' to 'owner'.

    This changes adds support for mapping 'property-owner_id' to 'owner'
    for Glance v2, and mapping 'owner' to 'property-owner_id' for Glance
    v1.

    Before this fix, "rebuild instance" from the instances page did not
    properly list project-specific images as options. After this fix,
    "rebuild instance" is working as expected.

    Change-Id: Ica750f8b36bdbadd02a81aed41fd250864a49a66
    Closes-Bug: 1671693

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

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/463334

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/463335

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

Reviewed: https://review.openstack.org/463334
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=aab378b6272eeab10280c3ae02fc5a426b6285ca
Submitter: Jenkins
Branch: stable/ocata

commit aab378b6272eeab10280c3ae02fc5a426b6285ca
Author: Mark Mielke <email address hidden>
Date: Thu Mar 9 23:16:51 2017 -0500

    Image list function should normalize owner filter

    The api.glance.image_list_detailed() function accepts a list of
    filters which it then translates into a form that is acceptable for
    Glance v1 or Glance v2. These translations included support for
    mapping 'is_public' to 'visibility', but did not include support for
    mapping 'property-owner_id' to 'owner'.

    This changes adds support for mapping 'property-owner_id' to 'owner'
    for Glance v2, and mapping 'owner' to 'property-owner_id' for Glance
    v1.

    Before this fix, "rebuild instance" from the instances page did not
    properly list project-specific images as options. After this fix,
    "rebuild instance" is working as expected.

    Change-Id: Ica750f8b36bdbadd02a81aed41fd250864a49a66
    Closes-Bug: 1671693
    (cherry picked from commit 445117eb1fa1cd67e21e69243fbbe12c453192fa)

tags: added: in-stable-ocata
Revision history for this message
Simon Leinen (simon-leinen) wrote :

This regression caused a customer complaint after our recent upgrade to Newton, so we'd love to see this backported. Kudos to Mark Mielke for cherry-picking and proposing https://review.openstack.org/463335! (And apologies for stupidly hitting the cherry-pick button and overwriting his commit with an identical -02 revision.)-:

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

Reviewed: https://review.openstack.org/463335
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=99f7c8c9ad26539473f65f30547ba548c02ab4fe
Submitter: Jenkins
Branch: stable/newton

commit 99f7c8c9ad26539473f65f30547ba548c02ab4fe
Author: Mark Mielke <email address hidden>
Date: Thu Mar 9 23:16:51 2017 -0500

    Image list function should normalize owner filter

    The api.glance.image_list_detailed() function accepts a list of
    filters which it then translates into a form that is acceptable for
    Glance v1 or Glance v2. These translations included support for
    mapping 'is_public' to 'visibility', but did not include support for
    mapping 'property-owner_id' to 'owner'.

    This changes adds support for mapping 'property-owner_id' to 'owner'
    for Glance v2, and mapping 'owner' to 'property-owner_id' for Glance
    v1.

    Before this fix, "rebuild instance" from the instances page did not
    properly list project-specific images as options. After this fix,
    "rebuild instance" is working as expected.

    Change-Id: Ica750f8b36bdbadd02a81aed41fd250864a49a66
    Closes-Bug: 1671693
    (cherry picked from commit 445117eb1fa1cd67e21e69243fbbe12c453192fa)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 11.0.2

This issue was fixed in the openstack/horizon 11.0.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 10.0.4

This issue was fixed in the openstack/horizon 10.0.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 12.0.0.0b2

This issue was fixed in the openstack/horizon 12.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.