Impossible to launch instance from community image

Bug #1914045 reported by Lars Erik Pedersen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Akihiro Motoki

Bug Description

Hi,

This seems to be a "duplicate" of bug 1779250 but not quite. I have trouble launching a community image from horizon:

How to reproduce:
- Create two projects, A and B.
- In project A, create a snapshot of a VM
- Set the snapshot to community
- Switch to project B
- Try to launch a new instance, and select "visibility: community" in the launch instance panel
- Observe that no images are listed.

The community image is visible in the images panel, but the same issue occurs if I try to launch a new instance of the community image from the images panel.

Running CentOS 8.3 and openstack-dashboard.noarch 1:18.3.2-1.el8

This happens with both legacy and angular images_panel in the Horizon config.

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

I confirmed it. I can see the community image in project A but cannot see it in project B. Only a project which created the community image can see that image at the moment.

The situation I see so far is that a fix for bug 1779250, https://review.opendev.org/c/openstack/horizon/+/614688 fixed the issue but https://review.opendev.org/c/openstack/horizon/+/640762 introduced this regression.

Changed in horizon:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Akihiro Motoki (amotoki) wrote :
Changed in horizon:
assignee: nobody → Akihiro Motoki (amotoki)
status: Confirmed → In Progress
Revision history for this message
Akihiro Motoki (amotoki) wrote :

This affects stein and later releases.

https://review.opendev.org/c/openstack/horizon/+/640762 corresponds to commit ff5f74d5d0d5ef8f7c07ca8762b7ad197aea156f.

$ git tag --contains ff5f74d5d0d5ef8f7c07ca8762b7ad197aea156f
15.0.0
...
19.0.0
stein-em
$ git show 15.0.0
tag 15.0.0
Tagger: OpenStack Release Bot <email address hidden>
Date: Wed Apr 10 12:13:01 2019 +0000

horizon 15.0.0 release

meta:version: 15.0.0
meta:diff-start: 14.0.0.0rc1
meta:series: stein
meta:release-type: release

....

tags: added: stein-backport-potential train-backport-potential ussuri-backport-potential victoria-backport-potential
Revision history for this message
Vishal Manchanda (vishalmanchanda) wrote :
Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
Lars Erik Pedersen (pedersen-larserik) wrote :

Nice work! Looking forward to Ussuri backport :-)

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

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

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

Reviewed: https://review.opendev.org/c/openstack/horizon/+/779128
Committed: https://opendev.org/openstack/horizon/commit/c63e4c91aea30c3732403d9f5c031478e735d251
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit c63e4c91aea30c3732403d9f5c031478e735d251
Author: Akihiro Motoki <email address hidden>
Date: Fri Feb 26 07:59:59 2021 +0900

    Fix community image handling in launch instance form

    Community images which are not owned by a focused project are not
    included in the normal image list API (i.e., without specifying
    "community" as visibility), so we need an extra call of the image
    list API specifying "community" visibility in a filter.

    It was originally fixed by [1] but was dropped in [2].
    The main motivation of [2] is to address "Duplicates in a repeater
    are not allowed" error in the JavaScript console.

    The approach of [2] was to drop multiple glance API calls, but
    the right solution would be to check duplicated images included
    in both API calls. This situation with duplicated images happens
    when a community image is owned by a focused project. In such case,
    the community image is included in the responses of both API calls.

    This commit adds a logic to check image IDs already processed.

    [1] https://review.opendev.org/c/openstack/horizon/+/614688
    [2] https://review.opendev.org/c/openstack/horizon/+/640762

    Closes-Bug: #1914045
    Related-Bug: #1779250
    Related-Bug: #1818508

    Change-Id: I2ed1b6064ddd6f62818d6112e98e5d5a98beae9d
    (cherry picked from commit c9bb0e95eaa7ae4f0cce21bc0a246a9b0cd2f880)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (stable/stein)

Change abandoned by "Vishal Manchanda <email address hidden>" on branch: stable/stein
Review: https://review.opendev.org/c/openstack/horizon/+/779015

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (stable/train)

Change abandoned by "Vishal Manchanda <email address hidden>" on branch: stable/train
Review: https://review.opendev.org/c/openstack/horizon/+/779014

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

Reviewed: https://review.opendev.org/c/openstack/horizon/+/779013
Committed: https://opendev.org/openstack/horizon/commit/9467071b6d37e523659dcf62335ac7f7d54c4e0f
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 9467071b6d37e523659dcf62335ac7f7d54c4e0f
Author: Akihiro Motoki <email address hidden>
Date: Fri Feb 26 07:59:59 2021 +0900

    Fix community image handling in launch instance form

    Community images which are not owned by a focused project are not
    included in the normal image list API (i.e., without specifying
    "community" as visibility), so we need an extra call of the image
    list API specifying "community" visibility in a filter.

    It was originally fixed by [1] but was dropped in [2].
    The main motivation of [2] is to address "Duplicates in a repeater
    are not allowed" error in the JavaScript console.

    The approach of [2] was to drop multiple glance API calls, but
    the right solution would be to check duplicated images included
    in both API calls. This situation with duplicated images happens
    when a community image is owned by a focused project. In such case,
    the community image is included in the responses of both API calls.

    This commit adds a logic to check image IDs already processed.

    [1] https://review.opendev.org/c/openstack/horizon/+/614688
    [2] https://review.opendev.org/c/openstack/horizon/+/640762

    Closes-Bug: #1914045
    Related-Bug: #1779250
    Related-Bug: #1818508

    Change-Id: I2ed1b6064ddd6f62818d6112e98e5d5a98beae9d
    (cherry picked from commit c9bb0e95eaa7ae4f0cce21bc0a246a9b0cd2f880)

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

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

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

Reviewed: https://review.opendev.org/c/openstack/horizon/+/779014
Committed: https://opendev.org/openstack/horizon/commit/420c7ff94fd05ae87ed4129fc701f0b3278e025f
Submitter: "Zuul (22348)"
Branch: stable/train

commit 420c7ff94fd05ae87ed4129fc701f0b3278e025f
Author: Akihiro Motoki <email address hidden>
Date: Fri Feb 26 07:59:59 2021 +0900

    Fix community image handling in launch instance form

    Community images which are not owned by a focused project are not
    included in the normal image list API (i.e., without specifying
    "community" as visibility), so we need an extra call of the image
    list API specifying "community" visibility in a filter.

    It was originally fixed by [1] but was dropped in [2].
    The main motivation of [2] is to address "Duplicates in a repeater
    are not allowed" error in the JavaScript console.

    The approach of [2] was to drop multiple glance API calls, but
    the right solution would be to check duplicated images included
    in both API calls. This situation with duplicated images happens
    when a community image is owned by a focused project. In such case,
    the community image is included in the responses of both API calls.

    This commit adds a logic to check image IDs already processed.

    [1] https://review.opendev.org/c/openstack/horizon/+/614688
    [2] https://review.opendev.org/c/openstack/horizon/+/640762

    Closes-Bug: #1914045
    Related-Bug: #1779250
    Related-Bug: #1818508

    Change-Id: I2ed1b6064ddd6f62818d6112e98e5d5a98beae9d
    (cherry picked from commit c9bb0e95eaa7ae4f0cce21bc0a246a9b0cd2f880)

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (stable/stein)

Change abandoned by "Vishal Manchanda <email address hidden>" on branch: stable/stein
Review: https://review.opendev.org/c/openstack/horizon/+/779015
Reason: because horizon team decided to move stable/stein to EOL https://review.opendev.org/c/openstack/releases/+/885109

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

This issue was fixed in the openstack/horizon train-eol release.

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.