public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-backup 0/2] schedule prunes even with keep-all
@ 2026-06-08  8:59 Christian Ebner
  2026-06-08  8:59 ` [PATCH proxmox-backup 1/2] proxy: scheduler: drop early return for keep-all prune jobs Christian Ebner
  2026-06-08  8:59 ` [PATCH proxmox-backup 2/2] prune job: escalate keep-all from info to warning Christian Ebner
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Ebner @ 2026-06-08  8:59 UTC (permalink / raw)
  To: pbs-devel

Currently prune jobs without keep options will keep all snapshots, but
they are actually never scheduled. This caused a report in the
enterprise support about an unexpectedly `pending` job state, manual
execution of the job running just fine.

Drop the early check for no keep options being set and actually run
the task on schedule, as this might also be used for testing only.
Further, escalate the info message for keep-all in case of no prune
options being set to a warning, so users can more easily identify
such jobs, but without breaking current behaviour with respect to
notifications.

Christian Ebner (2):
  proxy: scheduler: drop early return for keep-all prune jobs
  prune job: escalate keep-all from info to warning

 src/bin/proxmox-backup-proxy.rs | 4 ----
 src/server/prune_job.rs         | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

-- 
2.47.3





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH proxmox-backup 1/2] proxy: scheduler: drop early return for keep-all prune jobs
  2026-06-08  8:59 [PATCH proxmox-backup 0/2] schedule prunes even with keep-all Christian Ebner
@ 2026-06-08  8:59 ` Christian Ebner
  2026-06-08  8:59 ` [PATCH proxmox-backup 2/2] prune job: escalate keep-all from info to warning Christian Ebner
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Ebner @ 2026-06-08  8:59 UTC (permalink / raw)
  To: pbs-devel

It is currently possible to configure a prune job without any
keep options set, which will result in keeping all snapshots.

The proxy does an early check for this, not even recalculating the
schedule in that case and never creating any task. This caused some
confusion as reported in the enterprise support, as the prune job
reports pending state and is never executed if not triggered
manually.

Since it can make sense to create a scheduled job with keep-all for
testing reasons, drop the early check so the configured schedule is
honored, the task log containing the relevant info for the user on
why no snapshots are being pruned.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 src/bin/proxmox-backup-proxy.rs | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/bin/proxmox-backup-proxy.rs b/src/bin/proxmox-backup-proxy.rs
index b372f779e..eb5443992 100644
--- a/src/bin/proxmox-backup-proxy.rs
+++ b/src/bin/proxmox-backup-proxy.rs
@@ -642,10 +642,6 @@ async fn schedule_datastore_prune_jobs() {
             continue;
         }
 
-        if !job_config.options.keeps_something() {
-            continue; // no 'keep' values set, keep all
-        }
-
         let worker_type = "prunejob";
         let auth_id = Authid::root_auth_id().clone();
         if check_schedule(worker_type, &job_config.schedule, &job_id) {
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH proxmox-backup 2/2] prune job: escalate keep-all from info to warning
  2026-06-08  8:59 [PATCH proxmox-backup 0/2] schedule prunes even with keep-all Christian Ebner
  2026-06-08  8:59 ` [PATCH proxmox-backup 1/2] proxy: scheduler: drop early return for keep-all prune jobs Christian Ebner
@ 2026-06-08  8:59 ` Christian Ebner
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Ebner @ 2026-06-08  8:59 UTC (permalink / raw)
  To: pbs-devel

While it can make sense to create a prune job without keep options
for testing a schedule, such a scheduled prune task which does
prune nothing should be considered a misconfiguration for normal
operation. As promoting to an error would also trigger notifications
and more dramatically flag the job in the task list, promote to a
warning only. By this it can be easily noticed even without breaking
current error notification behaviour.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 src/server/prune_job.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/server/prune_job.rs b/src/server/prune_job.rs
index 03661127e..afb76c4f8 100644
--- a/src/server/prune_job.rs
+++ b/src/server/prune_job.rs
@@ -38,7 +38,7 @@ pub fn prune_datastore(
     let keep_all = !prune_options.keeps_something();
 
     if keep_all {
-        info!("No prune selection - keeping all files.");
+        warn!("No prune selection - keeping all files.");
     } else {
         let rendered_options = cli_prune_options_string(&prune_options);
         info!("retention options: {rendered_options}");
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-08  9:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-08  8:59 [PATCH proxmox-backup 0/2] schedule prunes even with keep-all Christian Ebner
2026-06-08  8:59 ` [PATCH proxmox-backup 1/2] proxy: scheduler: drop early return for keep-all prune jobs Christian Ebner
2026-06-08  8:59 ` [PATCH proxmox-backup 2/2] prune job: escalate keep-all from info to warning Christian Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal