* Fixed a major bug where anvil-daemon would reset the job_progress to 0 when clearing the 'reboot_needed' flag, causing anvil-daemon to pick the job up and again reboot, repeatedly.
* Updated Jobs->update_progress to take 'picked_up_by' as an optional parameter, defaulting to '$$' (the caller's PID).
* Created System->get_uptime() to return the current uptime in seconds.
* Added a delay to anvil-manage-power to not proceed with a reboot if the uptime is less than 600 seconds. This way, if any future bug causes an infinite reboot, there will be more time to determine what's wrong and debug the system between reboots.
Signed-off-by: Digimer <digimer@alteeve.ca>
@ -372,6 +372,10 @@ The database connection error was:
<keyname="log_0221">Writing: [#!variable!to_write!#] record(s) to resync the database on: [#!variable!host_name!#].</key>
<keyname="log_0221">Writing: [#!variable!to_write!#] record(s) to resync the database on: [#!variable!host_name!#].</key>
<keyname="log_0222">The connection to the database on: [#!variable!host!#] isn't established, trying again...</key>
<keyname="log_0222">The connection to the database on: [#!variable!host!#] isn't established, trying again...</key>
<keyname="log_0223">The connection to the database on: [#!variable!host!#] has been successfully established.</key>
<keyname="log_0223">The connection to the database on: [#!variable!host!#] has been successfully established.</key>
<keyname="log_0224">The system has only been running for: [#!variable!uptime!#] seconds. To minimize the impact of a bug causing a rapid reboot cycle, the request to: [#!variable!task!#] will be paused until the system has been running for at least ten minutes. We will proceed in: [#!variable!difference!#] seconds (at #!variable!say_time!#).</key>
<keyname="log_0225">power off</key>
<keyname="log_0226">reboot</key>
<keyname="log_0227">Delay complete, proceeding with the #!variable!task!# operation now.</key>
<!-- Test words. Do NOT change unless you update 't/Words.t' or tests will needlessly fail. -->
<!-- Test words. Do NOT change unless you update 't/Words.t' or tests will needlessly fail. -->