list servers always returns all with 'ip6' filter

Bug #1450859 reported by David Kranz on 2015-05-01
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Medium
Unassigned

Bug Description

A tempest test was failing because it was trying to filter servers based on ip from an ipv6 subnet but was not using the 'ip6' query param. But the fix to use 'ip6' failed because all servers are returned instead of just the one with that ipv6 addr.

This is most easily seen by just doing:

nova list --ip6 xxx

which returns all servers vs

nova list --ip xxx

which returns none.

For reference, the actual failing call from http://logs.openstack.org/98/179398/1/experimental/check-tempest-dsvm-neutron-full-non-admin/aa764bb/console.html:

2015-05-01 15:53:56.426 | 2015-05-01 15:22:28,839 30116 INFO [tempest_lib.common.rest_client] Request (ListServerFiltersTestJSON:test_list_servers_filtered_by_ip): 200 GET http://127.0.0.1:8774/v2/40784510a9f046a0a0d70f339f2d71d8/servers?ip6=fd81%3Aaad7%3Afb2%3A0%3Af816%3A3eff%3Afef3%3A8aaa 0.060s
2015-05-01 15:53:56.426 | 2015-05-01 15:22:28,840 30116 DEBUG [tempest_lib.common.rest_client] Request - Headers: {'X-Auth-Token': '<omitted>', 'Accept': 'application/json', 'Content-Type': 'application/json'}
2015-05-01 15:53:56.426 | Body: None
2015-05-01 15:53:56.426 | Response - Headers: {'content-type': 'application/json', 'x-compute-request-id': 'req-ac54be26-7689-4092-b42a-f3161c80295b', 'date': 'Fri, 01 May 2015 15:22:28 GMT', 'content-length': '1147', 'status': '200', 'connection': 'close', 'content-location': 'http://127.0.0.1:8774/v2/40784510a9f046a0a0d70f339f2d71d8/servers?ip6=fd81%3Aaad7%3Afb2%3A0%3Af816%3A3eff%3Afef3%3A8aaa'}
2015-05-01 15:53:56.426 | Body: {"servers": [{"id": "0ab24a98-9725-47cd-86c9-de907da24329", "links": [{"href": "http://127.0.0.1:8774/v2/40784510a9f046a0a0d70f339f2d71d8/servers/0ab24a98-9725-47cd-86c9-de907da24329", "rel": "self"}, {"href": "http://127.0.0.1:8774/40784510a9f046a0a0d70f339f2d71d8/servers/0ab24a98-9725-47cd-86c9-de907da24329", "rel": "bookmark"}], "name": "ListServerFiltersTestJSON-instance-319015482"}, {"id": "3a8bef8f-4f20-4b9f-89b0-905a8f4ba726", "links": [{"href": "http://127.0.0.1:8774/v2/40784510a9f046a0a0d70f339f2d71d8/servers/3a8bef8f-4f20-4b9f-89b0-905a8f4ba726", "rel": "self"}, {"href": "http://127.0.0.1:8774/40784510a9f046a0a0d70f339f2d71d8/servers/3a8bef8f-4f20-4b9f-89b0-905a8f4ba726", "rel": "bookmark"}], "name": "ListServerFiltersTestJSON-instance-313871351"}, {"id": "ce24a53a-f412-4fb5-8da5-c7d0cbdc5fba", "links": [{"href": "http://127.0.0.1:8774/v2/40784510a9f046a0a0d70f339f2d71d8/servers/ce24a53a-f412-4fb5-8da5-c7d0cbdc5fba", "rel": "self"}, {"href": "http://127.0.0.1:8774/40784510a9f046a0a0d70f339f2d71d8/servers/ce24a53a-f412-4fb5-8da5-c7d0cbdc5fba", "rel": "bookmark"}], "name": "ListServerFiltersTestJSON-instance-950662797"}]}

Tags: api Edit Tag help
Dr. Jens Harbott (j-harbott) wrote :

Seems like ip6 is missing from the list of allowed options for non-admin access:

http://logs.openstack.org/98/179398/1/experimental/check-tempest-dsvm-neutron-full-non-admin/aa764bb/logs/screen-n-api.txt.gz#_2015-05-01_15_22_28_784

DEBUG nova.api.openstack.compute.servers [req-ac54be26-7689-4092-b42a-f3161c80295b demo demo] Removing options 'ip6' from query remove_invalid_options /opt/stack/new/nova/nova/api/openstack/compute/servers.py:1156

So "nova list --ip6 xxx" is just treated like "nova list".

Changed in nova:
status: New → In Progress
assignee: nobody → Dr. Jens Rosenboom (j-rosenboom-j)
Changed in nova:
status: In Progress → Confirmed
assignee: Dr. Jens Rosenboom (j-rosenboom-j) → nobody
Changed in nova:
assignee: nobody → Jay Pipes (jaypipes)
status: Confirmed → In Progress
Jay Pipes (jaypipes) on 2015-05-16
Changed in nova:
assignee: Jay Pipes (jaypipes) → Dr. Jens Rosenboom (j-rosenboom-j)
importance: Undecided → Medium
Matt Riedemann (mriedem) on 2015-05-28
tags: added: api
Changed in nova:
assignee: Dr. Jens Rosenboom (j-rosenboom-j) → nobody
status: In Progress → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers