← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1527143] [NEW] Unable to re-add deleted members in v1

 

Public bug reported:

I am unable to replace the membership list of an image using glance v1
API with a list containing members that were previously deleted.

Note :- This is only observed with the bulk replace membership list API i.e
PUT request to http://localhost:9292/v1/images/<IMAGE_ID>/members

Individually deleting & adding members to an image does work.

E.g

1. Add a new member to an image using the bulk update API (i.e replace membership list)  :-
curl -X PUT -H "X-Auth-Token: CHANGEME" -H "Content-Type: application/json" -d '{
    "memberships": [
        {
            "member_id": "test-member-12345",
            "can_share": false
        }
    ]
}' 'http://localhost:9292/v1/images/<IMAGE_ID>/members'


2. glance --os-image-api-version 1 member-delete <IMAGE_ID> "test-member-12345"

3. Repeat step 1 (i.e add the same member)

4. glance --os-image-api-version 1 member-list --image-id <IMAGE_ID>

ACTUAL:-
+----------+-----------+-----------+
| Image ID | Member ID | Can Share |
+----------+-----------+-----------+
+----------+-----------+-----------+

EXPECTED:-
+--------------------------------------+-------------------+-----------+
| Image ID                             | Member ID         | Can Share |
+--------------------------------------+-------------------+-----------+
| 7ae9ca4b-9f65-4549-8c36-304a06e76294 | test-member-12345 |           |
+--------------------------------------+-------------------+-----------+


This seems to be  a consequence of the fix for bug
https://bugs.launchpad.net/glance/+bug/1462315

** Affects: glance
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1527143

Title:
  Unable to re-add deleted members in v1

Status in Glance:
  New

Bug description:
  I am unable to replace the membership list of an image using glance v1
  API with a list containing members that were previously deleted.

  Note :- This is only observed with the bulk replace membership list API i.e
  PUT request to http://localhost:9292/v1/images/<IMAGE_ID>/members

  Individually deleting & adding members to an image does work.

  E.g

  1. Add a new member to an image using the bulk update API (i.e replace membership list)  :-
  curl -X PUT -H "X-Auth-Token: CHANGEME" -H "Content-Type: application/json" -d '{
      "memberships": [
          {
              "member_id": "test-member-12345",
              "can_share": false
          }
      ]
  }' 'http://localhost:9292/v1/images/<IMAGE_ID>/members'

  
  2. glance --os-image-api-version 1 member-delete <IMAGE_ID> "test-member-12345"

  3. Repeat step 1 (i.e add the same member)

  4. glance --os-image-api-version 1 member-list --image-id <IMAGE_ID>

  ACTUAL:-
  +----------+-----------+-----------+
  | Image ID | Member ID | Can Share |
  +----------+-----------+-----------+
  +----------+-----------+-----------+

  EXPECTED:-
  +--------------------------------------+-------------------+-----------+
  | Image ID                             | Member ID         | Can Share |
  +--------------------------------------+-------------------+-----------+
  | 7ae9ca4b-9f65-4549-8c36-304a06e76294 | test-member-12345 |           |
  +--------------------------------------+-------------------+-----------+

  
  This seems to be  a consequence of the fix for bug
  https://bugs.launchpad.net/glance/+bug/1462315

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1527143/+subscriptions


Follow ups