v2 member-create call allows the same tenant to be added multiple times

Bug #1231485 reported by Brian Rosmaita
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Critical
Feilong Wang

Bug Description

This is glanceclient output, but it's happening at the api level.

demo! glance --os-image-api-version 2 member-list --image-id a96be11e-8536-4910-92cb-de50aa19dfe6
+--------------------------------------+----------------------------------+----------+
| Image ID | Member ID | Status |
+--------------------------------------+----------------------------------+----------+
| a96be11e-8536-4910-92cb-de50aa19dfe6 | | pending |
| a96be11e-8536-4910-92cb-de50aa19dfe6 | 8989447062e04a818baf9e073fd04fa7 | rejected |
| a96be11e-8536-4910-92cb-de50aa19dfe6 | 8989447062e04a818baf9e073fd04fa7 | pending |
| a96be11e-8536-4910-92cb-de50aa19dfe6 | 8989447062e04a818baf9e073fd04fa7 | pending |
+--------------------------------------+----------------------------------+----------+

demo! glance --os-image-api-version 2 member-delete a96be11e-8536-4910-92cb-de50aa19dfe6 8989447062e04a818baf9e073fd04fa7

demo! glance --os-image-api-version 2 member-list --image-id a96be11e-8536-4910-92cb-de50aa19dfe6+--------------------------------------+----------------------------------+---------+
| Image ID | Member ID | Status |
+--------------------------------------+----------------------------------+---------+
| a96be11e-8536-4910-92cb-de50aa19dfe6 | | pending |
| a96be11e-8536-4910-92cb-de50aa19dfe6 | 8989447062e04a818baf9e073fd04fa7 | pending |
| a96be11e-8536-4910-92cb-de50aa19dfe6 | 8989447062e04a818baf9e073fd04fa7 | pending |
+--------------------------------------+----------------------------------+---------+

So the workaround is to delete them all. As far as I can tell, when the member does an image-list, the visibility is controlled by the status of the first occurrence of the tenantId. Same thing when the member updates his/her status.

description: updated
description: updated
Changed in glance:
importance: Undecided → High
milestone: none → havana-rc1
Feilong Wang (flwang)
Changed in glance:
assignee: nobody → Fei Long Wang (flwang)
status: New → Confirmed
Changed in glance:
status: Confirmed → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/48496

Changed in glance:
status: Triaged → In Progress
Changed in glance:
milestone: havana-rc1 → icehouse-1
tags: added: havana-rc-potential
Changed in glance:
importance: High → Critical
Thierry Carrez (ttx)
Changed in glance:
milestone: icehouse-1 → havana-rc2
tags: removed: havana-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/48496
Committed: http://github.com/openstack/glance/commit/2d1a67a9f6a032045c8176a1a53d7613d8b0d567
Submitter: Jenkins
Branch: master

commit 2d1a67a9f6a032045c8176a1a53d7613d8b0d567
Author: Fei Long Wang <email address hidden>
Date: Fri Sep 27 01:05:29 2013 +0800

    Do not allow the same member to be added twice

    This patch add an existence check before add new member for image.

    Fixes bug 1231485

    Change-Id: I10d37c6f169e070ea6699cca78b6360be9fb11dc

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

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/50829

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (milestone-proposed)

Reviewed: https://review.openstack.org/50829
Committed: http://github.com/openstack/glance/commit/f3b178481f11b09172fd2a2ff159b101702ce251
Submitter: Jenkins
Branch: milestone-proposed

commit f3b178481f11b09172fd2a2ff159b101702ce251
Author: Fei Long Wang <email address hidden>
Date: Fri Sep 27 01:05:29 2013 +0800

    Do not allow the same member to be added twice

    This patch add an existence check before add new member for image.

    Fixes bug 1231485

    Change-Id: I10d37c6f169e070ea6699cca78b6360be9fb11dc

Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: havana-rc2 → 2013.2
Revision history for this message
Alex Meade (alex-meade) wrote :

Made a bug with some more thoughts around this issue: https://bugs.launchpad.net/glance/+bug/1255607

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.