tripleoclient does not handle failed actions

Bug #1686811 reported by James Slagle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
James Slagle

Bug Description

tripleoclient in workflows/base.py in the call_action method does not check if the action passed or failed. It just assumes it succeeded and returns the output. In particular, the overcloudrc create action can fall and the error is not handled, resulting in utils.write_overcloudrc treading the error message as a dict of overclodurc values.

which then fails with a cryptic error:
"string indices must be intergers"

full traceback:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 135, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 180, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/command.py", line 90, in run
    return self.take_action(parsed_args) or 0
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_deploy.py", line 898, in take_action
    utils.write_overcloudrc(stack.stack_name, overcloudrcs)
  File "/usr/lib/python2.7/site-packages/tripleoclient/utils.py", line 73, in write_overcloudrc
    rcfile.write(overcloudrcs['overcloudrc'])
TypeError: string indices must be integers

Changed in tripleo:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → James Slagle (james-slagle)
milestone: none → pike-2
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/460720
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=026cb4a76e3c90b3a58d8f4fcec0fb205b04ce61
Submitter: Jenkins
Branch: master

commit 026cb4a76e3c90b3a58d8f4fcec0fb205b04ce61
Author: James Slagle <email address hidden>
Date: Thu Apr 27 15:16:07 2017 -0400

    Handle failed actions

    The result of syncrhonously called Mistral actions wasn't being checked
    to see if the action passed or failed. The result is now checked and if
    the action has failed, an exception will be raised.

    Change-Id: I95ae8c98fec94cf91f3f209b593f6c1815729fd4
    Closes-Bug: #1686811

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

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