mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-06-15 20:12:34 +00:00
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}"))?;
|
.map_err(|err| format_err!("error parsing upid: {err}"))?;
|
||||||
|
|
||||||
if !worker_is_active_local(&parsed) {
|
if !worker_is_active_local(&parsed) {
|
||||||
let state = upid_read_status(&parsed)
|
let state = upid_read_status(&parsed).unwrap_or(TaskState::Unknown {
|
||||||
.map_err(|err| format_err!("error reading upid log status: {err}"))?;
|
endtime: parsed.starttime,
|
||||||
|
});
|
||||||
|
|
||||||
Ok(JobState::Finished {
|
Ok(JobState::Finished {
|
||||||
upid,
|
upid,
|
||||||
|
Loading…
Reference in New Issue
Block a user