marsadm: command secondary must not change primary link if executed on a secondary

Fixes the bug, that marsadm secondary sets the link <resource_dir>/primary
to (none) even if executed on a secondary host.
This commit is contained in:
Frank Liepold 2013-07-16 12:26:14 +02:00 committed by Thomas Schoebel-Theuer
parent c474e17d88
commit 08d4f863ff
1 changed files with 1 additions and 0 deletions

View File

@ -1327,6 +1327,7 @@ sub primary_phase1 {
return if ($force and $cmd eq "primary");
my $old = _get_designated_primary($res);
return if ($old eq $host and $cmd eq "primary");
return if ($old ne $host and $cmd eq "secondary");
my $new = "(none)";
return if $old eq $new;
_primary_res($res, $new, $old);