Bug 1747202 - appliance_console_cli returns 0 on failure
Summary: appliance_console_cli returns 0 on failure
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.10.8
Hardware: All
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.12.0
Assignee: Joe Vlcek
QA Contact: Devidas Gaikwad
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1753687 1767774
TreeView+ depends on / blocked
 
Reported: 2019-08-29 22:14 UTC by Tuan
Modified: 2020-06-10 12:31 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1753687 1767774 (view as bug list)
Environment:
Last Closed: 2020-06-10 12:31:59 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tuan 2019-08-29 22:14:33 UTC
Description of problem:
When running appliance_console_cli to configure a database, if the database is already configured it will recognize that the DB is already configured but returns 0 as though the command succeeded.  Scripts and/or automation that rely on return value will be misinformed as to the failure of the DB configuration and unable to take action to handle the failure.

Command being run: /opt/rh/cfme-gemset/bin/appliance_console_cli -i -b /dev/sdb -S -d ${db_name} -U ${db_root} -p '${db_pass}'
Hostname, timezone, and v2_key are already set.


Version-Release number of selected component (if applicable):
5.10.8

How reproducible:


Steps to Reproduce:
1.Log into AP
2.Run command opt/rh/cfme-gemset/bin/appliance_console_cli -i -b /dev/sdb -S -d ${db_name} -U ${db_root} -p '${db_pass}'
3. Result: Hostname, timezone, and v2_key are already set


Actual results:


Expected results:


Additional info:

Comment 3 CFME Bot 2019-09-17 13:51:42 UTC
New commit detected on ManageIQ/manageiq-appliance_console/master:

https://github.com/ManageIQ/manageiq-appliance_console/commit/372f78f5a4e67b266a477e47860e0e4532f6510f
commit 372f78f5a4e67b266a477e47860e0e4532f6510f
Author:     Joe VLcek <jvlcek>
AuthorDate: Fri Sep 13 17:00:45 2019 -0400
Commit:     Joe VLcek <jvlcek>
CommitDate: Fri Sep 13 17:00:45 2019 -0400

    Exit with non-zero when database activation fails

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1747202

 lib/manageiq/appliance_console/cli.rb | 5 +-
 spec/cli_spec.rb | 125 +-
 2 files changed, 69 insertions(+), 61 deletions(-)

Comment 5 CFME Bot 2019-09-19 17:30:52 UTC
New commit detected on ManageIQ/manageiq-appliance/master:

https://github.com/ManageIQ/manageiq-appliance/commit/dce8a03b12455adf725992035ae90c3a73514edb
commit dce8a03b12455adf725992035ae90c3a73514edb
Author:     Joe VLcek <jvlcek>
AuthorDate: Thu Sep 19 13:22:38 2019 -0400
Commit:     Joe VLcek <jvlcek>
CommitDate: Thu Sep 19 13:22:38 2019 -0400

    Update dependency on manageiq-appliance_console

    https://bugzilla.redhat.com/show_bug.cgi?id=1747202

 manageiq-appliance-dependencies.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


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