Bug 976461

Summary: [RFE] Allow all tenants to use attribute ip in server search options
Product: Red Hat OpenStack Reporter: Russell Bryant <rbryant>
Component: openstack-novaAssignee: Brent Eagles <beagles>
Status: CLOSED ERRATA QA Contact: David Ripton <dripton>
Severity: unspecified Docs Contact:
Priority: low    
Version: 4.0CC: ajeain, beagles, breeler, dallan, jkt, mlopes, ndipanov, nobody, sclewis
Target Milestone: asyncKeywords: FutureFeature, OtherQA
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/nova/+spec/add-attribute-ip-in-server-search-options
Whiteboard:
Fixed In Version: openstack-nova-2013.2-0.8.b2.el6ost Doc Type: Enhancement
Doc Text:
A new feature makes 'IP attribute' available to all tenants in server search. Previous releases allowed only admin tenants to search by IP attribute. It is a valuable query criteria when managing large numbers of VMs and has been made available to all tenants. Now, any tenant can use the IP attribute in server searches.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-20 00:07:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 988961    
Bug Blocks: 975499    

Comment 2 Russell Bryant 2013-07-03 13:50:13 UTC
This used to be admin only.  Now it works for everyone:

$ nova list --ip 10.0.0.2
+--------------------------------------+------+--------+------------+-------------+------------------+
| ID                                   | Name | Status | Task State | Power State | Networks         |
+--------------------------------------+------+--------+------------+-------------+------------------+
| af256f7f-1367-45cf-929a-d495fdf36d08 | test | ACTIVE | None       | Running     | private=10.0.0.2 |
+--------------------------------------+------+--------+------------+-------------+------------------+

Comment 5 Scott Lewis 2013-08-01 17:35:18 UTC
Matched priority to upstream.

Comment 10 Brent Eagles 2013-09-30 14:41:56 UTC
Sorry about that Nir. Test looks good. The functionality is pretty straightforward and you have positive and negative cases covered, so I'd say you have it covered.

Comment 14 Brent Eagles 2013-12-18 21:50:39 UTC
Code matching patch is in current build (2013-12-16.1).

This patch is not currently working as expected with neutron in this build.

To test, I created multiple VMs as a tenant:

| eef17d12-ca58-48bb-adf1-731d043679ef | vm1  | ACTIVE | None       | Running     | labnet=192.168.90.2; mechnet=192.168.100.2, 192.168.2.52 |
| 636c4982-f8fa-4075-8254-1cd188a59286 | vm2  | ACTIVE | None       | Running     | labnet=192.168.90.4, 192.168.2.53; mechnet=192.168.100.4 |
| 22632247-423e-4ece-a898-5b65d0f6225b | vm3  | ACTIVE | None       | Running     | labnet=192.168.90.5; mechnet=192.168.100.5               |
| f64dd50f-30a2-43ed-87c1-01b2b758b8cd | vm4  | ACTIVE | None       | Running     | labnet=192.168.90.6; mechnet=192.168.100.6               |
| d65e276a-7c86-45c3-8255-1ef5dcf4d9f6 | vm5  | ACTIVE | None       | Running     | mechnet=192.168.100.7                                    |
| 7bc24433-8e6b-47b4-8ce9-58cb6a6cc6f8 | vm6  | ACTIVE | None       | Running     | labnet=192.168.90.7                                      |

And ran queries such as 

nova list --ip "192.168.90\\..*"

and no results were returned. Monitoring the api.log file I can see queries on the neutron client of the form:

REQ: curl -i http://192.168.10.83:9696/v2.0/ports.json?fixed_ips=ip_address%3D192%5C..%2A -X GET -H "X-Auth-Token: MIIMUwYJKoZ


I believe this is malformed. Invoking the same request from the command line results in an empty port list being returned.

Cutting and pasting the query with a correct query string such as:

curl -i http://192.168.10.83:9696/v2.0/ports.json?ip_address=192%5C..%2A -X 

Returns results consistent with the expected behavior. It would appear that the query as constructed from the integration library is not correct.

Comment 16 errata-xmlrpc 2013-12-20 00:07:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1859.html