yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #05707
[Bug 1231485] Re: v2 member-create call allows the same tenant to be added multiple times
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 <flwang@xxxxxxxxxx>
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
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1231485
Title:
v2 member-create call allows the same tenant to be added multiple
times
Status in OpenStack Image Registry and Delivery Service (Glance):
Fix Released
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1231485/+subscriptions