all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] fix #4895: jobs: ignore task log not found error
Date: Wed, 20 Sep 2023 16:11:24 +0200	[thread overview]
Message-ID: <20230920141124.231371-1-g.goller@proxmox.com> (raw)

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@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





             reply	other threads:[~2023-09-20 14:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-20 14:11 Gabriel Goller [this message]
2023-09-27 15:41 ` [pbs-devel] applied: " Thomas Lamprecht
2023-09-28  7:32   ` Gabriel Goller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230920141124.231371-1-g.goller@proxmox.com \
    --to=g.goller@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal