Bug 1221308 - ValueError: too many values to unpack while removing a role from a plan
Summary: ValueError: too many values to unpack while removing a role from a plan
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-tuskarclient
Version: 7.0 (Kilo)
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ga
: Director
Assignee: Brad P. Crochet
QA Contact: Ola Pavlenko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-13 16:46 UTC by Ola Pavlenko
Modified: 2015-08-05 13:51 UTC (History)
5 users (show)

Fixed In Version: python-tuskarclient-0.1.17-3.el7ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-05 13:51:25 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
OpenStack gerrit 173026 None None None Never
Red Hat Product Errata RHEA-2015:1549 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform director Release 2015-08-05 17:49:10 UTC

Description Ola Pavlenko 2015-05-13 16:46:44 UTC
Description of problem:
created a plan and added roles to it:

$ tuskar role-list
+--------------------------------------+----------------+---------+---------------------------------------------------+
| uuid                                 | name           | version | description                                       |
+--------------------------------------+----------------+---------+---------------------------------------------------+
| 042a6529-1e14-4892-8d5f-9674f7fb9ea5 | Ceph-Storage   | 1       | OpenStack ceph storage node configured by Puppet  |
| 2081e9c4-d0b6-4912-abbf-30b1998e98ba | Compute        | 1       | OpenStack hypervisor node configured via Puppet.  |
|                                      |                |         |                                                   |
| 81f0cb92-2656-41cf-a3de-f2602ca235a2 | Cinder-Storage | 1       | OpenStack cinder storage configured by Puppet     |
| a0c587b5-3816-4a31-acd9-54358ba98b83 | Swift-Storage  | 1       | OpenStack swift storage node configured by Puppet |
| b550ff55-475d-4b4a-b364-945006798e75 | Controller     | 1       | OpenStack controller node configured by Puppet.   |
|                                      |                |         |                                                   |
+--------------------------------------+----------------+---------+---------------------------------------------------+

$ tuskar plan-list
+--------------------------------------+-----------+-------------+----------------------------------------------------+
| uuid                                 | name      | description | roles                                              |
+--------------------------------------+-----------+-------------+----------------------------------------------------+
| cbdf7da7-dee3-47ba-bc81-d3e25642fd15 | overcloud | None        | Controller, Cinder-Storage, Compute, Swift-Storage |
+--------------------------------------+-----------+-------------+----------------------------------------------------+

$ tuskar plan-show cbdf7da7-dee3-47ba-bc81-d3e25642fd15
+-------------+---------------------------------------------------------------------------------------------------+
| Property    | Value                                                                                             |
+-------------+---------------------------------------------------------------------------------------------------+
| created_at  | 2015-05-13T16:04:57                                                                               |
| description | None                                                                                              |
| name        | overcloud                                                                                         |
| parameters  | constraints=[{u'definition': {u'min': u'0'}, u'description': None, u'constraint_type': u'range'}] |
|             | default=None                                                                                      |
|             | description=None                                                                                  |
|             | hidden=None                                                                                       |
|             | label=None                                                                                        |
|             | name=Controller-1::count                                                                          |
|             | parameter_type=number                                                                             |
|             | value=1                                                                                           |
|             |                                                                                                   |
|             | constraints=[{u'definition': {u'min': u'0'}, u'description': None, u'constraint_type': u'range'}] |
|             | default=None                                                                                      |
|             | description=None                                                                                  |
|             | hidden=None                                                                                       |
|             | label=None                                                                                        |
|             | name=Compute-1::count                                                                             |
|             | parameter_type=number                                                                             |
|             | value=1                                                                                           |
|             |                                                                                                   |
|             | constraints=[{u'definition': {u'min': u'0'}, u'description': None, u'constraint_type': u'range'}] |
|             | default=None                                                                                      |
|             | description=None                                                                                  |
|             | hidden=None                                                                                       |
|             | label=None                                                                                        |
|             | name=Swift-Storage-1::count                                                                       |
|             | parameter_type=number                                                                             |
|             | value=1                                                                                           |
|             |                                                                                                   |
|             | constraints=[{u'definition': {u'min': u'0'}, u'description': None, u'constraint_type': u'range'}] |
|             | default=None                                                                                      |
|             | description=None                                                                                  |
|             | hidden=None                                                                                       |
|             | label=None                                                                                        |
|             | name=Cinder-Storage-1::count                                                                      |
|             | parameter_type=number                                                                             |
|             | value=1                                                                                           |
|             |                                                                                                   |
| roles       | description=OpenStack controller node configured by Puppet.                                       |
|             |                                                                                                   |
|             | name=Controller                                                                                   |
|             | uuid=b550ff55-475d-4b4a-b364-945006798e75                                                         |
|             | version=1                                                                                         |
|             |                                                                                                   |
|             | description=OpenStack cinder storage configured by Puppet                                         |
|             | name=Cinder-Storage                                                                               |
|             | uuid=81f0cb92-2656-41cf-a3de-f2602ca235a2                                                         |
|             | version=1                                                                                         |
|             |                                                                                                   |
|             | description=OpenStack hypervisor node configured via Puppet.                                      |
|             |                                                                                                   |
|             | name=Compute                                                                                      |
|             | uuid=2081e9c4-d0b6-4912-abbf-30b1998e98ba                                                         |
|             | version=1                                                                                         |
|             |                                                                                                   |
|             | description=OpenStack swift storage node configured by Puppet                                     |
|             | name=Swift-Storage                                                                                |
|             | uuid=a0c587b5-3816-4a31-acd9-54358ba98b83                                                         |
|             | version=1                                                                                         |
|             |                                                                                                   |
| updated_at  | None                                                                                              |
| uuid        | cbdf7da7-dee3-47ba-bc81-d3e25642fd15                                                              |
+-------------+---------------------------------------------------------------------------------------------------+




Version-Release number of selected component (if applicable):
$ rpm -qa | grep tuskar
openstack-tuskar-2013.2-dev1.el7.centos.noarch
python-tuskarclient-0.1.16.2-gc8e3799.el7.centos.noarch
openstack-tuskar-ui-extras-2014.1-dev22.el7.centos.noarch
openstack-tuskar-ui-2013.2-dev253.el7.centos.noarch


How reproducible:
100%

Steps to Reproduce:
new undercloud from scratch
1.create a plan 
2. add roles to the plan
3. remove a role from the plan 
$ tuskar plan-remove-role -r 042a6529-1e14-4892-8d5f-9674f7fb9ea5 cbdf7da7-dee3-47ba-bc81-d3e25642fd15

Actual results:

$ tuskar -d plan-remove-role -r 042a6529-1e14-4892-8d5f-9674f7fb9ea5 cbdf7da7-dee3-47ba-bc81-d3e25642fd15 
DEBUG (v2) Making authentication request to http://192.0.2.1:5000/v2.0/tokens
INFO (connectionpool) Starting new HTTP connection (1): 192.0.2.1
DEBUG (connectionpool) "POST /v2.0/tokens HTTP/1.1" 200 3541
DEBUG (iso8601) Parsed 2015-05-13T17:45:37Z into {'tz_sign': None, 'second_fraction': None, 'hour': u'17', 'daydash': u'13', 'tz_hour': None, 'month': None, 'timezone': u'Z', 'second': u'37', 'tz_minute': None, 'year': u'2015', 'separator': u'T', 'monthdash': u'05', 'day': None, 'minute': u'45'} with default timezone <iso8601.iso8601.Utc object at 0xae0890>
DEBUG (iso8601) Got u'2015' for 'year' with default None
DEBUG (iso8601) Got u'05' for 'monthdash' with default 1
DEBUG (iso8601) Got 5 for 'month' with default 5
DEBUG (iso8601) Got u'13' for 'daydash' with default 1
DEBUG (iso8601) Got 13 for 'day' with default 13
DEBUG (iso8601) Got u'17' for 'hour' with default None
DEBUG (iso8601) Got u'45' for 'minute' with default None
DEBUG (iso8601) Got u'37' for 'second' with default None
INFO (connectionpool) Starting new HTTP connection (1): 192.0.2.1
DEBUG (connectionpool) "DELETE /v2/plans/cbdf7da7-dee3-47ba-bc81-d3e25642fd15/roles/042a6529-1e14-4892-8d5f-9674f7fb9ea5 HTTP/1.1" 200 42514
ERROR (shell) Exiting due to an error:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/tuskarclient/shell.py", line 245, in main
    TuskarShell(sys.argv[1:]).run()
  File "/usr/lib/python2.7/site-packages/tuskarclient/shell.py", line 75, in run
    args.func(tuskar_client, args)
  File "/usr/lib/python2.7/site-packages/tuskarclient/v2/plans_shell.py", line 140, in do_plan_remove_role
    vars(args).get('role_uuid')
  File "/usr/lib/python2.7/site-packages/tuskarclient/v2/plans.py", line 153, in remove_role
    rep, body = self._delete(self._roles_path(plan_uuid, role_uuid))
ValueError: too many values to unpack



Expected results:
The role was successfully removed from the plan 

Additional info:

Comment 4 Brad P. Crochet 2015-06-05 15:55:22 UTC
I believe this was fixed by https://review.openstack.org/#/c/173026/

Comment 9 errata-xmlrpc 2015-08-05 13:51:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2015:1549


Note You need to log in before you can comment on or make changes to this bug.