nova list --host invalidhostname

Bug #1400048 reported by Tzach Shefi
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-novaclient
Opinion
Wishlist
Ritesh Paiboina

Bug Description

Versions:

rhel 7
python-nova-2014.1.3-9.el7ost.noarch
openstack-nova-compute-2014.1.3-9.el7ost.noarch
openstack-nova-novncproxy-2014.1.3-9.el7ost.noarch
openstack-nova-common-2014.1.3-9.el7ost.noarch
python-novaclient-2.17.0-2.el7ost.noarch

FYI my setup is an HA deployment, but same happens on none HA.

Description of bug:
When running nova list --host with an invalid hostname (no such server or typo in server name), we should get an error.
Today we get an empty table, alerting user to the fact that an invalid host name was given would be better IMHO :)

[root@mace83935b075d6 ~(openstack_admin)]# nova list --host noSuchServer
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+
[root@mace83935b075d6 ~(openstack_admin)]# hostname
mace83935b075d6.example.com
[root@mace83935b075d6 ~(openstack_admin)]# nova list --host mace83935b075d6.example.com
+--------------------------------------+---------+--------+------------+-------------+--------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+---------+--------+------------+-------------+--------------------------------+
| 620ce9ae-2767-4f7b-a555-aa59fe10dd6b | tshefi3 | ERROR | - | NOSTATE | |
| 5b7750d1-8b0f-4fc1-8199-885317e2d5cf | tshefi4 | ACTIVE | - | Running | floating-362-main=10.35.184.24 |
+--------------------------------------+---------+--------+------------+-------------+--------------------------------+

Steps to reproduce:
1. Boot up an instance
2. #nova list --host FakeServerName -> you will get an empty table, without notice of invalid hostname
3. #nova list --host realServername you will see instance name in table as should.

Changed in nova:
assignee: nobody → Avinash (avinash-jalumuru)
Revision history for this message
Tzach Shefi (tshefi) wrote :

FYI same issue on Juno , just checked now.

openstack-nova-compute-2014.2-2.el7ost.noarch
openstack-nova-api-2014.2-2.el7ost.noarch
python-novaclient-2.20.0-1.el7ost.noarch
..

Sean Dague (sdague)
no longer affects: nova
Changed in python-novaclient:
importance: Undecided → Wishlist
status: New → Confirmed
Changed in python-novaclient:
assignee: nobody → Santhosh Peddiboyina (peddiboyina-9)
description: updated
Revision history for this message
Santhosh Peddiboyina (peddiboyina-9) wrote :

Hello Tzach Shefi
I have fixed this bug, but not able to publish it to the gerrit board(some problem while updating the contact information in the ICLA agreement). I have dropped a message in the Gerrit IRC, now waiting for the reply.

Changed in python-novaclient:
status: Confirmed → In Progress
Changed in python-novaclient:
assignee: Santhosh Peddiboyina (peddiboyina-9) → nobody
Changed in python-novaclient:
assignee: nobody → Ritesh (rsritesh)
summary: - nova list --hostname invalidhostname
+ nova list --host invalidhostname
Revision history for this message
Ritesh Paiboina (rsritesh) wrote :

I think their is not a issue with the python nova client.

When nova client list out for specific host , it makes the following request

1) FakeServerName

GET http://172.16.73.58:8774/v2/615890e1ca3d4cdfb75de7148e5d1b3c/servers/detail?host=FakeServerName

2) RealServerName

GET http://172.16.73.58:8774/v2/615890e1ca3d4cdfb75de7148e5d1b3c/servers/detail?host=RealServerName

So it happens to be that , nova has to return some error message or invalid host message to the client.

Lets see more on this.

Changed in python-novaclient:
status: In Progress → Opinion
Revision history for this message
Zhen Qin (zqinit) wrote :

I have submitted a fix. Please review it. Thanks!
https://review.openstack.org/#/c/255047/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.