mirror of
https://github.com/schoebel/mars
synced 2024-12-29 02:12:53 +00:00
marsadm: leave-resource separate systemd-trigger
This commit is contained in:
parent
4d8d79881c
commit
32c703f59b
@ -5207,6 +5207,7 @@ sub leave_res_phase0 {
|
|||||||
check_status($cmd, $res, "is-attached", 0, 0, 1);
|
check_status($cmd, $res, "is-attached", 0, 0, 1);
|
||||||
ldie "there were $errors errors.\n" if $errors;
|
ldie "there were $errors errors.\n" if $errors;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub leave_res_phase1 {
|
sub leave_res_phase1 {
|
||||||
@ -5241,6 +5242,7 @@ sub leave_res_phase2 {
|
|||||||
$force = 0; # this would be too dangerous
|
$force = 0; # this would be too dangerous
|
||||||
log_purge_res($cmd, $res);
|
log_purge_res($cmd, $res);
|
||||||
err_purge_res($cmd, $res);
|
err_purge_res($cmd, $res);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub leave_res_phase3 {
|
sub leave_res_phase3 {
|
||||||
@ -5252,6 +5254,11 @@ sub leave_res_phase3 {
|
|||||||
if ($compat_deletions && $host eq $real_host) {
|
if ($compat_deletions && $host eq $real_host) {
|
||||||
system("rm -f $mars/resource-$res/log-*");
|
system("rm -f $mars/resource-$res/log-*");
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub leave_res_phase4 {
|
||||||
|
my ($cmd, $res) = @_;
|
||||||
_systemd_trigger($cmd, 1);
|
_systemd_trigger($cmd, 1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -8737,6 +8744,8 @@ my %cmd_table =
|
|||||||
"purge logfiles",
|
"purge logfiles",
|
||||||
\&leave_res_phase3,
|
\&leave_res_phase3,
|
||||||
"wait for deletions",
|
"wait for deletions",
|
||||||
|
\&leave_res_phase4,
|
||||||
|
"trigger systemd",
|
||||||
],
|
],
|
||||||
"delete-resource"
|
"delete-resource"
|
||||||
=> [
|
=> [
|
||||||
|
Loading…
Reference in New Issue
Block a user