Description of problem: When running SmartState analysis on overcloud nodes (OSP16.1), cloudforms engine reports an error: [----] E, [2020-08-20T12:49:24.978216 #2725:2afb9b5a05c0] ERROR -- : /opt/rh/cfme-gemset/bundler/gems/cfme-gems-pending-e280ad44830f/lib/gems/pending/util/MiqSshUtil.rb:155:in `block (3 levels) in exec' [----] E, [2020-08-20T12:49:32.481373 #2716:2afb9b5a05c0] ERROR -- : [RuntimeError]: MiqSshUtil::exec - Command 'sudo if [ -e /usr/bin/podman ]; then sudo podman ps --format "{{.Names}} {{.Status}}"; fi; if [ -e /usr/bin/docker ]; then docker ps --format "table {{.Names}}\t{{.Status}}" | tail -n +2; fi' failed: bash: -c: line 0: syntax error near unexpected token `then' This looks like a syntax error. I have tried the command directly on the overcloud nodes and got similar result: [root@chrisj-osp-test-controller-0 ~]# sudo if [ -e /usr/bin/podman ]; then sudo podman ps --format "{{.Names}} {{.Status}}"; fi; if [ -e /usr/bin/docker ]; then docker ps --format "table {{.Names}}\t{{.Status}}" | tail -n +2; fi -bash: syntax error near unexpected token `then' then correct the manual command to look like this to make it work: [root@chrisj-osp-test-controller-0 ~]# sudo /bin/sh -c 'if [ -e /usr/bin/podman ]; then sudo podman ps --format "{{.Names}} {{.Status}}"; fi' collectd Up 45 hours ago nova_api_cron Up 45 hours ago swift_proxy Up 45 hours ago Version-Release number of selected component (if applicable): CF 5.11.7 How reproducible: Everytime Steps to Reproduce: 1. Connect OpenStack Infra provider 2. add ssh key 3. run smart state analysis Actual results: error Expected results: success Additional info:
It looks like this was fixed back in May of 2020. Investigating which PR/BZ resulted in the fix and will follow up here.
Fixed by https://github.com/ManageIQ/manageiq-providers-openstack/pull/596 which was backported to Jansa. Its not clear this has anything to do with Smartstate, by the way. Regardless if it is required in Ivanchuk I suggest this be reassigned to the originator.
New commits detected on ManageIQ/manageiq-providers-openstack/ivanchuk: https://github.com/ManageIQ/manageiq-providers-openstack/commit/0bc37be2067a28ab8602a9effef2c816511696f4 commit 0bc37be2067a28ab8602a9effef2c816511696f4 Author: Adam Grare <agrare> AuthorDate: Wed May 27 12:40:01 2020 +0000 Commit: Satoe Imaishi <simaishi> CommitDate: Tue Sep 1 22:09:48 2020 +0000 Merge pull request #596 from andyvesel/fix_bash_condition Fix bash condition for services list (cherry picked from commit 35eb2ec2fe01955f647d23de407c6dd3d2491bbc) https://bugzilla.redhat.com/show_bug.cgi?id=1723864 https://bugzilla.redhat.com/show_bug.cgi?id=1870737 app/models/manageiq/providers/openstack/infra_manager/host.rb | 4 +- 1 file changed, 2 insertions(+), 2 deletions(-)
Verified on version 5.11.8.
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 (Moderate: CloudForms 5.0.8 security, bug fix and enhancement update), 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/RHSA-2020:4134