Wrong return code when CLI pre-deploy verifications fail

Bug #1672790 reported by Julie Pichon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Julie Pichon

Bug Description

When the pre-deploy verifications done by the CLI "overcloud deploy" command fail, we only do a empty return rather than raise an exception which means the command still returns an error code of 0 despite failing. This causes issues when scripting, as consuming scripts cannot pick up on problems.

https://github.com/openstack/python-tripleoclient/blob/105188/tripleoclient/v1/overcloud_deploy.py#L1084-L1099

Julie Pichon (jpichon)
tags: added: ocata-backport-potential
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/446470

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/446470
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=28051613c9c1c5231140981fca76fa704af55d5d
Submitter: Jenkins
Branch: master

commit 28051613c9c1c5231140981fca76fa704af55d5d
Author: Julie Pichon <email address hidden>
Date: Thu Mar 16 11:09:00 2017 +0000

    Fix return code when failing before launching the stack

    Until now when a configuration error was detected early during the
    pre-deployment verifications, the command would correctly return before
    attempting to create/update the Heat stack, however the return code
    would still show as '0', preventing scripts from picking up the
    problem.

    Change-Id: I8bd16e9753618e4c234440d7a6626e0ce4bd9972
    Closes-Bug: #1672790

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

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/452634

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

This issue was fixed in the openstack/python-tripleoclient 7.0.0 release.

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

Reviewed: https://review.openstack.org/452634
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=fe3ece15f6b18401abc1d17aa44cb620409e1365
Submitter: Jenkins
Branch: stable/ocata

commit fe3ece15f6b18401abc1d17aa44cb620409e1365
Author: Julie Pichon <email address hidden>
Date: Thu Mar 16 11:09:00 2017 +0000

    Fix return code when failing before launching the stack

    Until now when a configuration error was detected early during the
    pre-deployment verifications, the command would correctly return before
    attempting to create/update the Heat stack, however the return code
    would still show as '0', preventing scripts from picking up the
    problem.

    Change-Id: I8bd16e9753618e4c234440d7a6626e0ce4bd9972
    Closes-Bug: #1672790
    (cherry picked from commit 28051613c9c1c5231140981fca76fa704af55d5d)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 6.2.0

This issue was fixed in the openstack/python-tripleoclient 6.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/473302

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

Reviewed: https://review.openstack.org/473302
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=bb361f47bf9bfad79af0c062fa1107386e769faa
Submitter: Jenkins
Branch: stable/newton

commit bb361f47bf9bfad79af0c062fa1107386e769faa
Author: Julie Pichon <email address hidden>
Date: Thu Mar 16 11:09:00 2017 +0000

    Fix return code when failing before launching the stack

    Until now when a configuration error was detected early during the
    pre-deployment verifications, the command would correctly return before
    attempting to create/update the Heat stack, however the return code
    would still show as '0', preventing scripts from picking up the
    problem.

    Conflicts:
      tripleoclient/tests/v1/overcloud_deploy/test_overcloud_deploy.py
      tripleoclient/v1/overcloud_deploy.py

    Change-Id: I8bd16e9753618e4c234440d7a6626e0ce4bd9972
    Closes-Bug: #1672790
    (cherry picked from commit 28051613c9c1c5231140981fca76fa704af55d5d)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 5.4.3

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