Traceback after subnet create

Bug #1652025 reported by Dr. Jens Harbott
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Medium
Roey Chen

Bug Description

This happens with python-openstackclient=3.6.0, the creation of the subnet succeeds, but the result is not displayed.

$ openstack subnet create --subnet-range 10.242.4.0/24 --network private private1
'NoneType' object is not iterable
$ openstack subnet list
+--------------------------------------+----------+--------------------------------------+---------------+
| ID | Name | Network | Subnet |
+--------------------------------------+----------+--------------------------------------+---------------+
| cc0713f4-e6a1-48d4-aa71-25deb7cf9cff | private1 | 368d0e4b-c666-4227-91da-8a8da1417873 | 10.242.4.0/24 |
+--------------------------------------+----------+--------------------------------------+---------------+

Traceback (most recent call last):
  File "/home/ubuntu/ci_venv/local/lib/python2.7/site-packages/osc_lib/shell.py", line 135, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/home/ubuntu/ci_venv/local/lib/python2.7/site-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/home/ubuntu/ci_venv/local/lib/python2.7/site-packages/osc_lib/shell.py", line 180, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/home/ubuntu/ci_venv/local/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/home/ubuntu/ci_venv/local/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/home/ubuntu/ci_venv/local/lib/python2.7/site-packages/cliff/display.py", line 112, in run
    column_names, data = self.take_action(parsed_args)
  File "/home/ubuntu/ci_venv/local/lib/python2.7/site-packages/openstackclient/network/v2/subnet.py", line 340, in take_action
    data = utils.get_item_properties(obj, columns, formatters=_formatters)
  File "/home/ubuntu/ci_venv/local/lib/python2.7/site-packages/osc_lib/utils.py", line 324, in get_item_properties
    row.append(formatters[field](data))
  File "/home/ubuntu/ci_venv/local/lib/python2.7/site-packages/osc_lib/utils.py", line 209, in format_list
    return separator.join(sorted(data))
TypeError: 'NoneType' object is not iterable

Full debug log attached.

Tags: network
Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :
Revision history for this message
Steve Martinelli (stevemar) wrote :

seems like more fallout from the SDK refactor

tags: added: network
Revision history for this message
Steve Martinelli (stevemar) wrote :

Just to make sure, what version of openstacksdk are you using?

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

Just what got auto-installed after doing "pip install python-openstackclient" in a fresh venv:

$ pip freeze|grep sdk
openstacksdk==0.9.11

Roey Chen (roeyc)
Changed in python-openstackclient:
assignee: nobody → Roey Chen (roeyc)
Revision history for this message
Gary Kotton (garyk) wrote :

This bug is now causes in CI to fail.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to osc-lib (master)

Fix proposed to branch: master
Review: https://review.openstack.org/417675

Changed in python-openstackclient:
status: New → In Progress
Changed in python-openstackclient:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to osc-lib (master)

Reviewed: https://review.openstack.org/417675
Committed: https://git.openstack.org/cgit/openstack/osc-lib/commit/?id=f6c357d749fb6a8fa1497fe9c5c055e04ae59703
Submitter: Jenkins
Branch: master

commit f6c357d749fb6a8fa1497fe9c5c055e04ae59703
Author: Roey Chen <email address hidden>
Date: Sun Jan 8 04:27:07 2017 -0800

    Don't call formatters on None value

    Some object fields are allowed to be set to None, in such cases we
    shouldn't call any formatters on the field.
    For example, a subnet has a field 'service_types' which could be a list
    of values but is also nullable.

    Change-Id: I6574bdf742c0cd24cc824f08e8ba4c40d390cbe0
    Closes-Bug: #1652025

Changed in python-openstackclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/osc-lib 1.3.0

This issue was fixed in the openstack/osc-lib 1.3.0 release.

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

Other bug subscribers

Bug attachments

Remote bug watches

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