fix #4895: scheduled jobs: ignore task-log not found error
Use the job start-time as end-time when it's stuck in the `JobState::Starting` state, no active working is running and the task log of the last run doesn't exists. A user experienced a power loss, which left a GC job in the `Started` state, but the task log did not exist. This breaks the schedule and no following GC runs. Now, the error is simply ignored and a new gc job is started on the next occurrence. Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
This commit is contained in:
parent
9d1ba51de7
commit
48fbce07df
@ -198,8 +198,9 @@ impl JobState {
|
||||
.map_err(|err| format_err!("error parsing upid: {err}"))?;
|
||||
|
||||
if !worker_is_active_local(&parsed) {
|
||||
let state = upid_read_status(&parsed)
|
||||
.map_err(|err| format_err!("error reading upid log status: {err}"))?;
|
||||
let state = upid_read_status(&parsed).unwrap_or(TaskState::Unknown {
|
||||
endtime: parsed.starttime,
|
||||
});
|
||||
|
||||
Ok(JobState::Finished {
|
||||
upid,
|
||||
|
Loading…
x
Reference in New Issue
Block a user