all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Gabriel Goller <g.goller@proxmox.com>
Subject: [pbs-devel] applied: [PATCH proxmox-backup] fix #4895: jobs: ignore task log not found error
Date: Wed, 27 Sep 2023 17:41:52 +0200	[thread overview]
Message-ID: <a17afc2b-9322-45f1-adaf-d1307d83d110@proxmox.com> (raw)
In-Reply-To: <20230920141124.231371-1-g.goller@proxmox.com>

Am 20/09/2023 um 16:11 schrieb Gabriel Goller:
> 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(-)
> 
>

applied, thanks!

IMO it might be worth doing this more centrally, e.g., catch a ENOENT in
the upid_read_status's `File::open(path)` call and return either
`TaskState::Unknown { endtime: upid.startime }`, which is also the
default of upid_read_status on other (parsing) errors, or add a new
`TaskState::NotFound` state to differ between a unknown result and this
situation, and make it more likely that call-sites handle this
explicitly.

What do you think?




  reply	other threads:[~2023-09-27 15:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-20 14:11 [pbs-devel] " Gabriel Goller
2023-09-27 15:41 ` Thomas Lamprecht [this message]
2023-09-28  7:32   ` [pbs-devel] applied: " 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=a17afc2b-9322-45f1-adaf-d1307d83d110@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=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