← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1552071] [NEW] Non-admin users can use changes-since to show deleted instances when list servers

 

Public bug reported:

When I'm working on adding --changes-since parameter for python-novaclient,
I find out that non-admin user can use changes-since to show deleted instances.
As deleted instances can only be listed for admin users. It will be aslo reasonable
to filter out deleted isntances for non-admin users when they list servers with
changes-since.

root@SZX1000058625:/opt/devstack# source openrc demo admin
root@SZX1000058625:/opt/devstack# nova list --changes-since 2016-01-29T06:21:22.000000
+--------------------------------------+--------------------+---------+------------+-------------+---------------------------------------------------------+----------------------+
| ID                                   | Name               | Status  | Task State | Power State | Networks                                                | Updated              |
+--------------------------------------+--------------------+---------+------------+-------------+---------------------------------------------------------+----------------------+
| 5f2feba3-e956-4175-bd37-03ef16f11868 | 123                | DELETED | deleting   | NOSTATE     |                                                         | 2016-02-02T03:42:48Z |
| ea88ef3c-62ae-4eb8-a20b-4745f7912f44 | Fedora_OpenStack   | DELETED | -          | NOSTATE     |                                                         | 2016-02-27T02:42:44Z |
| 6dd69e8b-13a5-4605-9a6e-4bb05d404af0 | aaa                | DELETED | deleting   | NOSTATE     |                                                         | 2016-02-02T03:42:48Z |
| f4ee363a-0647-4046-8384-7d937dd6fe5c | abc                | DELETED | deleting   | NOSTATE     |                                                         | 2016-02-02T03:42:48Z |
| 2ba5dee6-882c-4afe-9f6d-845e873a7bcc | test1              | DELETED | deleting   | NOSTATE     |                                                         | 2016-02-27T02:42:44Z |
| 4ac56a74-e1f9-4927-8ae1-45b4bacac6f9 | test1              | DELETED | -          | Running     |                                                         | 2016-02-02T05:00:56Z |
| 55796b9d-39fd-43e9-9e1e-daa3149ec3c1 | test1              | DELETED | -          | NOSTATE     |                                                         | 2016-02-27T02:42:45Z |
| 94d54139-a182-42f4-aca1-d1312cac4271 | test1              | DELETED | -          | NOSTATE     |                                                         | 2016-02-29T02:23:48Z |
| 85884223-a951-453c-a78b-f03df254a6e7 | test123            | DELETED | deleting   | NOSTATE     |                                                         | 2016-02-02T03:42:49Z |
| 40bab05f-0692-43df-a8a9-e7c0d58a73bd | test_inject        | ACTIVE  | -          | Running     | private=10.0.0.13, fdb7:5d7b:6dcd:0:f816:3eff:fe63:b012 | 2016-02-29T06:21:22Z |
| 8d5b0cb8-36ac-4a64-b741-4e71475ad57f | test_inject        | DELETED | -          | NOSTATE     |                                                         | 2016-02-29T02:23:48Z |
| ee8907c7-0730-4051-8426-64be44300e70 | test_inject        | ACTIVE  | -          | Running     | private=10.0.0.14, fdb7:5d7b:6dcd:0:f816:3eff:fe4f:1b32 | 2016-02-29T06:24:16Z |
| 9ac4fac2-e250-4216-9985-1981437adbad | test_inject_rest   | DELETED | -          | NOSTATE     |                                                         | 2016-02-29T02:23:48Z |
| a09c340a-e416-472f-ad0f-ed7b2418d461 | test_inject_rest_1 | DELETED | -          | NOSTATE     |                                                         | 2016-02-29T02:23:48Z |
+--------------------------------------+--------------------+---------+------------+-------------+---------------------------------------------------------+----------------------+
root@SZX1000058625:/opt/devstack# nova list --deleted
+--------------------------------------+-------------+--------+------------+-------------+---------------------------------------------------------+
| ID                                   | Name        | Status | Task State | Power State | Networks                                                |
+--------------------------------------+-------------+--------+------------+-------------+---------------------------------------------------------+
| 40bab05f-0692-43df-a8a9-e7c0d58a73bd | test_inject | ACTIVE | -          | Running     | private=10.0.0.13, fdb7:5d7b:6dcd:0:f816:3eff:fe63:b012 |
| ee8907c7-0730-4051-8426-64be44300e70 | test_inject | ACTIVE | -          | Running     | private=10.0.0.14, fdb7:5d7b:6dcd:0:f816:3eff:fe4f:1b32 |
+--------------------------------------+-------------+--------+------------+-------------+---------------------------------------------------------+

** Affects: nova
     Importance: Undecided
     Assignee: Zhenyu Zheng (zhengzhenyu)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Zhenyu Zheng (zhengzhenyu)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1552071

Title:
  Non-admin users can use changes-since to show deleted instances when
  list servers

Status in OpenStack Compute (nova):
  New

Bug description:
  When I'm working on adding --changes-since parameter for python-novaclient,
  I find out that non-admin user can use changes-since to show deleted instances.
  As deleted instances can only be listed for admin users. It will be aslo reasonable
  to filter out deleted isntances for non-admin users when they list servers with
  changes-since.

  root@SZX1000058625:/opt/devstack# source openrc demo admin
  root@SZX1000058625:/opt/devstack# nova list --changes-since 2016-01-29T06:21:22.000000
  +--------------------------------------+--------------------+---------+------------+-------------+---------------------------------------------------------+----------------------+
  | ID                                   | Name               | Status  | Task State | Power State | Networks                                                | Updated              |
  +--------------------------------------+--------------------+---------+------------+-------------+---------------------------------------------------------+----------------------+
  | 5f2feba3-e956-4175-bd37-03ef16f11868 | 123                | DELETED | deleting   | NOSTATE     |                                                         | 2016-02-02T03:42:48Z |
  | ea88ef3c-62ae-4eb8-a20b-4745f7912f44 | Fedora_OpenStack   | DELETED | -          | NOSTATE     |                                                         | 2016-02-27T02:42:44Z |
  | 6dd69e8b-13a5-4605-9a6e-4bb05d404af0 | aaa                | DELETED | deleting   | NOSTATE     |                                                         | 2016-02-02T03:42:48Z |
  | f4ee363a-0647-4046-8384-7d937dd6fe5c | abc                | DELETED | deleting   | NOSTATE     |                                                         | 2016-02-02T03:42:48Z |
  | 2ba5dee6-882c-4afe-9f6d-845e873a7bcc | test1              | DELETED | deleting   | NOSTATE     |                                                         | 2016-02-27T02:42:44Z |
  | 4ac56a74-e1f9-4927-8ae1-45b4bacac6f9 | test1              | DELETED | -          | Running     |                                                         | 2016-02-02T05:00:56Z |
  | 55796b9d-39fd-43e9-9e1e-daa3149ec3c1 | test1              | DELETED | -          | NOSTATE     |                                                         | 2016-02-27T02:42:45Z |
  | 94d54139-a182-42f4-aca1-d1312cac4271 | test1              | DELETED | -          | NOSTATE     |                                                         | 2016-02-29T02:23:48Z |
  | 85884223-a951-453c-a78b-f03df254a6e7 | test123            | DELETED | deleting   | NOSTATE     |                                                         | 2016-02-02T03:42:49Z |
  | 40bab05f-0692-43df-a8a9-e7c0d58a73bd | test_inject        | ACTIVE  | -          | Running     | private=10.0.0.13, fdb7:5d7b:6dcd:0:f816:3eff:fe63:b012 | 2016-02-29T06:21:22Z |
  | 8d5b0cb8-36ac-4a64-b741-4e71475ad57f | test_inject        | DELETED | -          | NOSTATE     |                                                         | 2016-02-29T02:23:48Z |
  | ee8907c7-0730-4051-8426-64be44300e70 | test_inject        | ACTIVE  | -          | Running     | private=10.0.0.14, fdb7:5d7b:6dcd:0:f816:3eff:fe4f:1b32 | 2016-02-29T06:24:16Z |
  | 9ac4fac2-e250-4216-9985-1981437adbad | test_inject_rest   | DELETED | -          | NOSTATE     |                                                         | 2016-02-29T02:23:48Z |
  | a09c340a-e416-472f-ad0f-ed7b2418d461 | test_inject_rest_1 | DELETED | -          | NOSTATE     |                                                         | 2016-02-29T02:23:48Z |
  +--------------------------------------+--------------------+---------+------------+-------------+---------------------------------------------------------+----------------------+
  root@SZX1000058625:/opt/devstack# nova list --deleted
  +--------------------------------------+-------------+--------+------------+-------------+---------------------------------------------------------+
  | ID                                   | Name        | Status | Task State | Power State | Networks                                                |
  +--------------------------------------+-------------+--------+------------+-------------+---------------------------------------------------------+
  | 40bab05f-0692-43df-a8a9-e7c0d58a73bd | test_inject | ACTIVE | -          | Running     | private=10.0.0.13, fdb7:5d7b:6dcd:0:f816:3eff:fe63:b012 |
  | ee8907c7-0730-4051-8426-64be44300e70 | test_inject | ACTIVE | -          | Running     | private=10.0.0.14, fdb7:5d7b:6dcd:0:f816:3eff:fe4f:1b32 |
  +--------------------------------------+-------------+--------+------------+-------------+---------------------------------------------------------+

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


Follow ups