Octavia OSC plugin is failing to create l7rules

Bug #1700778 reported by Michael Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
octavia
Fix Released
Critical
Michael Johnson

Bug Description

When I attempt to create an L7 rule with the openstack client I get the following error:

descriptor 'upper' requires a 'str' object but received a 'unicode'
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/octaviaclient/osc/v2/l7rule.py", line 88, in take_action
    parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/octaviaclient/osc/v2/utils.py", line 324, in get_l7rule_attrs
    attrs = _map_attrs(_attrs, attr_map)
  File "/usr/local/lib/python2.7/dist-packages/octaviaclient/osc/v2/utils.py", line 404, in _map_attrs
    mapped_attrs[attr_map[k][0]] = attr_map[k][1](v)
TypeError: descriptor 'upper' requires a 'str' object but received a 'unicode'
clean_up CreateL7Rule: descriptor 'upper' requires a 'str' object but received a 'unicode'
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/octaviaclient/osc/v2/l7rule.py", line 88, in take_action
    parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/octaviaclient/osc/v2/utils.py", line 324, in get_l7rule_attrs
    attrs = _map_attrs(_attrs, attr_map)
  File "/usr/local/lib/python2.7/dist-packages/octaviaclient/osc/v2/utils.py", line 404, in _map_attrs
    mapped_attrs[attr_map[k][0]] = attr_map[k][1](v)
TypeError: descriptor 'upper' requires a 'str' object but received a 'unicode'

END return value: 1

Command line ran:
openstack --debug loadbalancer l7rule create --compare-type REGEX --type PATH --value /images* 31c6125d-c607-4654-bdf5-57dfaefac921
However the same occurs with simple file type equals rules as well.

Tags: octavia-osc
Changed in octavia:
assignee: nobody → Jude Cross (problem-v)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-octaviaclient (master)

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

Changed in octavia:
assignee: Jude Cross (problem-v) → Adam Harwell (adam-harwell)
status: Triaged → In Progress
Changed in octavia:
assignee: Adam Harwell (adam-harwell) → Michael Johnson (johnsom)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-octaviaclient (master)

Reviewed: https://review.openstack.org/478693
Committed: https://git.openstack.org/cgit/openstack/python-octaviaclient/commit/?id=420f88932206fbac5f244f2084ad17e9a74cef77
Submitter: Jenkins
Branch: master

commit 420f88932206fbac5f244f2084ad17e9a74cef77
Author: Adam Harwell <email address hidden>
Date: Wed Jun 28 18:52:47 2017 -0700

    Remove rogue calls to str.upper in l7rules

    This patch also fixes tox install for gate tests.

    Change-Id: Ie79a2ba4fc5d80973014551fa2b8d8bcf2a68e4a
    Closes-Bug: #1700778

Changed in octavia:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-octaviaclient 1.1.0

This issue was fixed in the openstack/python-octaviaclient 1.1.0 release.

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.