[MuranoPL] the result returned by methods 'putFile' and 'runCommand' is useless

Bug #1504211 reported by Dmytro Dovbii
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
High
Dmytro Dovbii
Liberty
Fix Released
High
Dmytro Dovbii
Mitaka
Fix Released
High
Dmytro Dovbii

Bug Description

Two methods 'putFile' and 'runCommand' of class io.murano.configuration.Linux provide the useless result because theirs EPs return only exitCode to MuranoPl code. Due to the fact that `verifyExitcode` option is turned on by default the following code

https://github.com/openstack/murano/blob/master/meta/io.murano/Resources/RunCommand.template#L9

will never be executed in case when some script execution fails, because AgentException will be thrown before execution of this code.

We need to return whole structure containing stdout, stderr and exitcode in these functions and add optional parameters allowing to turn on or off options of scripts (captureStdout, captureStderr, verifyExitcode)

Dmytro Dovbii (ddovbii)
description: updated
Changed in murano:
assignee: nobody → Dmytro Dovbii (ddovbii)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (master)

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

Changed in murano:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/233050

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

Reviewed: https://review.openstack.org/232690
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=0c755f672f4833ddcda03a45424449d5f4899d6d
Submitter: Jenkins
Branch: master

commit 0c755f672f4833ddcda03a45424449d5f4899d6d
Author: Dmytro Dovbii <email address hidden>
Date: Thu Oct 8 20:40:53 2015 +0300

    Return full structure of std info in Linux class methods

    This patch adds to 'putFile' and 'runCommand' methods ability to return
    full structure containing stdout, stderr and exitcode instead of
    returning just exitCode, which worked incorrectly.

    New optional parameter 'options' was added to allow specifing custom
    options execution plans.

    Change-Id: Icb2b9c5cc72a4555ccee85c471547041be86e2fc
    Closes-Bug: #1504211

Changed in murano:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (stable/liberty)

Reviewed: https://review.openstack.org/233050
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=a94c988bab2b5e262df1c39000f51deb49af27eb
Submitter: Jenkins
Branch: stable/liberty

commit a94c988bab2b5e262df1c39000f51deb49af27eb
Author: Dmytro Dovbii <email address hidden>
Date: Thu Oct 8 20:40:53 2015 +0300

    Return full structure of std info in Linux class methods

    This patch adds to 'putFile' and 'runCommand' methods ability to return
    full structure containing stdout, stderr and exitcode instead of
    returning just exitCode, which worked incorrectly.

    New optional parameter 'options' was added to allow specifing custom
    options execution plans.

    Change-Id: Icb2b9c5cc72a4555ccee85c471547041be86e2fc
    Closes-Bug: #1504211

Changed in murano:
status: Fix Committed → Fix Released
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.