local variable 'param' ERROR message on configuration-parameter-show

Bug #1363065 reported by Doug Shelley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-troveclient
Fix Released
Low
Yao Wang

Bug Description

$ trove --debug configuration-parameter-show mysql-5.5 max_connections

DEBUG (shell:629) local variable 'param' referenced before assignment
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/troveclient/shell.py", line 624,
in main
    sys.argv[1:]))
  File "/usr/local/lib/python2.7/dist-packages/troveclient/shell.py", line 463,
in main
    args.func(self.cs, args)
  File "/usr/local/lib/python2.7/dist-packages/troveclient/v1/shell.py", line 73
3, in do_configuration_parameter_show
    _print_instance(param)
UnboundLocalError: local variable 'param' referenced before assignment
ERROR: local variable 'param' referenced before assignment

If i provide the --datastore option:
$ trove --debug configuration-parameter-show mysql-5.5 max_connections --datastore mysql
+------------------+-----------------+
| Property | Value |
+------------------+-----------------+
| max | 65535 |
| min | 1 |
| name | max_connections |
| restart_required | False |
| type | integer |
+------------------+-----------------+

In the case of the missing --datastore parameter, it should probably return something like this:

ERROR: The datastore name or id is required to show the information on a configuration parameter

Revision history for this message
Denis M. (dmakogon) wrote :

This looks like a bug for python-troveclient, but not Trove at all.

Changed in trove:
status: New → Invalid
Revision history for this message
Amrith Kumar (amrith) wrote :

Doug, please update with latest information or close this bug if appropriate. Thx!

Changed in trove:
status: Invalid → Incomplete
assignee: nobody → Doug Shelley (0-doug)
Changed in python-troveclient:
assignee: nobody → Doug Shelley (0-doug)
no longer affects: trove
Changed in python-troveclient:
status: New → Triaged
importance: Undecided → Low
milestone: none → python-troveclient-v1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-troveclient (master)

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

Changed in python-troveclient:
assignee: Doug Shelley (0-doug) → Masaki Matsushita (mmasaki)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-troveclient (master)

Change abandoned by amrith (<email address hidden>) on branch: master
Review: https://review.openstack.org/365434
Reason: "abandoned for inactivity, over 3 weeks old, has a negative review comment and is not currently marked as a WIP or WF-1. please restore the change if you wish to work on it."

Changed in python-troveclient:
assignee: Masaki Matsushita (mmasaki) → Mahito OGURA (earthdragon77)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-troveclient (master)

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

Changed in python-troveclient:
assignee: Mahito OGURA (earthdragon77) → Yao Wang (nihaome521)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-troveclient (master)

Reviewed: https://review.openstack.org/529509
Committed: https://git.openstack.org/cgit/openstack/python-troveclient/commit/?id=e3a7d83ea1d5ba579752730a396a7107eea74562
Submitter: Zuul
Branch: master

commit e3a7d83ea1d5ba579752730a396a7107eea74562
Author: wangyao <email address hidden>
Date: Thu Dec 21 16:46:06 2017 +0800

    Fix error with configuration-parameter-show

    According bug description, there will be an error when
    use configuration-parameter-show without version_id
    and datastore. To fix this problem, I add an judgement
    for use the cmd without parameter datstore and
    datastore_version not like an uuid.

    Now in such a case, the cmd will has an exception info.

    Change-Id: I01fd56bad80f389da369be90dff5c89b05e6a8dc
    Closes-Bug: #1363065

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

This issue was fixed in the openstack/python-troveclient 2.14.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-troveclient 2.15.0

This issue was fixed in the openstack/python-troveclient 2.15.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.