Skip to content

Commit

Permalink
core/failure-action: Set job-modes to replace-irreversibly
Browse files Browse the repository at this point in the history
Up until now, the failure action has launched reboot.target and
poweroff.target with a less aggressive job mode than
"systemctl reboot" does. This has meant that the reboot and power-
off operations can stall if there are any conflicts with the target
during rebooting.
  • Loading branch information
jhol committed Mar 4, 2016
1 parent 9f0cd10 commit 9c0d1c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/failure-action.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ int failure_action(
log_and_status(m, "Rebooting as result of failure.");

update_reboot_param_file(reboot_arg);
(void) manager_add_job_by_name_and_warn(m, JOB_START, SPECIAL_REBOOT_TARGET, JOB_REPLACE, NULL);
(void) manager_add_job_by_name_and_warn(m, JOB_START, SPECIAL_REBOOT_TARGET,
JOB_REPLACE_IRREVERSIBLY, NULL);

break;

Expand All @@ -89,7 +90,8 @@ int failure_action(

case FAILURE_ACTION_POWEROFF:
log_and_status(m, "Powering off as result of failure.");
(void) manager_add_job_by_name_and_warn(m, JOB_START, SPECIAL_POWEROFF_TARGET, JOB_REPLACE, NULL);
(void) manager_add_job_by_name_and_warn(m, JOB_START, SPECIAL_POWEROFF_TARGET,
JOB_REPLACE_IRREVERSIBLY, NULL);
break;

case FAILURE_ACTION_POWEROFF_FORCE:
Expand Down

0 comments on commit 9c0d1c1

Please sign in to comment.