Commit Graph

839 Commits

Author SHA1 Message Date
Thomas Schoebel-Theuer
e9c9f525e0 marsadm: lockless atomic template generation 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
ebae3fb7c3 marsadm: timeout any hanging systemctl processes 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
2661f8ab94 marsadm: speedup transitive template generation 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
63b5a195f5 marsadm: primary separate trigger phase 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
0ed1325dd8 marsadm: split delete-resource into phases 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
32c703f59b marsadm: leave-resource separate systemd-trigger 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
4d8d79881c marsadm: split set-systemd-want into phases 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
ff1a89bc1b marsadm: split set-systemd-unit into phases 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
0c3e7682ba marsadm: automatic systemd parallelization 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
3907caf08b marsadm: shortcut set-systemd-want 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
ee9e355600 marsadm: avoid exhaustive template search 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
f5435ee5ce marsadm: less speaky template generation 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
fcad02e977 marsadm: skip predefined units 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
bd2622e484 marsadm: parallelize systemctl start/stop 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
76f39927d3 marsadm: force template generation upon resource changes 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
cceaa3a5f4 marsadm: less speaky actions 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
7107e060ac marsadm: remove disturbing is_systemd_generate_necessary 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
4180741c92 marsadm: skip template instantiation on mtime check 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
e5602bf4f0 marsadm: factor out _get_file 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
f042972ee5 marsadm: split systemd unit and script directories 2021-01-06 17:06:53 +01:00
Thomas Schoebel-Theuer
11976c261b marsadm: set-systemd-unit DEFAULT markers etc 2021-01-06 17:06:52 +01:00
Thomas Schoebel-Theuer
c1738680cd marsadm: fix get-systemd-unit empty string 2021-01-06 17:06:52 +01:00
Thomas Schoebel-Theuer
b390bd7079 marsadm: skip systemd-trigger when called by cm3 & co
Stay away, avoid infinite recursion etc.
2021-01-06 17:06:52 +01:00
Thomas Schoebel-Theuer
ecca5f51cb marsadm: allow directly executable .script templates 2021-01-06 17:06:42 +01:00
Thomas Schoebel-Theuer
f03ae66c52 marsadm: removed deprecated template fingerprinting 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
9228bb7e36 marsadm: add header to generated systemd units 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
fd83afcb46 marsadm: move filename substitution code 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
1aec029792 marsadm: dynamic programming on template instantiation 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
8846b48f74 marsadm: rework template activation 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
8de93db03a marsadm: remove deprecated want_host_path 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
3fa0421365 marsadm: fix race on system lock breaks 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
c27441325d marsadm: new option --systemd-enable 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
924abf9f42 marsadm: factor out systemd reporting 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
601f378cd7 marsadm: workaround unimplemented AT_SYMLINK_NOFOLLOW and undef at utime() 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
136dcae0ba marsadm: safeguard return at resize 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
bcfcf25a31 marsadm: safeguard return at invalidate 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
22269a19bd marsadm: safeguard return at primary 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
7a18d1ab9e marsadm: safeguard return at fake-sync 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
0afde44073 marsadm: safeguard return at up 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
dcb60eaef3 marsadm: safeguard return at attach 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
2561800e68 marsadm: safeguard return at cron 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
75807a287c marsadm: safeguard return at leave-resource 2020-12-22 09:43:08 +01:00
Thomas Schoebel-Theuer
51fafadbb3 marsadm: fix transitive dependency keywords 2020-12-22 09:43:05 +01:00
Thomas Schoebel-Theuer
ee058015ee marsadm: fix safe_touch 2020-12-22 08:58:02 +01:00
Thomas Schoebel-Theuer
ef9c07b7d1 marsadm: fix set-systemd-unit 2020-12-22 08:58:02 +01:00
Thomas Schoebel-Theuer
29482a5c68 marsadm: document idea behind transitive closure computation 2020-12-22 08:58:02 +01:00
Thomas Schoebel-Theuer
bd5b2ef885 marsadm: skip unnecessary template checks 2020-12-22 08:58:02 +01:00
Thomas Schoebel-Theuer
dcdf848933 marsadm: fix missing dir /mars/userspace 2020-12-22 08:58:02 +01:00
Thomas Schoebel-Theuer
f12ea371f9 marsadm: fix failover with systemd 2020-12-22 08:58:02 +01:00
Thomas Schoebel-Theuer
cde7133356 marsadm: minor update command description 2020-11-29 17:41:22 +01:00
Thomas Schoebel-Theuer
a48dcca14d marsadm: new commands {de,}activate-guest 2020-11-29 17:41:06 +01:00
Thomas Schoebel-Theuer
4cae329dc9 marsadm: speedup join-resource on non-reachable peers 2020-11-27 23:17:25 +01:00
Thomas Schoebel-Theuer
4e6ef0751b marsadm: fix annoying warning 2020-11-27 23:17:25 +01:00
Thomas Schoebel-Theuer
6fed821b6e marsadm: carefully shortcut self-waiting 2020-11-27 23:17:24 +01:00
Thomas Schoebel-Theuer
74f0da534b marsadm: fix join-cluster dir creation 2020-11-27 21:04:04 +01:00
Thomas Schoebel-Theuer
94df66a3c1 marsadm: fix too strong race detection 2020-11-26 11:40:11 +01:00
Thomas Schoebel-Theuer
feb0540224 marsadm: fix typo 2020-11-12 05:37:17 +01:00
Thomas Schoebel-Theuer
30730e4a50 marsadm: safeguard races on log-purge-res 2020-11-10 16:04:01 +01:00
Thomas Schoebel-Theuer
54226c78a7 marsadm: safeguard purge of recent logfiles 2020-11-10 16:04:01 +01:00
Thomas Schoebel-Theuer
6020414d25 marsadm: safeguard deletion of recent logfiles 2020-11-10 16:04:01 +01:00
Thomas Schoebel-Theuer
f871eb9514 marsadm: safeguard deletion of last logfile 2020-11-10 16:04:01 +01:00
Thomas Schoebel-Theuer
e9e5c1a1da marsadm: safeguard logrotate --force 2020-11-10 16:04:01 +01:00
Thomas Schoebel-Theuer
dc1e778abb marsadm: safeguard race between split-brain log-deletes 2020-11-10 16:04:01 +01:00
Thomas Schoebel-Theuer
54cb4605d0 all: bump versions 2020-11-10 16:04:01 +01:00
Thomas Schoebel-Theuer
3aa037d976 marsadm: push new replay links to primary 2020-11-10 16:04:01 +01:00
Thomas Schoebel-Theuer
69199818c8 marsadm: include probe_dir in transitive closure 2020-11-10 16:04:01 +01:00
Thomas Schoebel-Theuer
1c0e4cf9a9 marsadm: new ssh-less split-cluster method 2020-11-10 16:03:50 +01:00
Thomas Schoebel-Theuer
25cec3526e marsadm: new ssh-less merge-cluster method 2020-11-10 16:02:46 +01:00
Thomas Schoebel-Theuer
9cb9e81310 marsadm: new _push_link_foreign onto foreign IP 2020-11-10 16:02:05 +01:00
Thomas Schoebel-Theuer
9a72f86c60 marsadm: new option --no-ssh 2020-11-07 08:56:09 +01:00
Thomas Schoebel-Theuer
7511ebadcf marsadm: local peer and resource cache 2020-11-07 08:56:09 +01:00
Thomas Schoebel-Theuer
29b22a779f marsadm: check peer activations 2020-11-07 08:56:07 +01:00
Thomas Schoebel-Theuer
ab6990593d marsadm: better _get_ip 2020-11-07 08:34:57 +01:00
Thomas Schoebel-Theuer
18319eed23 marsadm: fix parsing of backslash-terminated lines
Suggested-by: dhrmn <notifications@github.com>
2020-11-07 08:25:47 +01:00
Thomas Schoebel-Theuer
70a4aae762 marsadm: primitives {is,todo,nr}-secondary 2020-11-07 08:25:47 +01:00
Thomas Schoebel-Theuer
7427478957 marsadm: primitives wait-{is,todo}-{primary,secondary}-{on,off} 2020-11-07 08:25:47 +01:00
Thomas Schoebel-Theuer
461ac8b4cd marsadm: new switch semantics on marsadm primary
Apparently, sysadmins often forget to execute "marsadm up mydata"
(or similar) after a failover.

Recall the failover command sequence:
"marsadm pause-fetch mydata; marsadm primary --force mydata"

Some months later, other sysadmins in the group are stumbling over
the very old "pause-fetch" after a regular planned handover via
"marsadm primary mydata". It works, but the former primary
(which is now secondary) does no longer fetch data, because of the
very old pause-fetch command which was never reverted.

Afterwards, /mars is filling up slowly over a long time.

Somewhen later (e.g. a few days), a monitoring alert "/mars too full"
is happening at midnight, leading to an unnecessary on-duty call.

A different type of monitoring could help, by not only
tracking the filling level of /mars, but also view-todo-fetch or
similar. However, some people dislike this, because there
exist operational use cases (like creation of backups) where pause-fetch
is executed _deliberately_ for a longer time.

Here is a workaround for a forgotten resume-fetch / up after
the first failover:

After the  _original_ "marsadm primary" or "primary --force" has
succeeded by appearance of /dev/mars/mydata, we simply execute
the equivalent of "marsadm up mydata".

This changes the semantics of the "primary" command. Hopefully
no scripts on this world will break.
2020-11-07 08:25:47 +01:00
Thomas Schoebel-Theuer
08c41805ec marsadm: purge any left-over probe dirs 2020-11-07 08:25:47 +01:00
Thomas Schoebel-Theuer
838b85c508 marsadm: global purge at cron 2020-11-07 08:25:47 +01:00
Thomas Schoebel-Theuer
93ef671cf3 marsadm: global purge at link-purge-all 2020-11-07 08:25:47 +01:00
Thomas Schoebel-Theuer
4d05bb3796 marsadm: split up link_purge_global 2020-11-07 08:25:47 +01:00
Thomas Schoebel-Theuer
bd5412d4f5 marsadm: fix version detection for gone members 2020-11-07 08:25:47 +01:00
Thomas Schoebel-Theuer
5b1ca6773a marsadm: safeguard missing old deletions 2020-11-07 08:25:47 +01:00
Thomas Schoebel-Theuer
533b13b3df marsadm: fix initial join-resource on slow metadata communication 2020-11-07 08:25:47 +01:00
Thomas Schoebel-Theuer
c3585565be marsadm: fix join-cluster on unknown peer 2020-11-07 08:25:47 +01:00
Thomas Schoebel-Theuer
1dd31c1285 marsadm: only ask myself upon self wait-cluster 2020-11-07 08:25:47 +01:00
Thomas Schoebel-Theuer
90947c1b14 marsadm: fix wait-cluster race abort 2020-11-07 08:25:47 +01:00
Thomas Schoebel-Theuer
72cbf7b8be marsadm: skip unnecessary wait-cluster restart 2020-11-07 08:01:07 +01:00
Thomas Schoebel-Theuer
b2cd7ddf23 marsadm: clear any local caches 2020-10-28 06:09:11 +01:00
Thomas Schoebel-Theuer
d3acf3f9c8 marsadm: fix join-cluster missing dirs 2020-10-28 06:09:11 +01:00
Thomas Schoebel-Theuer
c9b7fcf7f9 marsadm: safeguard join-resource endless loop 2020-10-28 06:09:11 +01:00
Thomas Schoebel-Theuer
e3ebc5762b marsadm: view disk-error 2020-09-30 14:24:27 +02:00
Thomas Schoebel-Theuer
26b40474cb marsadm: re-activate any forgotten fetch on handover 2020-09-21 14:40:48 +02:00
Thomas Schoebel-Theuer
ed95e24496 marsadm: allow leave-resource --force on empty resource 2020-09-19 17:42:34 +02:00
Thomas Schoebel-Theuer
ae2668b265 marsadm: hint admins on --ignore-sync 2020-09-18 17:45:57 +02:00
Thomas Schoebel-Theuer
23748272ca marsadm: remove stray nonsense 2020-09-18 17:45:57 +02:00
Thomas Schoebel-Theuer
87064c1c5a marsadm: fix primitive disk-present 2020-09-10 11:21:38 +02:00
Thomas Schoebel-Theuer
11792c250e marsadm: remove annoying doubled error code 2020-09-05 23:08:30 +02:00
Thomas Schoebel-Theuer
60baf9c378 marsadm: fix old deletions max_nr detection 2020-09-05 23:06:38 +02:00
Thomas Schoebel-Theuer
24bb735d5a marsadm: report summary on non-reachable non-member hosts 2020-09-03 16:29:55 +02:00