public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] api: notification: correctly enumerate known push-sync-jobs
@ 2025-12-15 13:27 Lukas Wagner
  2025-12-17  8:52 ` Christian Ebner
  2025-12-17 14:54 ` [pbs-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Lukas Wagner @ 2025-12-15 13:27 UTC (permalink / raw)
  To: pbs-devel

The second parameter of list_config_sync_jobs determines the direction
(either push, pull, or both) of jobs that should be returned. Using a
value of 'None' makes the implementation fall back to the default, which
is 'pull'. This led to only pull-style jobs being returned from the
'matcher-field-values' endpoint.

This issue likely existed since the introduction of push-style jobs.

Fixes: https://forum.proxmox.com/threads/170987
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
 src/api2/config/notifications/mod.rs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/api2/config/notifications/mod.rs b/src/api2/config/notifications/mod.rs
index f79fc78b7..40fe4dfaa 100644
--- a/src/api2/config/notifications/mod.rs
+++ b/src/api2/config/notifications/mod.rs
@@ -12,7 +12,7 @@ use crate::api2::admin::datastore::get_datastore_list;
 use pbs_api_types::PRIV_SYS_AUDIT;
 
 use crate::api2::admin::prune::list_prune_jobs;
-use crate::api2::admin::sync::list_config_sync_jobs;
+use crate::api2::admin::sync::{list_config_sync_jobs, ListSyncDirection};
 use crate::api2::admin::verify::list_verification_jobs;
 use crate::api2::config::media_pool::list_pools;
 use crate::api2::tape::backup::list_tape_backup_jobs;
@@ -156,7 +156,8 @@ pub fn get_values(
         });
     }
 
-    let sync_jobs = list_config_sync_jobs(None, None, param.clone(), rpcenv)?;
+    let sync_jobs =
+        list_config_sync_jobs(None, Some(ListSyncDirection::All), param.clone(), rpcenv)?;
     for job in sync_jobs {
         values.push(MatchableValue {
             field: "job-id".into(),
-- 
2.47.3



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


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

* Re: [pbs-devel] [PATCH proxmox-backup] api: notification: correctly enumerate known push-sync-jobs
  2025-12-15 13:27 [pbs-devel] [PATCH proxmox-backup] api: notification: correctly enumerate known push-sync-jobs Lukas Wagner
@ 2025-12-17  8:52 ` Christian Ebner
  2025-12-17 14:54 ` [pbs-devel] applied: " Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Ebner @ 2025-12-17  8:52 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Lukas Wagner

Same issue persists with push sync jobs not being taken into account 
when removing a datastore. That is however unrelated to the 
notifications, will send a dedicated patch for that.

Consider this patch:

Reviewed-by: Christian Ebner <c.ebner@proxmox.com>
Tested-by: Christian Ebner <c.ebner@proxmox.com>


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


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

* [pbs-devel] applied: [PATCH proxmox-backup] api: notification: correctly enumerate known push-sync-jobs
  2025-12-15 13:27 [pbs-devel] [PATCH proxmox-backup] api: notification: correctly enumerate known push-sync-jobs Lukas Wagner
  2025-12-17  8:52 ` Christian Ebner
@ 2025-12-17 14:54 ` Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2025-12-17 14:54 UTC (permalink / raw)
  To: pbs-devel, Lukas Wagner

On Mon, 15 Dec 2025 14:27:33 +0100, Lukas Wagner wrote:
> The second parameter of list_config_sync_jobs determines the direction
> (either push, pull, or both) of jobs that should be returned. Using a
> value of 'None' makes the implementation fall back to the default, which
> is 'pull'. This led to only pull-style jobs being returned from the
> 'matcher-field-values' endpoint.
> 
> This issue likely existed since the introduction of push-style jobs.
> 
> [...]

Applied, thanks!

[1/1] api: notification: correctly enumerate known push-sync-jobs
      commit: 5a20c534acbdbaf25aabdfb1aad5a24e07f11f65


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


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

end of thread, other threads:[~2025-12-17 14:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-15 13:27 [pbs-devel] [PATCH proxmox-backup] api: notification: correctly enumerate known push-sync-jobs Lukas Wagner
2025-12-17  8:52 ` Christian Ebner
2025-12-17 14:54 ` [pbs-devel] applied: " Thomas Lamprecht

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