[pbs-devel] [PATCH proxmox-backup 1/4] fix #4256: api2: remove prune jobs on datastore delete
Hannes Laimer
h.laimer at proxmox.com
Mon Dec 19 15:13:23 CET 2022
Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
---
src/api2/config/datastore.rs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/api2/config/datastore.rs b/src/api2/config/datastore.rs
index b6679f2f..27489590 100644
--- a/src/api2/config/datastore.rs
+++ b/src/api2/config/datastore.rs
@@ -18,7 +18,10 @@ use pbs_api_types::{
use pbs_config::BackupLockGuard;
use pbs_datastore::chunk_store::ChunkStore;
-use crate::api2::admin::{sync::list_sync_jobs, verify::list_verification_jobs};
+use crate::api2::admin::{
+ prune::list_prune_jobs, sync::list_sync_jobs, verify::list_verification_jobs,
+};
+use crate::api2::config::prune::delete_prune_job;
use crate::api2::config::sync::delete_sync_job;
use crate::api2::config::tape_backup_job::{delete_tape_backup_job, list_tape_backup_jobs};
use crate::api2::config::verify::delete_verification_job;
@@ -433,6 +436,9 @@ pub async fn delete_datastore(
for job in list_sync_jobs(Some(name.clone()), Value::Null, rpcenv)? {
delete_sync_job(job.config.id, None, rpcenv)?
}
+ for job in list_prune_jobs(Some(name.clone()), Value::Null, rpcenv)? {
+ delete_prune_job(job.config.id, None, rpcenv)?
+ }
let tape_jobs = list_tape_backup_jobs(Value::Null, rpcenv)?;
for job_config in tape_jobs
--
2.30.2
More information about the pbs-devel
mailing list