[Bugs] [Bug 1440148] common-ha (debian/ubuntu): ganesha-ha.sh has a hard-coded / usr/libexec/ganesha...
bugzilla at redhat.com
bugzilla at redhat.com
Thu Apr 13 15:38:00 UTC 2017
https://bugzilla.redhat.com/show_bug.cgi?id=1440148
--- Comment #8 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: https://review.gluster.org/17013 committed in release-3.10 by
Shyamsundar Ranganathan (srangana at redhat.com)
------
commit e93e89b2e46033efa22447943269000c85588254
Author: Kaleb S. KEITHLEY <kkeithle at redhat.com>
Date: Fri Apr 7 09:09:29 2017 -0400
common-ha: fixes for Debian-based systems
1) Debian-based systems don't have /usr/libexec/... and there is
a hard-coded invocation of /usr/libexec/ganesha/ganesha-ha.sh within
ganesha-ha.sh itself.
Fix: save $0 and use it instead for further invocations of self.
2) default shell is /bin/dash (not /bin/bash). Various runner_run()
invocations for ganesha used what amounts to
exec("sh /usr/$libexec/ganesha/ganesha-ha.sh ...);
which executes the script using the default shell, but there are
some bash-specific idioms that don't work if the shell is dash.
Fix: change to exec("/usr/$libexec/ganesha/ganesha-ha.sh ...); so that
the shebang forces the use of /bin/bash
3) Fedora and RHEL7 have merged /bin/ and /usr/bin, /bin is a symlink
to /usr/bin. Debian-based systems are not merged, and systemd systems
have /bin/systemctl. The logic to find .../bin/systemctl is backwards.
If the logic looks for /usr/bin/systemctl it will not find it on
Debian-based systems; if it looks for /bin/systemctl it will find it
on Fedora and RHEL by virtue of the symlink. (RHEL6 and others will
find their respective init regardless.)
Fix: change the logic to look for /bin/systemctl instead.
4) The logic for deciding to run systemctl (or not) is a bit silly.
Fix: simply invoke the found method via the function pointer in the
table.
Change-Id: I33681b296a73aebb078bda6ac0d3a1d3b9770a21
BUG: 1440148
Signed-off-by: Kaleb S. KEITHLEY <kkeithle at redhat.com>
Reviewed-on: https://review.gluster.org/17013
Smoke: Gluster Build System <jenkins at build.gluster.org>
Reviewed-by: Niels de Vos <ndevos at redhat.com>
NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
CentOS-regression: Gluster Build System <jenkins at build.gluster.org>
Reviewed-by: jiffin tony Thottan <jthottan at redhat.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=qITmHgCGy0&a=cc_unsubscribe
More information about the Bugs
mailing list