CLI 'tenant-update' fails to disable tenant

Bug #976947 reported by shwinpiocess
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Darren Birkett

Bug Description

First,I use CLI 'keystone tenant-create ' to create a tenant named 'test'.And the 'enabled' property of tenant 'test' is 'True'!

root@key:~# keystone tenant-create --name test --enabled True
+-------------+----------------------------------+
| Property | Value |
+-------------+----------------------------------+
| description | None |
| enabled | True |
| id | 07ab61a14ab748fa8fc8597be7f74b09 |
| name | test |
+-------------+----------------------------------+
root@key:~# keystone tenant-list
+----------------------------------+--------------------+---------+
| id | name | enabled |
+----------------------------------+--------------------+---------+
| 07ab61a14ab748fa8fc8597be7f74b09 | test | True |
| 1861a7f94cd7430686ebe84212228942 | admin | True |
| 34b1c3bf50e54adab476a4e364cb63a2 | service | True |
| 86c28dad39c443f1b15ecf6533de5229 | demo | True |
| c794f1a77c1049b095537abbb6af086d | invisible_to_admin | True |
+----------------------------------+--------------------+---------+

From above,we can see that the 'enabled' property of tenant 'test' is 'True'.Now,I'll use CLI 'keystone tenant-update' to change the 'enabled' property of tenant 'test'. The results are shown below.

root@key:~# keystone tenant-update --enabled False 07ab61a14ab748fa8fc8597be7f74b09
root@key:~# keystone tenant-list
+----------------------------------+--------------------+---------+
| id | name | enabled |
+----------------------------------+--------------------+---------+
| 07ab61a14ab748fa8fc8597be7f74b09 | test | True |
| 1861a7f94cd7430686ebe84212228942 | admin | True |
| 34b1c3bf50e54adab476a4e364cb63a2 | service | True |
| 86c28dad39c443f1b15ecf6533de5229 | demo | True |
| c794f1a77c1049b095537abbb6af086d | invisible_to_admin | True |
+----------------------------------+--------------------+---------+

From the results,we can see that the 'enabled' property of tenant 'test' is also 'True'!When I go to view the database, the database does not work!

Now,I use CLI 'keystone tenant-create ' to create a tenant named 'test1'.But the 'enabled' property of tenant 'test1' is 'False'!

root@key:~# keystone tenant-create --name test1 --enabled False
+-------------+----------------------------------+
| Property | Value |
+-------------+----------------------------------+
| description | None |
| enabled | False |
| id | a475dc734c4449479f4b17ab858c7c3c |
| name | test1 |
+-------------+----------------------------------+
root@key:~# keystone tenant-list
+----------------------------------+--------------------+---------+
| id | name | enabled |
+----------------------------------+--------------------+---------+
| 07ab61a14ab748fa8fc8597be7f74b09 | test | True |
| 1861a7f94cd7430686ebe84212228942 | admin | True |
| 34b1c3bf50e54adab476a4e364cb63a2 | service | True |
| 86c28dad39c443f1b15ecf6533de5229 | demo | True |
| a475dc734c4449479f4b17ab858c7c3c | test1 | False |
| c794f1a77c1049b095537abbb6af086d | invisible_to_admin | True |
+----------------------------------+--------------------+---------+

From above,we know that the 'enabled' property of tenant 'test1' is 'False'.Now,I'll use CLI 'keystone tenant-update' to change the property of the tenant 'test1'!

root@key:~# keystone tenant-update --enabled True a475dc734c4449479f4b17ab858c7c3c
root@key:~# keystone tenant-list
+----------------------------------+--------------------+---------+
| id | name | enabled |
+----------------------------------+--------------------+---------+
| 07ab61a14ab748fa8fc8597be7f74b09 | test | True |
| 1861a7f94cd7430686ebe84212228942 | admin | True |
| 34b1c3bf50e54adab476a4e364cb63a2 | service | True |
| 86c28dad39c443f1b15ecf6533de5229 | demo | True |
| a475dc734c4449479f4b17ab858c7c3c | test1 | True |
| c794f1a77c1049b095537abbb6af086d | invisible_to_admin | True |
+----------------------------------+--------------------+---------+

It works well!Now I want to change the 'enabled' property of tenant 'test' from 'True' to 'False'.

root@key:~# keystone tenant-update --enabled False a475dc734c4449479f4b17ab858c7c3c
root@key:~# keystone tenant-list
+----------------------------------+--------------------+---------+
| id | name | enabled |
+----------------------------------+--------------------+---------+
| 07ab61a14ab748fa8fc8597be7f74b09 | test | True |
| 1861a7f94cd7430686ebe84212228942 | admin | True |
| 34b1c3bf50e54adab476a4e364cb63a2 | service | True |
| 86c28dad39c443f1b15ecf6533de5229 | demo | True |
| a475dc734c4449479f4b17ab858c7c3c | test1 | True |
| c794f1a77c1049b095537abbb6af086d | invisible_to_admin | True |
+----------------------------------+--------------------+---------+

It doesn't work!And I go to view the database,the database doesn't work !

However,when I do all the operations in the dashboard,it works well!

Dolph Mathews (dolph)
summary: - Error in using CLI 'keystone tenant-update'
+ CLI 'tenant-update' fails to disable tenant
Revision history for this message
Dolph Mathews (dolph) wrote :

Was able to reproduce, but I'm unclear on what you mean by "When I go to view the database, the database does not work!"; I'm going to assume that's extraneous to this issue, however.

Changed in keystone:
importance: Undecided → Medium
milestone: none → folsom-1
status: New → Confirmed
Revision history for this message
shwinpiocess (shwinpiocess) wrote :

When I use CLI "keystone tenant-update" to disable tenant,general data of the database has not changed!

Changed in keystone:
assignee: nobody → Darren Birkett (darren-birkett)
Changed in keystone:
status: Confirmed → In Progress
affects: keystone → python-keystoneclient
Changed in python-keystoneclient:
milestone: folsom-1 → none
affects: python-keystoneclient → keystone
Revision history for this message
adapaka bhavaniprasad (adapaka-prasad) wrote :

Hi shwinpiocess,

 Same thing i have tried in keystone stabel/essex 2012.1 version. its working fine. I was able to disable tenant by keystone-update command.check it once with stable/essex 2012.1 vesrion.

Regards,
adapaka prasad.

Revision history for this message
shwinpiocess (shwinpiocess) wrote :

Thanks!

Changed in keystone:
status: In Progress → Fix Released
Revision history for this message
Darren Birkett (darren-birkett) wrote :

This doesn't appear fixed for me in stable/essex:

root@ubun-controller:~# keystone tenant-create --name dave
+-------------+----------------------------------+
| Property | Value |
+-------------+----------------------------------+
| description | None |
| enabled | True |
| id | 778cdc82bc574946989ddbfdce62e791 |
| name | dave |
+-------------+----------------------------------+
root@ubun-controller:~# keystone tenant-update --name dave --enabled False 778cdc82bc574946989ddbfdce62e791
root@ubun-controller:~# keystone tenant-get 778cdc82bc574946989ddbfdce62e791
+-------------+----------------------------------+
| Property | Value |
+-------------+----------------------------------+
| description | None |
| enabled | True |
| id | 778cdc82bc574946989ddbfdce62e791 |
| name | dave |
+-------------+----------------------------------+

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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