[Debian-ha-maintainers] Bug#1133386: resource-agents: Fatal syntax error in /usr/lib/ocf/lib/heartbeat/ocf-shellfuncs
root
jd+debianbugs at onix.de
Sun Apr 12 21:01:36 BST 2026
Package: resource-agents
Version: 1:4.16.0-3+deb13u1
Severity: important
Dear Maintainer,
after upgrading to trixie, one of my OCF cluster resources (mariadb with OCF /usr/lib/ocf/lib/heartbeat/ocf-shellfuncs) behaved irrational.
Tracing revealed a weird error:
```
+ /bin/bash -c 'CIB_file=<(/usr/sbin/cibadmin -Q /usr/sbin/crm_mon $*' -- -1 --output-as=xml
--: -c: line 2: unexpected EOF while looking for matching `)'
```
Following the breadcrumbs, I revealed the cause in the "crm_mon_no_validation" function from /usr/lib/ocf/lib/heartbeat/ocf-shellfuncs:
```
crm_mon_no_validation()
{
# The subshell prevents parsing error with incompatible shells
ocf_version_cmp "$OCF_RESKEY_crm_feature_set" "3.19.7"
if [ $res -eq 2 ] || [ $res -eq 1 ]; then
"$SHELL" -c "CIB_file=<(${HA_SBIN_DIR}/cibadmin -Q \
${HA_SBIN_DIR}/crm_mon \$*" -- $*
else
"$SHELL" -c "CIB_file=<(${HA_SBIN_DIR}/cibadmin -Q | sed 's/validate-with=\"[^\"]*\"/validate-with=\"none\"/') \
${HA_SBIN_DIR}/crm_mon \$*" -- $*
fi
}
```
The first $SHELL line is obviously missing a ")", which causes the function to return erronously with 1.
-- System Information:
Debian Release: 13.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'proposed-updates'), (500, 'oldstable-updates'), (500, 'oldstable-security'), (500, 'oldstable-proposed-updates'), (500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.74+deb13+1-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages resource-agents depends on:
ii bc 1.07.1-4
ii cluster-glue 1.0.12-24+b1
ii gawk 1:5.2.1-2+b1
ii libc6 2.41-12+deb13u2
ii libnet1 1.3+dfsg-2
ii libplumb2t64 1.0.12-24+b1
ii libqb100 2.0.8-2+b1
ii psmisc 23.7-2
ii python3 3.13.5-1
Versions of packages resource-agents recommends:
pn libxml2-utils <none>
ii net-tools 2.10-1.3
ii python3-googleapi 2.166.0-1
resource-agents suggests no packages.
-- no debconf information
More information about the Debian-ha-maintainers
mailing list