yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #54357
[Bug 1607317] [NEW] metadata def namespace update CLI is not working as expected for parameter "protected"
Public bug reported:
In v2 glance metadata def namespace update API, it is observed that when
we are updating protected parameter with different invalid values, it
updates this parameter inappropriately.
Following CLI update output shows this behavior -
##################### Create a v2 metadata def namespace using admin
credentials -
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-create test-ns
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | False |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:51:25Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$
#################### Now look at below different invalid protected parameters and behavior -
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --debug --os-image-api-version 2 md-namespace-update test-ns --protected True
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | True |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:51:32Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | True |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:51:32Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected True
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | True |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:51:32Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected False
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | False |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:53:04Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected "True"
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | True |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:53:12Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected "True_1"
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | False |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:53:23Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected "T"
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | True |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:53:58Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected 0
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | False |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:54:24Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected 2
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | False |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:54:24Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected 1
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | True |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:54:36Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected 11
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | False |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:54:39Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected T
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | True |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:55:22Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected F
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | False |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:55:25Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected "T"
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | True |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:56:21Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected "?"
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | False |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:56:24Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$
>From above, we can see that for --protected in ["?". "#", "T", "F", "True_1", 0, 1, 11 etc..] namespace is updated inappropriately.
for example - if we put "?" --> it is changed to "False" (which was "True" before update )automatically without any error.
and many i
** 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/1607317
Title:
metadata def namespace update CLI is not working as expected for
parameter "protected"
Status in Glance:
New
Bug description:
In v2 glance metadata def namespace update API, it is observed that
when we are updating protected parameter with different invalid
values, it updates this parameter inappropriately.
Following CLI update output shows this behavior -
##################### Create a v2 metadata def namespace using admin
credentials -
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-create test-ns
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | False |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:51:25Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$
#################### Now look at below different invalid protected parameters and behavior -
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --debug --os-image-api-version 2 md-namespace-update test-ns --protected True
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | True |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:51:32Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | True |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:51:32Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected True
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | True |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:51:32Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected False
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | False |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:53:04Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected "True"
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | True |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:53:12Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected "True_1"
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | False |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:53:23Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected "T"
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | True |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:53:58Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected 0
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | False |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:54:24Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected 2
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | False |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:54:24Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected 1
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | True |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:54:36Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected 11
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | False |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:54:39Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected T
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | True |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:55:22Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected F
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | False |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:55:25Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected "T"
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | True |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:56:21Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$ glance --os-image-api-version 2 md-namespace-update test-ns --protected "?"
+------------+----------------------------------+
| Property | Value |
+------------+----------------------------------+
| created_at | 2016-07-28T10:51:25Z |
| namespace | test-ns |
| owner | 93efcc2b00164c61aafaa6f234b99bc3 |
| protected | False |
| schema | /v2/schemas/metadefs/namespace |
| updated_at | 2016-07-28T10:56:24Z |
| visibility | private |
+------------+----------------------------------+
stack@ubuntu-VirtualBox:/opt/stack/tempest$
From above, we can see that for --protected in ["?". "#", "T", "F", "True_1", 0, 1, 11 etc..] namespace is updated inappropriately.
for example - if we put "?" --> it is changed to "False" (which was "True" before update )automatically without any error.
and many i
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1607317/+subscriptions
Follow ups