← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1360081] Re: Unable to list nova instances using "IP" regex filter

 

*** This bug is a duplicate of bug 1182883 ***
    https://bugs.launchpad.net/bugs/1182883

Actually neutron does not have regex-based queries feature for ip as
Nova-network does. Its related to neutron. They have in their plan for
the same.

** Changed in: python-novaclient
       Status: New => Invalid

** Also affects: neutron
   Importance: Undecided
       Status: New

** This bug has been marked a duplicate of bug 1182883
   List servers matching a regex fails with Quantum

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1360081

Title:
  Unable to list nova instances using "IP" regex filter

Status in OpenStack Neutron (virtual network service):
  New
Status in Python client library for Nova:
  Invalid

Bug description:
  CLI guide of nova list tells that instances can be listed out with IP
  regex filter  -

  [raies@localhost devstack]$ nova help list
  usage: nova list [--reservation-id <reservation-id>] [--ip <ip-regexp>]
                   [--ip6 <ip6-regexp>] [--name <name-regexp>]
                   [--instance-name <name-regexp>] [--status <status>]
                   [--flavor <flavor>] [--image <image>] [--host <hostname>]
                   [--all-tenants [<0|1>]] [--tenant [<tenant>]] [--deleted]
                   [--fields <fields>] [--minimal]

  List active servers.

  Optional arguments:
    --reservation-id <reservation-id>
                                  Only return servers that match reservation-id.
    --ip <ip-regexp>              Search with regular expression match by IP
                                  address.
    --ip6 <ip6-regexp>            Search with regular expression match by IPv6
                                  address.
    --name <name-regexp>          Search with regular expression match by name
    --instance-name <name-regexp>
                                  Search with regular expression match by server
                                  name.
    --status <status>             Search by server status
    --flavor <flavor>             Search by flavor name or ID
    --image <image>               Search by image name or ID
    --host <hostname>             Search servers by hostname to which they are
                                  assigned (Admin only).
    --all-tenants [<0|1>]         Display information from all tenants (Admin
                                  only).
    --tenant [<tenant>]           Display information from single tenant (Admin
                                  only).
    --deleted                     Only display deleted servers (Admin only).
    --fields <fields>             Comma-separated list of fields to display. Use
                                  the show command to see which fields are
                                  available.
    --minimal                     Get only uuid and name.

  I am able to filter instances using their name regex but I am unable to filter with IP regex.
  When I use complete IP only then IP instance of that IP can be listed but regex of IP does not work.

  Steps performed by me are as -

  1.

  [raies@localhost devstack]$ nova list
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+
  | ID                                   | Name        | Status | Task State | Power State | Networks           |
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+
  | 02cbf054-5813-4f3f-80a9-fb5cfeb0a494 | test-server | ACTIVE | -          | Running     | public=172.24.4.18 |
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+

  2.

  [raies@localhost devstack]$ nova list --name test
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+
  | ID                                   | Name        | Status | Task State | Power State | Networks           |
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+
  | 02cbf054-5813-4f3f-80a9-fb5cfeb0a494 | test-server | ACTIVE | -          | Running     | public=172.24.4.18 |
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+

  3.
  [raies@localhost devstack]$ nova list --name "test"
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+
  | ID                                   | Name        | Status | Task State | Power State | Networks           |
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+
  | 02cbf054-5813-4f3f-80a9-fb5cfeb0a494 | test-server | ACTIVE | -          | Running     | public=172.24.4.18 |
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+

  4.
  [raies@localhost devstack]$ nova list --name "test*"
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+
  | ID                                   | Name        | Status | Task State | Power State | Networks           |
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+
  | 02cbf054-5813-4f3f-80a9-fb5cfeb0a494 | test-server | ACTIVE | -          | Running     | public=172.24.4.18 |
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+

  5.

  [raies@localhost devstack]$ nova list --name test*
  +----+------+--------+------------+-------------+----------+
  | ID | Name | Status | Task State | Power State | Networks |
  +----+------+--------+------------+-------------+----------+
  +----+------+--------+------------+-------------+----------+

  6.

  [raies@localhost devstack]$ nova list --ip '\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b'
  +----+------+--------+------------+-------------+----------+
  | ID | Name | Status | Task State | Power State | Networks |
  +----+------+--------+------------+-------------+----------+
  +----+------+--------+------------+-------------+----------+

  7.

  [raies@localhost devstack]$ nova list --ip 172.24.4.18
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+
  | ID                                   | Name        | Status | Task State | Power State | Networks           |
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+
  | 02cbf054-5813-4f3f-80a9-fb5cfeb0a494 | test-server | ACTIVE | -          | Running     | public=172.24.4.18 |
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+

  8.

  [raies@localhost devstack]$ nova list --ip "172.24.4*"
  +----+------+--------+------------+-------------+----------+
  | ID | Name | Status | Task State | Power State | Networks |
  +----+------+--------+------------+-------------+----------+
  +----+------+--------+------------+-------------+----------+

  9.

  [raies@localhost devstack]$ nova list --ip 172.24.4.
  +----+------+--------+------------+-------------+----------+
  | ID | Name | Status | Task State | Power State | Networks |
  +----+------+--------+------------+-------------+----------+
  +----+------+--------+------------+-------------+----------+

  10.
  [raies@localhost devstack]$ nova list --ip 172.24.4
  +----+------+--------+------------+-------------+----------+
  | ID | Name | Status | Task State | Power State | Networks |
  +----+------+--------+------------+-------------+----------+
  +----+------+--------+------------+-------------+----------+

  11.
  [raies@localhost devstack]$ nova list --ip "172.24.4"
  +----+------+--------+------------+-------------+----------+
  | ID | Name | Status | Task State | Power State | Networks |
  +----+------+--------+------------+-------------+----------+
  +----+------+--------+------------+-------------+----------+

  12.

  [raies@localhost devstack]$ nova list --ip "172.24.4.*"
  +----+------+--------+------------+-------------+----------+
  | ID | Name | Status | Task State | Power State | Networks |
  +----+------+--------+------------+-------------+----------+
  +----+------+--------+------------+-------------+----------+

  13.

  [raies@localhost devstack]$ nova list --ip "172.24.4.18"
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+
  | ID                                   | Name        | Status | Task State | Power State | Networks           |
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+
  | 02cbf054-5813-4f3f-80a9-fb5cfeb0a494 | test-server | ACTIVE | -          | Running     | public=172.24.4.18 |
  +--------------------------------------+-------------+--------+------------+-------------+--------------------+

  This we can see, Instances list with server regex could not found.

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