all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Laimer <h.laimer@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 1/4] fix #4256: api2: remove prune jobs on datastore delete
Date: Mon, 19 Dec 2022 15:13:23 +0100	[thread overview]
Message-ID: <20221219141326.201199-2-h.laimer@proxmox.com> (raw)
In-Reply-To: <20221219141326.201199-1-h.laimer@proxmox.com>

Signed-off-by: Hannes Laimer <h.laimer@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





  reply	other threads:[~2022-12-19 14:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19 14:13 [pbs-devel] [PATCH proxmox-backup 0/4] fix #4256: remove datastore from configs after deletion Hannes Laimer
2022-12-19 14:13 ` Hannes Laimer [this message]
2022-12-19 14:13 ` [pbs-devel] [PATCH proxmox-backup 2/4] pbs-config: add delete_node for ACL-tree Hannes Laimer
2022-12-19 14:13 ` [pbs-devel] [PATCH proxmox-backup 3/4] fix #4256: api2: remove datastore ACL-node on removal of datastore Hannes Laimer
2022-12-19 14:13 ` [pbs-devel] [PATCH proxmox-backup 4/4] ui: add 'keep configs' checkbox to datastore removal window Hannes Laimer
2022-12-20  9:37   ` Wolfgang Bumiller
2022-12-20  9:36 ` [pbs-devel] partially-applied: [PATCH proxmox-backup 0/4] fix #4256: remove datastore from configs after deletion Wolfgang Bumiller

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=20221219141326.201199-2-h.laimer@proxmox.com \
    --to=h.laimer@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal