Public bug reported: "glance member-create" CLI Shares a specific image with a tenant.
usage: glance member-create [--can-share] <IMAGE> <TENANT_ID> Positional arguments: <IMAGE> Image to add member to. <TENANT_ID> Tenant to add as member If I pass a non-existing tenant as <TENANT ID>, it also accept that and adds as a member of that image while it should raise error as "No tenant with a name or ID of '-----' exists." Below are the command execution logs- $ keystone tenant-list +----------------------------------+----------+---------+ | id | name | enabled | +----------------------------------+----------+---------+ | a1c37cc595024369aa2124b50adaa0b8 | admin | True | | 31dd5bdca08e4ce0b208ef618142875b | cephtest | True | | 944ffc3c82f0444488eb7f61bc77bef0 | demo | True | | ed34d901e2314ab6a93e01ebad44e445 | service | True | +----------------------------------+----------+---------+ $ glance image-list +--------------------------------------+----------------------------+-------------+------------------+------------+--------+ | ID | Name | Disk Format | Container Format | Size | Status | +--------------------------------------+----------------------------+-------------+------------------+------------+--------+ | 90368993-bd57-4b99-b371-98ff771b9c3f | ceph-test-image | raw | bare | 13147648 | active | | e3d88dcf-8c96-425e-b5eb-0d64c737d193 | ceph-test-snapshot | raw | bare | 1073741824 | active | | 8ead940a-6ee8-43db-b45d-8895c5c59805 | ceph-test-yatin | raw | bare | 13147648 | active | $ glance member-create 8ead940a-6ee8-43db-b45d-8895c5c59805 a1c37cc595024369 --> with incomplete or wrong Tenant-ID $ glance member-list --image-id 8ead940a-6ee8-43db-b45d-8895c5c59805 +--------------------------------------+------------------+-----------+ | Image ID | Member ID | Can Share | +--------------------------------------+------------------+-----------+ | 8ead940a-6ee8-43db-b45d-8895c5c59805 | a1c37cc595024369 | | +--------------------------------------+------------------+-----------+ ** Affects: glance Importance: Undecided Status: New ** Description changed: "glance member-create" CLI Shares a specific image with a tenant. usage: glance member-create [--can-share] <IMAGE> <TENANT_ID> Positional arguments: - <IMAGE> Image to add member to. - <TENANT_ID> Tenant to add as member + <IMAGE> Image to add member to. + <TENANT_ID> Tenant to add as member - - If I pass a non-existing tenant as <TENANT ID>, it also accept that and adds as a member of that image while it should raise + If I pass a non-existing tenant as <TENANT ID>, it also accept that and adds as a member of that image while it should raise error as "No tenant with a name or ID of '-----' exists." Below are the command execution logs- $ keystone tenant-list +----------------------------------+----------+---------+ | id | name | enabled | +----------------------------------+----------+---------+ | a1c37cc595024369aa2124b50adaa0b8 | admin | True | | 31dd5bdca08e4ce0b208ef618142875b | cephtest | True | | 944ffc3c82f0444488eb7f61bc77bef0 | demo | True | | ed34d901e2314ab6a93e01ebad44e445 | service | True | +----------------------------------+----------+---------+ $ glance image-list +--------------------------------------+----------------------------+-------------+------------------+------------+--------+ | ID | Name | Disk Format | Container Format | Size | Status | +--------------------------------------+----------------------------+-------------+------------------+------------+--------+ | 90368993-bd57-4b99-b371-98ff771b9c3f | ceph-test-image | raw | bare | 13147648 | active | | e3d88dcf-8c96-425e-b5eb-0d64c737d193 | ceph-test-snapshot | raw | bare | 1073741824 | active | | 8ead940a-6ee8-43db-b45d-8895c5c59805 | ceph-test-yatin | raw | bare | 13147648 | active | + $ glance member-create 8ead940a-6ee8-43db-b45d-8895c5c59805 + a1c37cc595024369 --> with incomplete or wrong Tenant-ID - $ glance member-create 8ead940a-6ee8-43db-b45d-8895c5c59805 a1c37cc595024369 --> with incomplete or wrong Tenant-ID - - necadmin@nechldcst-PowerEdge-2950:~$ glance member-list --image-id 8ead940a-6ee8-43db-b45d-8895c5c59805 + $ glance member-list --image-id 8ead940a-6ee8-43db-b45d-8895c5c59805 +--------------------------------------+------------------+-----------+ | Image ID | Member ID | Can Share | +--------------------------------------+------------------+-----------+ | 8ead940a-6ee8-43db-b45d-8895c5c59805 | a1c37cc595024369 | | +--------------------------------------+------------------+-----------+ -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to Glance. https://bugs.launchpad.net/bugs/1389618 Title: "glance member-create" CLI adds non existing member/tenant with image Status in OpenStack Image Registry and Delivery Service (Glance): New Bug description: "glance member-create" CLI Shares a specific image with a tenant. usage: glance member-create [--can-share] <IMAGE> <TENANT_ID> Positional arguments: <IMAGE> Image to add member to. <TENANT_ID> Tenant to add as member If I pass a non-existing tenant as <TENANT ID>, it also accept that and adds as a member of that image while it should raise error as "No tenant with a name or ID of '-----' exists." Below are the command execution logs- $ keystone tenant-list +----------------------------------+----------+---------+ | id | name | enabled | +----------------------------------+----------+---------+ | a1c37cc595024369aa2124b50adaa0b8 | admin | True | | 31dd5bdca08e4ce0b208ef618142875b | cephtest | True | | 944ffc3c82f0444488eb7f61bc77bef0 | demo | True | | ed34d901e2314ab6a93e01ebad44e445 | service | True | +----------------------------------+----------+---------+ $ glance image-list +--------------------------------------+----------------------------+-------------+------------------+------------+--------+ | ID | Name | Disk Format | Container Format | Size | Status | +--------------------------------------+----------------------------+-------------+------------------+------------+--------+ | 90368993-bd57-4b99-b371-98ff771b9c3f | ceph-test-image | raw | bare | 13147648 | active | | e3d88dcf-8c96-425e-b5eb-0d64c737d193 | ceph-test-snapshot | raw | bare | 1073741824 | active | | 8ead940a-6ee8-43db-b45d-8895c5c59805 | ceph-test-yatin | raw | bare | 13147648 | active | $ glance member-create 8ead940a-6ee8-43db-b45d-8895c5c59805 a1c37cc595024369 --> with incomplete or wrong Tenant-ID $ glance member-list --image-id 8ead940a-6ee8-43db-b45d-8895c5c59805 +--------------------------------------+------------------+-----------+ | Image ID | Member ID | Can Share | +--------------------------------------+------------------+-----------+ | 8ead940a-6ee8-43db-b45d-8895c5c59805 | a1c37cc595024369 | | +--------------------------------------+------------------+-----------+ To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/1389618/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp