Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1899551

Summary: /usr/lib/ocf/resource.d/openstack/NovaEvacuate: line 228: [: !=: unary operator expected
Product: Red Hat Enterprise Linux 8 Reporter: Michele Baldessari <michele>
Component: resource-agentsAssignee: dabarzil
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.4CC: agk, bperkins, cluster-maint, dabarzil, fdinitto, lmiccini, pkomarov
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: resource-agents-4.1.1-77.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 15:11:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 4 dabarzil 2021-01-28 09:18:57 UTC
Reproduced:

[stack@undercloud-0 ~]$ ansible controller -b -mshell -a'podman exec `podman ps -f name=galera-bundle -q`  sh -c "rpm -q resource-agents";rpm -q resource-agents'
[WARNING]: Found both group and host with same name: undercloud
controller-2 | CHANGED | rc=0 >>
resource-agents-4.1.1-68.el8.x86_64
resource-agents-4.1.1-68.el8.x86_64
controller-1 | CHANGED | rc=0 >>
resource-agents-4.1.1-68.el8.x86_64
resource-agents-4.1.1-68.el8.x86_64
controller-0 | CHANGED | rc=0 >>
resource-agents-4.1.1-68.el8.x86_64
resource-agents-4.1.1-68.el8.x86_64
[stack@undercloud-0 ~]$ ansible controller -b -mshell -a'grep -r -I "!=: unary operator expected" /var/log/messages|grep -v grep'
[WARNING]: Found both group and host with same name: undercloud
controller-2 | FAILED | rc=1 >>
non-zero return code
controller-1 | FAILED | rc=1 >>
non-zero return code
controller-0 | FAILED | rc=1 >>
non-zero return code
[stack@undercloud-0 ~]$ ansible compute-0 -b -mshell -a'echo b>/proc/sysrq-trigger'
[WARNING]: Found both group and host with same name: undercloud
compute-0 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: Shared connection to 192.168.24.42 closed.",
    "unreachable": true
}
[stack@undercloud-0 ~]$ ansible controller -b -mshell -a'grep -r -I "!=: unary operator expected" /var/log/messages|grep -v grep'
[WARNING]: Found both group and host with same name: undercloud
controller-1 | CHANGED | rc=0 >>
Jan 28 08:52:48 controller-1 pacemaker-execd[23382]: notice: nova-evacuate_monitor_10000[541744] error output [ /usr/lib/ocf/resource.d/openstack/NovaEvacuate: line 228: [: !=: unary operator expected ]
controller-2 | FAILED | rc=1 >>
non-zero return code
controller-0 | FAILED | rc=1 >>
non-zero return code
[stack@undercloud-0 ~]$ ansible compute-1 -b -mshell -a'echo b>/proc/sysrq-trigger'
[WARNING]: Found both group and host with same name: undercloud
compute-1 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: Shared connection to 192.168.24.29 closed.",
    "unreachable": true
}
[stack@undercloud-0 ~]$ ansible controller -b -mshell -a'grep -r -I "!=: unary operator expected" /var/log/messages|grep -v grep'
[WARNING]: Found both group and host with same name: undercloud
controller-1 | CHANGED | rc=0 >>
Jan 28 08:52:48 controller-1 pacemaker-execd[23382]: notice: nova-evacuate_monitor_10000[541744] error output [ /usr/lib/ocf/resource.d/openstack/NovaEvacuate: line 228: [: !=: unary operator expected ]
Jan 28 08:55:55 controller-1 pacemaker-execd[23382]: notice: nova-evacuate_monitor_10000[558119] error output [ /usr/lib/ocf/resource.d/openstack/NovaEvacuate: line 228: [: !=: unary operator expected ]
controller-2 | FAILED | rc=1 >>
non-zero return code
controller-0 | FAILED | rc=1 >>
non-zero return code
[stack@undercloud-0 ~]$ ansible controller -b -mshell -a'podman exec `podman ps -f name=galera-bundle -q`  sh -c "rpm -q resource-agents";rpm -q resource-agents'
[WARNING]: Found both group and host with same name: undercloud
controller-1 | CHANGED | rc=0 >>
resource-agents-4.1.1-77.el8.x86_64
resource-agents-4.1.1-77.el8.x86_64
controller-2 | CHANGED | rc=0 >>
resource-agents-4.1.1-77.el8.x86_64
resource-agents-4.1.1-77.el8.x86_64
controller-0 | CHANGED | rc=0 >>
resource-agents-4.1.1-77.el8.x86_64
resource-agents-4.1.1-77.el8.x86_64
[stack@undercloud-0 ~]$ ansible compute-0 -b -mshell -a'echo b>/proc/sysrq-trigger'
[WARNING]: Found both group and host with same name: undercloud
compute-0 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: Shared connection to 192.168.24.42 closed.",
    "unreachable": true
}
[stack@undercloud-0 ~]$ ansible controller -b -mshell -a'grep -r -I "!=: unary operator expected" /var/log/messages|grep -v grep'
[WARNING]: Found both group and host with same name: undercloud
controller-1 | CHANGED | rc=0 >>
Jan 28 08:52:48 controller-1 pacemaker-execd[23382]: notice: nova-evacuate_monitor_10000[541744] error output [ /usr/lib/ocf/resource.d/openstack/NovaEvacuate: line 228: [: !=: unary operator expected ]
Jan 28 08:55:55 controller-1 pacemaker-execd[23382]: notice: nova-evacuate_monitor_10000[558119] error output [ /usr/lib/ocf/resource.d/openstack/NovaEvacuate: line 228: [: !=: unary operator expected ]
controller-0 | FAILED | rc=1 >>
non-zero return code
controller-2 | FAILED | rc=1 >>
non-zero return code

We can see that with the resource-agents-4.1.1-77.el8 we do not have the notice anymore (the notices are from the reproduce with a previous package as we can see in this log)

Comment 6 errata-xmlrpc 2021-05-18 15:11:15 UTC
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 (resource-agents 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/RHBA-2021:1736