Commit Graph

707 Commits

Author SHA1 Message Date
Thomas Schoebel-Theuer
fe54abb225 logger: update symlinks even at apply of incomplete logfiles 2013-06-20 15:08:48 +02:00
Thomas Schoebel-Theuer
fd39137cc9 marsadm: 'secondary' waits until device has disappeared 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
15c76e9ffb marsadm: check block device for exclusive access in {create,join}-resource 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
84bb63ccc8 marsadm: remove potentially dangerous internal _create_cluster() call 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
21a5d4160c logger: disallow skipping of bad data
Be as conservative as possible.

Any copputed logfiles must be corrected in userspace.
2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
eec86bf1af marsadm: create initial versionlink upon create-resource 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
2fee24fe49 light: report is_primary at the end of the round
The old code led to ain unnecessary delay of 1 round.
2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
81ca278291 aio: fix race on file size
The old code used mf->mf_max for correcting the file size, but that
was wrong for multiple writes in flight.

A really correct solution would have to remember all in-flight writes
and compute their minimum IO position. Since that would be too
costly, we just use the old size before any writes have started.

This might be too conservative for extremely high load patterns
(possible starvation problem). For now, take this and check whether
we really need higher effort.
2013-06-20 15:08:28 +02:00
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
faa1c8d802 light: fix attach on locked device 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
a0190b043d proc: add /proc/sys/mars/info 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
cdd7b85417 infra: systematics of make_brick_all() switching, remove superfluos parameter 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
62dd9c64dd light: fix logfile replication when trans_logger is not running 2013-06-03 09:05:47 +02:00
Thomas Schoebel-Theuer
bdb6aaef1f light: fix detach operation 2013-06-03 09:05:46 +02:00
Thomas Schoebel-Theuer
59d706ba54 infra: replace brick_version by kill_round 2013-06-03 09:05:46 +02:00
Thomas Schoebel-Theuer
bf7c0c9f3b infra: remove superfluous parameter is_server 2013-06-03 09:05:46 +02:00
Thomas Schoebel-Theuer
dfe2dc5b1c infra: remove recursive button operations
All buttons should be switched step-by-step in future.
The previous patch should ensure that no harm can occur.
2013-06-03 09:05:46 +02:00
Thomas Schoebel-Theuer
726bbe17fc infra: don't switch off if predecessors are working 2013-06-03 09:05:46 +02:00
Thomas Schoebel-Theuer
ce110eb52b infra: disallow forbidden brick states
Switch on only when all predecessor bricks are also on.
Failing to do so can result in fatal errors.
Similarly, switch only off if no successor exists any more.
2013-06-03 09:05:46 +02:00
Thomas Schoebel-Theuer
326ed48da2 light: remove superfluous timeout parameter
The concept was broken.
2013-06-03 09:05:46 +02:00
Thomas Schoebel-Theuer
e3c10d31a9 net: decrease trigger turnaround time 2013-06-03 09:05:46 +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
db8e4caacf proc: fix query of lamport clock 2013-05-13 12:50:29 +02:00
Frank Liepold
57b8d173ff light: correct error code OOM 2013-05-13 12:50:29 +02:00
Thomas Schoebel-Theuer
30f97cd23f light: fix symlink deletion 2013-05-13 12:50:29 +02:00