marsadm: allow --force on 'all'

This commit is contained in:
Thomas Schoebel-Theuer 2015-04-27 10:21:57 +02:00
parent 3f9571999d
commit 1eea119870
2 changed files with 26 additions and 4 deletions

View File

@ -4015,7 +4015,7 @@ actual
secondary
\family default
command.
As soon as a local
As soon as the local
\family typewriter
/dev/mars/mydata
\family default
@ -4030,7 +4030,8 @@ marsadm secondary
\family default
can lead to a situation where noone is actually in primary role, and noone
is able to re-enter it due to split brain.
Such a situation can be avoided by
Such a situation can be resolved by split-brain resolution.
You should avoid it in advance by always
\emph on
directly
\emph default
@ -4039,7 +4040,7 @@ directly
secondary
\family default
command.
This behaviour is different from DRBD.
This is different from DRBD.
\end_layout
\begin_layout Standard
@ -17329,6 +17330,28 @@ uuid
time to notice your changes.
\end_layout
\begin_layout Standard
Instead of executing
\family typewriter
marsadm
\family default
commands serveral times for each resource argument, you may give the special
resource argument
\family typewriter
all
\family default
.
This work even when combined with
\family typewriter
--force
\family default
, but be cautious when giving dangerous command combinations like
\family typewriter
marsadm delete-resource --force all
\family default
.
\end_layout
\begin_layout Subsection
Resource Creation / Deletion / Modification
\begin_inset CommandInset label

View File

@ -4997,7 +4997,6 @@ sub do_all_res {
my $cmd = shift;
my $res = shift;
if ($res eq "all" && $cmd !~ m/show|cat|cluster|set-link|delete-file/) {
ldie "For safety reasons, --force is only allowed on explicitly named resources. Combination of 'all' with --force is disallowed!\n" if $force;
ldie "Cannot combine command '$cmd' with 'all' existing resources - you must explicitly name a single new resource\n" if $cmd =~ m/create|join/;
my $any_success = 0;
my $any_member = 0;