[pbs-devel] [PATCH proxmox-backup] fix #4895: jobs: ignore task log not found error
Gabriel Goller
g.goller at proxmox.com
Wed Sep 20 16:11:24 CEST 2023
Use job starttime as endtime when it is stuck in `JobState::Starting`
and no task log 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 occurence.
Signed-off-by: Gabriel Goller <g.goller at proxmox.com>
---
src/server/jobstate.rs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/server/jobstate.rs b/src/server/jobstate.rs
index a13d768b..be9dac42 100644
--- a/src/server/jobstate.rs
+++ b/src/server/jobstate.rs
@@ -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,
--
2.39.2
More information about the pbs-devel
mailing list