mars/userspace
Daniel Hermann 92951e491b marsadm: improve primary/secondary command behaviour
Previously, the 'marsadm primary' and 'marsadm secondary' commands
were successful as soon as the target primary was successfully set
to the new primary or '(none)', respectively.  This commit appends
a check to wait until the primary is really changed (actual state).

Changes in marsadm:
- Added check_primary_settled() function
- Do not use local variable named '$host' in _primary_res() since
  a global variable with same name exists.
- Do not use/set global variable '$host' in primary_res().  Use
  local variable '$new' initially set to '$host' instead.
- Make 'secondary' command idempotent ("is already secondary")
- Call trigger() and check_primary_settled() in primary_res()

Related minor changes:
- marsadm: Added optional parameter 'sleeptime' to sleep_timeout()
- Removed debug output in check_file_aged()

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-04-18 10:09:15 +02:00
..
mars-status light: new systematics for emergency modes (filesystem full) 2013-04-08 17:02:57 +02:00
mars-status.8 update manpages 2013-01-23 20:06:56 +01:00
marsadm marsadm: improve primary/secondary command behaviour 2013-04-18 10:09:15 +02:00
marsadm.8 update manpages 2013-01-23 20:06:56 +01:00