[pbs-devel] applied: [PATCH proxmox-backup] fix #4895: jobs: ignore task log not found error

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Sep 27 17:41:52 CEST 2023

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

What do you think?

More information about the pbs-devel mailing list