Commit Graph

152 Commits

Author SHA1 Message Date
Thomas Schoebel-Theuer
e7edf0020e marsadm: workaround race between create-resource and join-resource 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
dab34fa2f6 marsadm: new command 'set-link' 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
cacea6d673 marsadm: abort 'primary' operation upon errors 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
2ab837cf09 marsadm: augment 'wait-resource' with specific wait conditions 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
ea286c6da1 marsadm: add new option --host= 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
dca17cb9b1 marsadm: change defaults for *{,-local,-global}
By default, {dis}connect and {pause,resume}-{replay,sync} should
only switch the _local_ buttons. Otherwise, unexpected side-effects
could result at bigger clusters (#nodes >> 2) from a human point of view.

The new behaviour is different from DRBD, but DRBD was (until recently)
only working on _pairs_, so global spreadout was impossible.

Global switching may be requested at any time by appending suffix
"-global", which is just no longer the default in MARS.

If anyone has objections, it is straightforward to change the
defaults again.
2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
fc0e6baa01 marsadm: new command delete-file 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
3f6d1d8858 marsadm: report errors during wait for primary 2013-06-20 15:08:27 +02:00
Thomas Schoebel-Theuer
6c3d225f1d marsadm: fix detection of /mars/ directory 2013-06-20 15:08:27 +02:00
Thomas Schoebel-Theuer
60adc8a1c5 marsadm: fix versionlink creation on freshly joined resource 2013-06-20 15:08:27 +02:00
Thomas Schoebel-Theuer
99a8800b03 marsadm: fix 'invalidate', split into phases 2013-06-20 15:08:27 +02:00
Thomas Schoebel-Theuer
fca84e9417 marsadm: optional size argument for 'create-resource' 2013-06-20 15:08:27 +02:00
Thomas Schoebel-Theuer
ab08291124 marsadm: fix join-cluster 2013-06-20 15:08:27 +02:00
Thomas Schoebel-Theuer
396ec7f0f9 marsadm: fix leave-resource, split into phases 2013-06-20 15:08:27 +02:00
Thomas Schoebel-Theuer
7187462a6e marsadm: add global uuid to cluster 2013-06-20 15:08:27 +02:00
Thomas Schoebel-Theuer
a1920494b4 marsadm: new commands {cat,show-{info,errors}} 2013-06-20 15:08:27 +02:00
Thomas Schoebel-Theuer
62a2dea515 marsadm: remove timestamp functions
Timestamps of symlinks are used for Lamport comparison
(any newer one overwrites any older one).

That concept should _not_ be used for any other comparison, since
there is no / not yet any "transactional" property of
bulk updates of symlinks (the Lamport condition treats each
symlink independently from any other).

Until such "transactions" are introduced at the strategy layer,
timestamp comparisons between _different_ symlinks are
unmeaningful in general.
2013-06-20 15:08:27 +02:00
Thomas Schoebel-Theuer
e9035548a4 marsadm: split {{at,de}tach,up,down} into phases 2013-06-20 15:08:27 +02:00
Thomas Schoebel-Theuer
0e15b38457 marsadm: add new commands 'wait-{cluster,resource}' 2013-06-03 09:05:46 +02:00
Thomas Schoebel-Theuer
359c039445 marsadm: add new command 'wait-umount' 2013-06-03 09:05:46 +02:00
Thomas Schoebel-Theuer
0953801a6e marsadm: fix primary detection
The actual-*/is-primary symlink may race with the appearance
of the device. Use both conditions to be sure.
2013-06-03 09:05:46 +02:00
Thomas Schoebel-Theuer
2dd3033ff4 marsadm: split command "primary" into phases 2013-06-03 09:05:46 +02:00
Thomas Schoebel-Theuer
dab60da817 marsadm: allow calling multiple functions in phases
Add infrastructure for splitting commands in multiple phases.
Usually, phase0 will check for some preconditions, while
phase1 will execute the command. The final result will only
be committed if nothing fails.

The difference to the old behaviour will only show up when combined
with 'all' resources. If anything fails in phase0, nothing will be
touched in phase1. The old behaviour could touch some resources,
but omit others when something failed.

The new behaviour is more transactional-like.
2013-06-03 09:05:46 +02:00
Thomas Schoebel-Theuer
14e9582e93 marsadm: fix join-resource 2013-05-13 12:50:29 +02:00
Thomas Schoebel-Theuer
4690deb873 marsadm: check attach state 2013-05-13 12:50:29 +02:00
Thomas Schoebel-Theuer
0bab62f434 marsadm: fix detection of incompatible versions 2013-05-13 12:50:29 +02:00
Thomas Schoebel-Theuer
b7c1900820 marsadm: use Lamport time for symlink creation 2013-05-13 12:50:29 +02:00
Thomas Schoebel-Theuer
30f97cd23f light: fix symlink deletion 2013-05-13 12:50:29 +02:00
Thomas Schoebel-Theuer
ca07c9a763 marsadm: fix log-delete{,-all} 2013-05-13 12:50:29 +02:00
Thomas Schoebel-Theuer
77fdc4cc1a marsadm: improve check_* routines 2013-05-13 12:50:29 +02:00
Thomas Schoebel-Theuer
6964573aa3 marsadm: disallow resize to smaller size 2013-05-13 12:50:29 +02:00
Thomas Schoebel-Theuer
b0c09061e9 marsadm: allow only multiples of 4k as size arguments 2013-04-25 22:32:37 +02:00
Thomas Schoebel-Theuer
46f815f54e marsadm: add optional size argument to resize command 2013-04-25 16:06:18 +02:00
Thomas Schoebel-Theuer
8d93439dcb marsadm: add new command 'set-replay' 2013-04-22 14:40:24 +02:00
Thomas Schoebel-Theuer
22f75b9d71 marsadm: rewrite / correct symlink faking 2013-04-22 14:40:24 +02:00
Thomas Schoebel-Theuer
03f418c2c7 marsadm: improve message texts and parameter semantics 2013-04-22 11:50:07 +02:00
Thomas Schoebel-Theuer
8f081105fd marsadm: fix distinction _get_{designated,actual}_primary 2013-04-22 11:48:50 +02:00
Thomas Schoebel-Theuer
109eed06f3 marsadm: fix and unify readlink() usage 2013-04-22 11:48:50 +02:00
Thomas Schoebel-Theuer
78c7c307ea marsadm: fix primary checks 2013-04-22 11:48:50 +02:00
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
Thomas Schoebel-Theuer
f2b8256fcd marsadm: categorize commands correctly 2013-04-17 12:03:00 +02:00
Thomas Schoebel-Theuer
e02c06e265 marsadm: disallow --force on 'all' resources 2013-04-17 12:03:00 +02:00
Thomas Schoebel-Theuer
9187bf210d marsadm: check for matching version numbers 2013-04-17 11:03:13 +02:00
Thomas Schoebel-Theuer
f5fae8e4ba light: show runtime connection status information 2013-04-12 08:26:25 +02:00
Daniel Hermann
4dafa9467a marsadm: use actual primary where appropriate instead of target primary
The actual primary is decoded in 'actual-*/is-primary' links, while the
target primary is decoded in the 'primary' link.  This is not clearly
taken into account in several functions of marsadm.  This commit fixes
this problem.

- Added _get_actual_primary() function
- Remove $pri parameter in _primary_res
- Use _get_actual_primary() where actual state should be used

Commits 3e96a5e 578d003 5dccbdc rebased to dfeb8e6

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-04-11 11:01:25 +02:00
Daniel Hermann
3bf3745ec8 marsadm: use lamport clock for checking modification timestamps of symlinks
- Added mars_time() function returning lamport clock
- Renamed check_mtime to check_file_aged and fixed to use mars_time()
- Renamed check_all_mtimes to check_files_modified_any_of

Commits eb849e2 1be8700 fbb415a rebased on dfeb8e6

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-04-11 11:01:25 +02:00
Daniel Hermann
7a42f95d6c marsadm: renam _allowed_logdelete() to _min_nondeletable_logfile()
Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-04-11 11:01:25 +02:00
Daniel Hermann
5d3d777b86 marsadm: fix check_primary/check_not_primary to use actual state ('is-primary')
The actual state is decoded in 'actual-*/is-primary' links, while the target
state is decoded in the 'primary' link.
- check_primary() now uses actual state
- check_not_primary() now uses both actual state and target state

Commits c38a822 94ac15a rebased on eaba743

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-04-11 11:01:25 +02:00
Thomas Schoebel-Theuer
eaba743456 light: separate logging of transaction logfile problems 2013-04-09 14:01:07 +02:00
Thomas Schoebel-Theuer
c275bec28d light: new systematics for emergency modes (filesystem full) 2013-04-08 17:02:57 +02:00