From 8cc203c55dbb32b99a17be5cdb30a211eaa82818 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Wed, 9 Dec 2020 19:42:23 +0100 Subject: [PATCH] marsadm: set-systemd-want obeys prosumer --- userspace/marsadm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/userspace/marsadm b/userspace/marsadm index 943cc136..0780f68a 100755 --- a/userspace/marsadm +++ b/userspace/marsadm @@ -1766,10 +1766,17 @@ sub __systemd_activate_want { $do_activate = $override; } } elsif ($do_activate) { - my $primary = _get_designated_primary($res); - if ($primary ne $host) { + if (todo_local($cmd, $res)) { + my $primary = _get_designated_primary($cmd, $res); + if ($primary ne $host) { + # Do not activate for now + lprint "Overriding systemd-want: '$host' is not designated primary.\n"; + lprint "==== Do not modify resource '$res'\n" if $verbose; + return 0; + } + } elsif (!todo_prosumer($cmd, $res, $want)) { # Do not activate for now - lprint "Overriding systemd-want: '$host' is not designated primary,\n"; + lprint "Overriding systemd-want: '$want' is no designated prosumer.\n"; lprint "==== Do not modify resource '$res'\n" if $verbose; return 0; }