← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1800689] [NEW] After sharing an image with consumer, owner id is assigned as consumer project id

 

Public bug reported:

[root@ip9-114-192-143 ~]# openstack image show rhel-svc
---------------------------------------------------------------+
| checksum         | d41d8cd98f00b204e9800998ecf8427e                                                                                                                                                                                                                                                                                                                                                                                                                  |
| container_format | bare                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| created_at       | 2018-10-30T13:32:25Z                                                                                                                                                                                                                                                                                                                                                                                                                              |
| disk_format      | raw                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| file             | /v2/images/8fa5a8c6-150b-49c0-88f0-b6a6fa8849b0/file                                                                                                                                                                                                                                                                                                                                                                                              |
| id               | 8fa5a8c6-150b-49c0-88f0-b6a6fa8849b0                                                                                                                                                                                                                                                                                                                                                                                                              |
| min_disk         | 1                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| min_ram          | 0                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| name             | rhel-svc                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| owner            | bf46fb095af344739bf78cdbba7df022                                                                                                                                                                                                                                                                                                                                                                                                                  |
| properties       | architecture='ppc64', bdm_v2='true', block_device_mapping='[{"guest_format":null,"boot_index":0,"no_device":null,"image_id":null,"volume_id":"5029cb07-3869-4bf5-8f05-5d4dda91bda1","disk_bus":null,"volume_size":null,"source_type":"volume","device_type":"disk","snapshot_id":null,"destination_type":"volume","delete_on_termination":true}]', endianness='big-endian', hypervisor_type='phyp', os_distro='rhel', root_device_name='/dev/sda' |
| protected        | False                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| schema           | /v2/schemas/image                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| size             | 0                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| status           | active                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| tags             |                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| updated_at       | 2018-10-30T13:32:26Z                                                                                                                                                                                                                                                                                                                                                                                                                              |
| virtual_size     | None                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| visibility       | private                                                                                                                                                                                                                                                                                                                                                                                                                                           |

So Image rhel-svc is currently belong to project ibm-default
[root@ip9-114-192-143 ~]# openstack project list
+----------------------------------+-----------------+
| ID                               | Name            |
+----------------------------------+-----------------+
| 2546035b8188472aa8a0ebf9c27acdb8 | cinder-internal |
| 2f53abb621194ac09849dd5b09aa59e0 | chhavi          |
| a1968f4e651d444fb13b9f13dbf00137 | service         |
| b33fb44f96f64d84a0b73e39b39e9e31 | chshared        |
| b7633f4048304bb6a0460468413766c1 | admin           |
| b90df91061e44d8ab7fbf3deb1ba2b3b | prodpvc         |
| bf46fb095af344739bf78cdbba7df022 | ibm-default     |
| cd25a7adcb884aeca1eff25efd0204d3 | powervm         |
+----------------------------------+-----------------+
[root@ip9-114-192-143 ~]#

[root@ip9-114-192-143 ~]# openstack image set rhel-svc --shared
[root@ip9-114-192-143 ~]#

Sharing with Project prodpvc
[root@ip9-114-192-143 ~]# openstack image add project rhel-svc b90df91061e44d8ab7fbf3deb1ba2b3b
+------------+--------------------------------------+
| Field      | Value                                |
+------------+--------------------------------------+
| created_at | 2018-10-30T16:56:49Z                 |
| image_id   | 8fa5a8c6-150b-49c0-88f0-b6a6fa8849b0 |
| member_id  | b90df91061e44d8ab7fbf3deb1ba2b3b     |
| schema     | /v2/schemas/member                   |
| status     | pending                              |
| updated_at | 2018-10-30T16:56:49Z                 |
+------------+--------------------------------------+
[root@ip9-114-192-143 ~]#

On consumer accepting the project
[bob@ip9-114-192-143 ~]$ openstack image set --accept --project b90df91061e44d8ab7fbf3deb1ba2b3b rhel-svc
[bob@ip9-114-192-143 ~]$

Setting the owner_id for the consumer project id
[bob@ip9-114-192-143 ~]$ openstack image show rhel-svc | grep owner
| owner            | b90df91061e44d8ab7fbf3deb1ba2b3b                                                                                                                                                                                                                                                                                                                                                                                                                  |
[bob@ip9-114-192-143 ~]$

Openstack stable/queens

** 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/1800689

Title:
  After sharing an image with consumer, owner id is assigned as consumer
  project id

Status in Glance:
  New

Bug description:
  [root@ip9-114-192-143 ~]# openstack image show rhel-svc
  ---------------------------------------------------------------+
  | checksum         | d41d8cd98f00b204e9800998ecf8427e                                                                                                                                                                                                                                                                                                                                                                                                                  |
  | container_format | bare                                                                                                                                                                                                                                                                                                                                                                                                                                              |
  | created_at       | 2018-10-30T13:32:25Z                                                                                                                                                                                                                                                                                                                                                                                                                              |
  | disk_format      | raw                                                                                                                                                                                                                                                                                                                                                                                                                                               |
  | file             | /v2/images/8fa5a8c6-150b-49c0-88f0-b6a6fa8849b0/file                                                                                                                                                                                                                                                                                                                                                                                              |
  | id               | 8fa5a8c6-150b-49c0-88f0-b6a6fa8849b0                                                                                                                                                                                                                                                                                                                                                                                                              |
  | min_disk         | 1                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
  | min_ram          | 0                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
  | name             | rhel-svc                                                                                                                                                                                                                                                                                                                                                                                                                                          |
  | owner            | bf46fb095af344739bf78cdbba7df022                                                                                                                                                                                                                                                                                                                                                                                                                  |
  | properties       | architecture='ppc64', bdm_v2='true', block_device_mapping='[{"guest_format":null,"boot_index":0,"no_device":null,"image_id":null,"volume_id":"5029cb07-3869-4bf5-8f05-5d4dda91bda1","disk_bus":null,"volume_size":null,"source_type":"volume","device_type":"disk","snapshot_id":null,"destination_type":"volume","delete_on_termination":true}]', endianness='big-endian', hypervisor_type='phyp', os_distro='rhel', root_device_name='/dev/sda' |
  | protected        | False                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | schema           | /v2/schemas/image                                                                                                                                                                                                                                                                                                                                                                                                                                 |
  | size             | 0                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
  | status           | active                                                                                                                                                                                                                                                                                                                                                                                                                                            |
  | tags             |                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
  | updated_at       | 2018-10-30T13:32:26Z                                                                                                                                                                                                                                                                                                                                                                                                                              |
  | virtual_size     | None                                                                                                                                                                                                                                                                                                                                                                                                                                              |
  | visibility       | private                                                                                                                                                                                                                                                                                                                                                                                                                                           |

  So Image rhel-svc is currently belong to project ibm-default
  [root@ip9-114-192-143 ~]# openstack project list
  +----------------------------------+-----------------+
  | ID                               | Name            |
  +----------------------------------+-----------------+
  | 2546035b8188472aa8a0ebf9c27acdb8 | cinder-internal |
  | 2f53abb621194ac09849dd5b09aa59e0 | chhavi          |
  | a1968f4e651d444fb13b9f13dbf00137 | service         |
  | b33fb44f96f64d84a0b73e39b39e9e31 | chshared        |
  | b7633f4048304bb6a0460468413766c1 | admin           |
  | b90df91061e44d8ab7fbf3deb1ba2b3b | prodpvc         |
  | bf46fb095af344739bf78cdbba7df022 | ibm-default     |
  | cd25a7adcb884aeca1eff25efd0204d3 | powervm         |
  +----------------------------------+-----------------+
  [root@ip9-114-192-143 ~]#

  [root@ip9-114-192-143 ~]# openstack image set rhel-svc --shared
  [root@ip9-114-192-143 ~]#

  Sharing with Project prodpvc
  [root@ip9-114-192-143 ~]# openstack image add project rhel-svc b90df91061e44d8ab7fbf3deb1ba2b3b
  +------------+--------------------------------------+
  | Field      | Value                                |
  +------------+--------------------------------------+
  | created_at | 2018-10-30T16:56:49Z                 |
  | image_id   | 8fa5a8c6-150b-49c0-88f0-b6a6fa8849b0 |
  | member_id  | b90df91061e44d8ab7fbf3deb1ba2b3b     |
  | schema     | /v2/schemas/member                   |
  | status     | pending                              |
  | updated_at | 2018-10-30T16:56:49Z                 |
  +------------+--------------------------------------+
  [root@ip9-114-192-143 ~]#

  On consumer accepting the project
  [bob@ip9-114-192-143 ~]$ openstack image set --accept --project b90df91061e44d8ab7fbf3deb1ba2b3b rhel-svc
  [bob@ip9-114-192-143 ~]$

  Setting the owner_id for the consumer project id
  [bob@ip9-114-192-143 ~]$ openstack image show rhel-svc | grep owner
  | owner            | b90df91061e44d8ab7fbf3deb1ba2b3b                                                                                                                                                                                                                                                                                                                                                                                                                  |
  [bob@ip9-114-192-143 ~]$

  Openstack stable/queens

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


Follow ups