openstack router show fails with TypeError

Bug #1646175 reported by Saverio Proto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Incomplete
Undecided
Unassigned

Bug Description

If I do:

neutron router-show $uuid

it works,

but with the same uuid

openstack --debug router show $uuid

REQ: curl -g -i -X GET https://api.s1.scloud.switch.ch:9696/v2.0/routers/e66b21d3-a795-4854-ae94-de8a1ea34c9d -H "User-Agent: openstacksdk/0.9.10 keystoneauth1/2.15.0 python-requests/2.12.2 CPython/2.7.6" -H "X-Auth-Token: {SHA1}secret"
https://api.s1.scloud.switch.ch:9696 "GET /v2.0/routers/e66b21d3-a795-4854-ae94-de8a1ea34c9d HTTP/1.1" 200 544
RESP: [200] Server: nginx Date: Wed, 30 Nov 2016 16:22:26 GMT Content-Type: application/json; charset=UTF-8 Content-Length: 544 Connection: keep-alive X-Openstack-Request-Id: req-d7017b97-53f9-4f1c-bd09-fdac93ed0c5c Strict-Transport-Security: max-age=31536000; includeSubdomains
RESP BODY: {"router": {"status": "ACTIVE", "external_gateway_info": {"network_id": "7313f148-f340-49b4-9d76-89de0702e801", "enable_snat": true, "external_fixed_ips": [{"subnet_id": "9a669e61-9d31-41e6-953c-f3f98b11cd62", "ip_address": "86.119.0.147"}]}, "availability_zone_hints": [], "availability_zones": [null], "description": null, "admin_state_up": true, "tenant_id": "50578dfa29814f429e066da423376fbd", "distributed": false, "routes": [], "ha": false, "id": "e66b21d3-a795-4854-ae94-de8a1ea34c9d", "name": "50578dfa29814f429e066da423376fbd-router"}}

sequence item 0: expected string, NoneType found
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/display.py", line 112, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/openstackclient/network/v2/router.py", line 527, in take_action
    data = utils.get_item_properties(obj, columns, formatters=_formatters)
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/utils.py", line 324, in get_item_properties
    row.append(formatters[field](data))
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/utils.py", line 209, in format_list
    return separator.join(sorted(data))
TypeError: sequence item 0: expected string, NoneType found
clean_up ShowRouter: sequence item 0: expected string, NoneType found
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/shell.py", line 135, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/shell.py", line 180, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/display.py", line 112, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/openstackclient/network/v2/router.py", line 527, in take_action
    data = utils.get_item_properties(obj, columns, formatters=_formatters)
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/utils.py", line 324, in get_item_properties
    row.append(formatters[field](data))
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/utils.py", line 209, in format_list
    return separator.join(sorted(data))
TypeError: sequence item 0: expected string, NoneType found

Tags: network
Revision history for this message
Saverio Proto (zioproto) wrote :

This behavior started when I upgraded neutron-server from Liberty to Mitaka

Revision history for this message
Logan V (loganv) wrote :

I'm not seeing this on my L->M upgraded env. Both router show methods work fine for me. Which client versions are you using?

$ openstack --version
openstack 2.6.0
$ neutron --version
5.1.0

Richard Theis (rtheis)
tags: added: network
Revision history for this message
Mohammed Naser (mnaser) wrote :

I see this, neutron-server from Liberty to Mitaka upgraded env. Same exact error.

$ openstack --version
openstack 3.4.1
$ neutron --version
6.0.0

Revision history for this message
Mohammed Naser (mnaser) wrote :

I think it comes from this:

"availability_zones": [null]

I have that in my response too.

Revision history for this message
Saverio Proto (zioproto) wrote :

openstack 3.4.1
neutron client 6.0.0

I build a docker container for my openstack cli. Dockerbuild file here:
https://github.com/zioproto/docker_stuff/blob/master/oscli/build/Dockerfile.pip

docker run -ti zioproto/oscli

and you can test with my same client version

Revision history for this message
Saverio Proto (zioproto) wrote :

I tested with openstack client 2.6.0 and I get the same backtrace.

Revision history for this message
Dean Troyer (dtroyer) wrote :

Is this still a problem in the current OSC release?

Changed in python-openstackclient:
status: New → Incomplete
Revision history for this message
Ankur (ankur-gupta-f) wrote :

Not a problem with current release. Just tested.

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.