public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Michael Köppl" <m.koeppl@proxmox.com>
To: "Michael Köppl" <m.koeppl@proxmox.com>, pbs-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox-backup v1 1/2] fix #7400: api: gracefully handle corrupted job statefiles
Date: Wed, 18 Mar 2026 18:22:36 +0100	[thread overview]
Message-ID: <DH62YLMHZA5R.3F70OLJ4871SJ@proxmox.com> (raw)
In-Reply-To: <20260317160722.201693-2-m.koeppl@proxmox.com>

On Tue Mar 17, 2026 at 5:07 PM CET, Michael Köppl wrote:

[snip]

>  };
>  use pbs_config::prune;
>  use pbs_config::CachedUserInfo;
> @@ -73,10 +73,13 @@ pub fn list_prune_jobs(
>      let mut list = Vec::new();
>  
>      for job in job_config_iter {
> -        let last_state = JobState::load("prunejob", &job.id)
> -            .map_err(|err| format_err!("could not open statefile for {}: {}", &job.id, err))?;
> -
> -        let mut status = compute_schedule_status(&last_state, Some(&job.schedule))?;
> +        let mut status = match JobState::load("prunejob", &job.id) {
> +            Ok(last_state) => compute_schedule_status(&last_state, Some(&job.schedule))?,
> +            Err(err) => {
> +                log::error!("could not open statefile for {}: {}", &job.id, err);

Since I'm currently preparing v2, would it make sense to instead make
this a warning? Not quite sure about it, but displaying an error to the
user and then just continuing (and having self-healing behavior) seems a
bit odd to me.

> +                JobScheduleStatus::default()
> +            }
> +        };
>          if job.disable {
>              status.next_run = None;
>          }
> diff --git a/src/api2/admin/sync.rs b/src/api2/admin/sync.rs
> index 6722ebea0..b0ff53ef7 100644
> --- a/src/api2/admin/sync.rs
> +++ b/src/api2/admin/sync.rs
> @@ -1,6 +1,6 @@
>  //! Datastore Synchronization Job Management

[snip]




  parent reply	other threads:[~2026-03-18 17:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17 16:07 [PATCH proxmox-backup v1 0/2] fix #7400: improve handling of " Michael Köppl
2026-03-17 16:07 ` [PATCH proxmox-backup v1 1/2] fix #7400: api: gracefully handle " Michael Köppl
2026-03-18 16:15   ` Christian Ebner
2026-03-18 17:04     ` Michael Köppl
2026-03-18 17:22   ` Michael Köppl [this message]
2026-03-17 16:07 ` [PATCH proxmox-backup v1 2/2] fix #7400: proxy: self-heal " Michael Köppl

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=DH62YLMHZA5R.3F70OLJ4871SJ@proxmox.com \
    --to=m.koeppl@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal