Comment 2 for bug 1481812

Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

Hmm, looks like we forbid users to list deleted instances (when done by simple "nova list"), but at the same time passing "changes-since" allows to circumvent that.

ubuntu@rpodolyaka-devstack-tempest:~/devstack$ nova list --deleted
+--------------------------------------+------+--------+------------+-------------+--------------------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+--------------------------------------------------------+
| 0fc22f61-a55e-46de-87fd-94a1e7b2141c | demo | ACTIVE | - | Running | private=10.0.0.5, fdad:2959:8cd7:0:f816:3eff:fe04:522d |
+--------------------------------------+------+--------+------------+-------------+--------------------------------------------------------+

ubuntu@rpodolyaka-devstack-tempest:~/devstack$ curl -s -H "X-Auth-Token: e9819485d45f428c8e52c03b22460cc9" -X GET http://192.168.0.13:8774/v2/dc3cad5a802b4ba1b86f8562d2f91c0d/servers?changes-since=2015-01-01\&limit=2 | python -m json.tool
{
    "servers": [
        {
            "id": "0fc22f61-a55e-46de-87fd-94a1e7b2141c",
            "links": [
                {
                    "href": "http://192.168.0.13:8774/v2/dc3cad5a802b4ba1b86f8562d2f91c0d/servers/0fc22f61-a55e-46de-87fd-94a1e7b2141c",
                    "rel": "self"
                },
                {
                    "href": "http://192.168.0.13:8774/dc3cad5a802b4ba1b86f8562d2f91c0d/servers/0fc22f61-a55e-46de-87fd-94a1e7b2141c",
                    "rel": "bookmark"
                }
            ],
            "name": "demo"
        },
        {
            "id": "7c837fc6-3503-4ae0-b474-1b1e55ca446a",
            "links": [
                {
                    "href": "http://192.168.0.13:8774/v2/dc3cad5a802b4ba1b86f8562d2f91c0d/servers/7c837fc6-3503-4ae0-b474-1b1e55ca446a",
                    "rel": "self"
                },
                {
                    "href": "http://192.168.0.13:8774/dc3cad5a802b4ba1b86f8562d2f91c0d/servers/7c837fc6-3503-4ae0-b474-1b1e55ca446a",
                    "rel": "bookmark"
                }
            ],
            "name": "tempest-heat-319343001-Server-f5bl4lw4ejln"
        }
    ],
    "servers_links": [
        {
            "href": "http://192.168.0.13:8774/v2/dc3cad5a802b4ba1b86f8562d2f91c0d/servers?changes-since=2015-01-01&limit=2&marker=7c837fc6-3503-4ae0-b474-1b1e55ca446a",
            "rel": "next"
        }
    ]
}

Still, when marker is passed, the deleted entry will be invisible to the user and cause the error.