list servers always returns all with 'ip6' filter

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

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

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 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': ''}
2015-05-01 15:53:56.426 | Body: {"servers": [{"id": "0ab24a98-9725-47cd-86c9-de907da24329", "links": [{"href": "", "rel": "self"}, {"href": "", "rel": "bookmark"}], "name": "ListServerFiltersTestJSON-instance-319015482"}, {"id": "3a8bef8f-4f20-4b9f-89b0-905a8f4ba726", "links": [{"href": "", "rel": "self"}, {"href": "", "rel": "bookmark"}], "name": "ListServerFiltersTestJSON-instance-313871351"}, {"id": "ce24a53a-f412-4fb5-8da5-c7d0cbdc5fba", "links": [{"href": "", "rel": "self"}, {"href": "", "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:

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/

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