openstack server list returns "list index out of range" when there are no servers
Bug #1548674 reported by
Pavlo Shchelokovskyy
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-openstackclient |
New
|
Undecided
|
Unassigned |
Bug Description
Started to see this just recently, running from master branch
$ . /opt/stack/
$ nova list
+----+-
| ID | Name | Status | Task State | Power State | Networks |
+----+-
+----+-
$ openstack server list
list index out of range
To post a comment you must log in.
only the table output formatter is affected, vaule, csv, json, yaml are fine. the traceback from "openstack --debug server list" is
RESP BODY: {"servers": []}
list index out of range lib/python2. 7/dist- packages/ cliff/app. py", line 378, in run_subcommand parsed_ args) python- openstackclient /openstackclien t/common/ command. py", line 37, in run parsed_ args) lib/python2. 7/dist- packages/ cliff/display. py", line 88, in run produce_ output( parsed_ args, column_names, data) lib/python2. 7/dist- packages/ cliff/lister. py", line 51, in produce_output lib/python2. 7/dist- packages/ cliff/formatter s/table. py", line 64, in emit_list args.max_ width), min_width) lib/python2. 7/dist- packages/ cliff/formatter s/table. py", line 148, in _assign_max_widths ).splitlines( )[0] python- openstackclient /openstackclien t/shell. py", line 113, in run Shell, self).run(argv) lib/python2. 7/dist- packages/ cliff/app. py", line 258, in run subcommand( remainder) lib/python2. 7/dist- packages/ cliff/app. py", line 378, in run_subcommand parsed_ args) python- openstackclient /openstackclien t/common/ command. py", line 37, in run parsed_ args) lib/python2. 7/dist- packages/ cliff/display. py", line 88, in run produce_ output( parsed_ args, column_names, data) lib/python2. 7/dist- packages/ cliff/lister. py", line 51, in produce_output lib/python2. 7/dist- packages/ cliff/formatter s/table. py", line 64, in emit_list args.max_ width), min_width) lib/python2. 7/dist- packages/ cliff/formatter s/table. py", line 148, in _assign_max_widths ).splitlines( )[0]
Traceback (most recent call last):
File "/usr/local/
result = cmd.run(
File "/opt/stack/
return super(Command, self).run(
File "/usr/local/
self.
File "/usr/local/
parsed_args,
File "/usr/local/
stdout, x, int(parsed_
File "/usr/local/
first_line = x.get_string(
IndexError: list index out of range
clean_up ListServer: list index out of range
Traceback (most recent call last):
File "/opt/stack/
ret_val = super(OpenStack
File "/usr/local/
result = self.run_
File "/usr/local/
result = cmd.run(
File "/opt/stack/
return super(Command, self).run(
File "/usr/local/
self.
File "/usr/local/
parsed_args,
File "/usr/local/
stdout, x, int(parsed_
File "/usr/local/
first_line = x.get_string(
IndexError: list index out of range
END return value: 1