The fix for bug #1522989 broke the list command if no VMs are running. When the list of VMs is empty there are no fields to validate so specifying fields always returns an error. Field validation should be skipped if there are no VMs to make the behaviour of "nova list --fields" consistent with "nova list"
With VMs running:
~$ nova list --fields metadata,created,networks
+--------------------------------------+------------------------------------------------------------+----------------------+-----------------------------------
----------------------+
| ID | Metadata | Created | Networks
|
+--------------------------------------+------------------------------------------------------------+----------------------+-----------------------------------
----------------------+
| 4072c7c5-eab4-45f3-a3b8-1b0d010ddf7c | {u'instance': u'my-instance', u'vnfc-type': u'management'} | 2016-09-19T03:11:13Z | internal-network=10
.0.0.3, 192.168.2.68 |
+--------------------------------------+------------------------------------------------------------+----------------------+-----------------------------------
----------------------+
No VMs running:
~$ nova list --fields metadata,created,networks
ERROR (CommandError): Non-existent fields are specified: [u'metadata', u'created', u'networks']
~$ nova list
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+
Could you please share what are the steps for reproducing this issue !!
I am not seeing in normal executions
stack@cinv- V:/home/ cinv/devstack$ nova list --fields metadata, created, networks ------- ------- ------- ------- ----+-- ------- -+----- ------- ------- ---+--- ------- + ------- ------- ------- ------- ----+-- ------- -+----- ------- ------- ---+--- ------- + a192-4633- 99c2-665cde7691 4f | {} | 2016-10- 02T06:40: 53Z | | 6def-47d8- a804-d69b4c3465 8e | {} | 2016-10- 02T06:46: 40Z | | 2812-489c- a41e-de04ee0be8 51 | {} | 2016-10- 02T06:33: 01Z | | 17c7-408d- bae4-278cdf8a44 d8 | {} | 2016-10- 02T06:45: 16Z | | 692b-4672- a377-60d7e7ddb9 bb | {} | 2016-10- 02T06:39: 34Z | | ------- ------- ------- ------- ----+-- ------- -+----- ------- ------- ---+--- ------- + V:/home/ cinv/devstack$ nova list ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- ------- ---+--- -----+- ------- ----+-- ------- ----+-- ------- -+ ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- ------- ---+--- -----+- ------- ----+-- ------- ----+-- ------- -+ a192-4633- 99c2-665cde7691 4f | Instance- 25b34978- c701-4e70- a7e9-56b3f9754a 10 | ERROR | - | Shutdown | | 6def-47d8- a804-d69b4c3465 8e | Instance- 6167a8ff- 6545-4d8d- 8dd3-1b8424b0ed a5 | ERROR | - | Shutdown | | 17c7-408d- bae4-278cdf8a44 d8 | server- 1be21545- d03d-4d35- b254-d2d50af09c 7e | ERROR | - | Shutdown | | 692b-4672- a377-60d7e7ddb9 bb | server- 5f7d5fad- 3896-4288- a881-2abaa4a8b2 58 | ERROR | - | Shutdown | | 2812-489c- a41e-de04ee0be8 51 | server- 8bb7748d- e519-45f6- aed1-2d66683964 7b | ERROR | - | Shutdown | | ------- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- ------- ---+--- -----+- ------- ----+-- ------- ----+-- ------- -+ V:/home/ cinv/devstack$ V:/home/ cinv/devstack$ V:/home/ cinv/devstack$ nova delete 3beff4cd- a192-4633- 99c2-665cde7691 4f a192-4633- 99c2-665cde7691 4f has been accepted. V:/home/ cinv/devstack$ V:/home/ cinv/devstack$ V:/home/ cinv/devstack$ nova list | grep ERROR 6def-47d8- a804-d69b4c3465 8e | Instance- 6167a8ff- 6545-4d8d- 8dd3-1b8424b0ed a5 | ERROR | - | Shutdown | | 17c7-408d- bae4-278cdf8a44 d8 | server- 1be21545- d03d-4d35- b254-d2d50af09c 7e | ERROR | - | Shutdown | | 692b-4672- a377-60d7e7ddb9 bb | server- 5f7d5fad- 3896-4288- a881-2abaa4a8b2 58 | ERROR | - | Shutdown | | 2812-489c- a41e-de04ee0be8 51 | server- 8bb7748d- e519-45f6- aed1-2d66683964 7b | ERROR | - | Shutdown | | V:/home/ cinv/devstack$ V:/home/ cinv/devstack. ..
+------
| ID | Metadata | Created | Networks |
+------
| 3beff4cd-
| 468c10bf-
| 4bb5e5a0-
| bb7426e1-
| d95f5047-
+------
stack@cinv-
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 3beff4cd-
| 468c10bf-
| bb7426e1-
| d95f5047-
| 4bb5e5a0-
+------
stack@cinv-
stack@cinv-
stack@cinv-
Request to delete server 3beff4cd-
stack@cinv-
stack@cinv-
stack@cinv-
| 468c10bf-
| bb7426e1-
| d95f5047-
| 4bb5e5a0-
stack@cinv-
stack@cinv-