mirror of https://github.com/schoebel/mars
marsadm: allow log-rotate on secondaries upon --force
This makes not much sense, but is provided for cases where you are really desperate.
This commit is contained in:
parent
7cbb705882
commit
3f9571999d
|
@ -2770,12 +2770,6 @@ extremely
|
||||||
\emph default
|
\emph default
|
||||||
high load conditions, you might want to log-rotate serveral times an hour,
|
high load conditions, you might want to log-rotate serveral times an hour,
|
||||||
in order to keep the size of each logfile under some practical limit.
|
in order to keep the size of each logfile under some practical limit.
|
||||||
At 1&1 datacenters, we have not yet encountered conditions where that was
|
|
||||||
really
|
|
||||||
\emph on
|
|
||||||
necessary
|
|
||||||
\emph default
|
|
||||||
.
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
@ -5358,8 +5352,11 @@ md5
|
||||||
\family default
|
\family default
|
||||||
checksums for all data records.
|
checksums for all data records.
|
||||||
Any attempt to replay currupted logfiles is refused by MARS.
|
Any attempt to replay currupted logfiles is refused by MARS.
|
||||||
In addition, the sequence numbers of log-rotated logfiles are checked for
|
In addition, the sequence numbers of
|
||||||
contiguity.
|
\family typewriter
|
||||||
|
log-rotate
|
||||||
|
\family default
|
||||||
|
d logfiles are checked for contiguity.
|
||||||
Finally, the
|
Finally, the
|
||||||
\emph on
|
\emph on
|
||||||
sequence path
|
sequence path
|
||||||
|
@ -23788,6 +23785,30 @@ $new_nr
|
||||||
$old_nr
|
$old_nr
|
||||||
\family default
|
\family default
|
||||||
+ 1.
|
+ 1.
|
||||||
|
Without
|
||||||
|
\family typewriter
|
||||||
|
--force
|
||||||
|
\family default
|
||||||
|
, this will only carry out actions at the primary side since it makes no
|
||||||
|
sense on secondaries.
|
||||||
|
With
|
||||||
|
\family typewriter
|
||||||
|
--force
|
||||||
|
\family default
|
||||||
|
, secondaries are
|
||||||
|
\emph on
|
||||||
|
trying
|
||||||
|
\emph default
|
||||||
|
to
|
||||||
|
\emph on
|
||||||
|
remotely
|
||||||
|
\emph default
|
||||||
|
trigger a log-rotate, but without any guarantee (likely even a split-brain
|
||||||
|
may result instead, so use this only if you are
|
||||||
|
\emph on
|
||||||
|
really
|
||||||
|
\emph default
|
||||||
|
desperate).
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
|
@ -1723,7 +1723,7 @@ sub delete_res {
|
||||||
|
|
||||||
sub logrotate_res {
|
sub logrotate_res {
|
||||||
my ($cmd, $res) = @_;
|
my ($cmd, $res) = @_;
|
||||||
check_primary(@_);
|
check_primary(@_) unless $force;
|
||||||
my @paths = glob("$mars/resource-$res/log-*-$host") or ldie "cannot find any logfiles\n";
|
my @paths = glob("$mars/resource-$res/log-*-$host") or ldie "cannot find any logfiles\n";
|
||||||
@paths = sort(@paths);
|
@paths = sort(@paths);
|
||||||
my $last = pop(@paths);
|
my $last = pop(@paths);
|
||||||
|
|
Loading…
Reference in New Issue