tape: set media status if we detect damaged medium at start of backup
This commit is contained in:
parent
0023cfa385
commit
25350f3370
|
@ -126,6 +126,9 @@ impl MediaPool {
|
|||
self.encrypt_fingerprint.clone()
|
||||
}
|
||||
|
||||
pub fn set_media_status_damaged(&mut self, uuid: &Uuid) -> Result<(), Error> {
|
||||
self.inventory.set_media_status_damaged(uuid)
|
||||
}
|
||||
|
||||
fn compute_media_state(&self, media_id: &MediaId) -> (MediaStatus, MediaLocation) {
|
||||
|
||||
|
|
|
@ -225,6 +225,7 @@ impl PoolWriter {
|
|||
if !alert_flags.is_empty() {
|
||||
worker.log(format!("TapeAlertFlags: {:?}", alert_flags));
|
||||
if tape_alert_flags_critical(alert_flags) {
|
||||
self.pool.set_media_status_damaged(&media_uuid)?;
|
||||
bail!("aborting due to critical tape alert flags: {:?}", alert_flags);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue