mars/userspace
Thomas Schoebel-Theuer 0e6bb47cb6 marsadm: fix edge cases of try_to_avoid_splitbrain()
Originally a trivial silly bug (boolean value was wrong), leading to an
endless loop when a local versionlink was missing, which can happen
only after a primary crash at the wrong moment shortly after a logrotate
(not even during ordinary operations), followed by a hard reboot.

As documented in mars-manual.pdf, you simply need "modprobe mars"
to recover after such a crash reboot. MARS remembers the primary state
persistently for you and restores everything _automatically_.

Using "marsadm primary" in such a case to switch the current primary
to primary again (after an unnecessary "marsadm secondary" which is
strongly discouraged by mars-manual.pdf), although the host is / was
already in primary state after the reboot, is at least as silly as
the mentioned bug. Doing this in an /etc/init.d/ startup script
where it really doesn't belong into, is even more silly.

The latter is even an OPERATIONAL RISK, because "marsadm secondary"
works _globally_ in the whole cluster (as documented in mars-manual.pdf).
Such an improper startup script _can_ (potentially) disturb another
cluster member which had become primary in the _meantime_ during reboot.
Global cluster operations don't belong into startup scripts, because
reboots may happen unintentionally at any time.
2016-02-03 22:00:47 +01:00
..
udev infra: add new udev rules 2014-12-09 14:31:42 +01:00
make-man.sh doc: create manpage automatically from marsadm --help 2015-02-27 11:32:57 +01:00
mars-log-impex.c all: clarify license GPLv2+ 2014-11-25 18:09:17 +01:00
marsadm marsadm: fix edge cases of try_to_avoid_splitbrain() 2016-02-03 22:00:47 +01:00
marsadm.8 doc: update version 2015-03-09 09:53:06 +01:00
write-reboot.c all: clarify license GPLv2+ 2014-11-25 18:09:17 +01:00