mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-08-05 03:48:06 +00:00
verify: handle manifest update errors as non-fatal
Since commit 8ea00f6e
("allow to abort verify jobs") errors
propagated up to the verify jobs worker call side are interpreted as
job aborts.
The manifest update did not honor this, leading to the verify job
being aborted with the misleading log entry:
`verification failed - job aborted`
Instead, handle the manifest update error non-fatal just like any
other verification related error, log it including the error message
and continue verification with the next item.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
961c81bdeb
commit
5ba351bac7
@ -3,7 +3,7 @@ use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::time::Instant;
|
||||
|
||||
use anyhow::{bail, format_err, Error};
|
||||
use anyhow::{bail, Error};
|
||||
use nix::dir::Dir;
|
||||
use tracing::{error, info, warn};
|
||||
|
||||
@ -399,12 +399,20 @@ pub fn verify_backup_dir_with_lock(
|
||||
state: verify_result,
|
||||
upid,
|
||||
};
|
||||
let verify_state = serde_json::to_value(verify_state)?;
|
||||
backup_dir
|
||||
.update_manifest(|manifest| {
|
||||
|
||||
if let Err(err) = {
|
||||
let verify_state = serde_json::to_value(verify_state)?;
|
||||
backup_dir.update_manifest(|manifest| {
|
||||
manifest.unprotected["verify_state"] = verify_state;
|
||||
})
|
||||
.map_err(|err| format_err!("unable to update manifest blob - {}", err))?;
|
||||
} {
|
||||
info!(
|
||||
"verify {}:{} - manifest update error: {err}",
|
||||
verify_worker.datastore.name(),
|
||||
backup_dir.dir(),
|
||||
);
|
||||
return Ok(false);
|
||||
}
|
||||
|
||||
Ok(error_count == 0)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user