when create a tenant,the enabled's status is false,but when call tenant-list ,the enabled's status is true

Bug #953678 reported by shwinpiocess
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Dolph Mathews

Bug Description

keystone tenant-create --name 'test' --enabled 'false'

+-------------+----------------------------------+
| Property | Value |
+-------------+----------------------------------+
| description | None |
| enabled | false |
| id | 946e93dc55c64858a4a531b55bd5d5dd |
| name | test |
+-------------+----------------------------------+

keystone tenant-list

+----------------------------------+--------------------+---------+
| id | name | enabled |
+----------------------------------+--------------------+---------+
| 07596f811df94054bc142412ff2dc1a5 | demo | True |
| 0885f8701243456ab6103857a4d3e8d5 | invisible_to_admin | True |
| 16058f817f6b4717a8f10655d502761c | service | True |
| 946e93dc55c64858a4a531b55bd5d5dd | test | True |
| e365454e378a4ab0ae2477bf6891e5e3 | admin | True |
+----------------------------------+--------------------+---------+

when we call "keystone tenant-list"
expected the "enabled" status of the test tenant is false
however it shows that the "enabled" status of the test tenant is true
and in the dashboard it also shows that the "enabled" status of the test tenant is true
the database works well

Revision history for this message
Dolph Mathews (dolph) wrote :

`keystone tenant-get` shows the correct value of 'enabled', but `keystone tenant-list` does not.

Changed in keystone:
status: New → Confirmed
Revision history for this message
Dolph Mathews (dolph) wrote :

It looks like GET /v2.0/tenants is returning 'enabled' as a boolean (as expected), but GET /v2.0/tenants/{tenant_id} is returning 'enabled' as a string.

I'm guessing the string is being evaluated as a True value for the tenant list.

Changed in keystone:
assignee: nobody → Dolph Mathews (dolph)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/5289

Changed in keystone:
status: Confirmed → In Progress
Revision history for this message
Dolph Mathews (dolph) wrote :

In part, this is an issue in the client CLI (evaluating 'false' == True) and also applies to `keystone user-create`.

There is still an outstanding issue on GET /v2.0/tenants (not sure if it's on the client or server side yet).

Changed in keystone:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/5291

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/5291
Committed: http://github.com/openstack/keystone/commit/dc41cb5c11951b416d3e379bc944ac85737b979a
Submitter: Jenkins
Branch: master

commit dc41cb5c11951b416d3e379bc944ac85737b979a
Author: Dolph Mathews <email address hidden>
Date: Tue Mar 13 16:11:27 2012 -0500

    Failing to update tenants (bug 953678, bug 954673)

    - GET /tenants: Enabled attribute was being overridden
    - "POST" /tenants/{tenant_id}: was failing to update KVS

    Change-Id: Icc1efef52d35777d73e6010bdfc0409e24570aa2

Changed in keystone:
status: In Progress → Fix Committed
Revision history for this message
shwinpiocess (shwinpiocess) wrote :
Download full text (4.0 KiB)

Bug is still there!

root@winpiocess:~# keystone tenant-create --name 'test' --enabled 'False'
+-------------+----------------------------------+
| Property | Value |
+-------------+----------------------------------+
| description | None |
| enabled | False |
| id | 55929f20859841658616e57b2f82dd59 |
| name | test |
+-------------+----------------------------------+
root@winpiocess:~# keystone tenant-create --name 'test1' --enabled 'True'
+-------------+----------------------------------+
| Property | Value |
+-------------+----------------------------------+
| description | None |
| enabled | True |
| id | 0d7d1ebdb0e844a7bf354dc9781858c6 |
| name | test1 |
+-------------+----------------------------------+
root@winpiocess:~# keystone tenant-list
+----------------------------------+--------------------+---------+
| id | name | enabled |
+----------------------------------+--------------------+---------+
| 0d7d1ebdb0e844a7bf354dc9781858c6 | test1 | True |
| 3c3c5482a7d948e995938b93a1d3c25f | demo | True |
| 55929f20859841658616e57b2f82dd59 | test | False |
| 561f404e135f4326998d08851b188fbe | admin | True |
| 887a80268c794022a5bbfbad7250089d | service | True |
| ae5221ba50684cbf897cb85e0f106e1f | invisible_to_admin | True |
+----------------------------------+--------------------+---------+
root@winpiocess:~# keystone tenant-update --enabled 'False' 0d7d1ebdb0e844a7bf354dc9781858c6
root@winpiocess:~# keystone tenant-list
+----------------------------------+--------------------+---------+
| id | name | enabled |
+----------------------------------+--------------------+---------+
| 0d7d1ebdb0e844a7bf354dc9781858c6 | test1 | True |
| 3c3c5482a7d948e995938b93a1d3c25f | demo | True |
| 55929f20859841658616e57b2f82dd59 | test | False |
| 561f404e135f4326998d08851b188fbe | admin | True |
| 887a80268c794022a5bbfbad7250089d | service | True |
| ae5221ba50684cbf897cb85e0f106e1f | invisible_to_admin | True |
+----------------------------------+--------------------+---------+
root@winpiocess:~# keystone tenant-update --enabled 'True' 55929f20859841658616e57b2f82dd59
root@winpiocess:~# keystone tenant-list
+----------------------------------+--------------------+---------+
| id | name | enabled |
+----------------------------------+--------------------+---------+
| 0d7d1ebdb0e844a7bf354dc9781858c6 | test1 | True |
| 3c3c5482a7d948e995938b93a1d3c25f | demo | True |
| 55929f20859841658616e57b2f82dd59 | test | True |
| 561f404e135f4326998d08851b188fbe | admin | True |
| 887a80268c794022a5bbfbad7250089d | service | True |
| a...

Read more...

Changed in keystone:
status: Fix Committed → Incomplete
Thierry Carrez (ttx)
Changed in keystone:
status: Incomplete → New
Revision history for this message
Dolph Mathews (dolph) wrote :

shwinpiocess, there are two patches linked above, one for the client, and one for the server. At this point, only one of them has merged.

Specifically, this bug is still pending https://review.openstack.org/#change,5289 which would explain the symptoms shown above.

Changed in keystone:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)

Reviewed: https://review.openstack.org/5289
Committed: http://github.com/openstack/python-keystoneclient/commit/5c223fb641abab8dc148741dd17f2029d4370f7f
Submitter: Jenkins
Branch: master

commit 5c223fb641abab8dc148741dd17f2029d4370f7f
Author: Dolph Mathews <email address hidden>
Date: Tue Mar 13 15:51:23 2012 -0500

    enabled treated as string (bug 953678)

    Change-Id: I897797b3fb264647c486e6c10eab8edd00eadbcc

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → essex-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.