]> git.proxmox.com Git - proxmox-backup.git/commit
notifications: allow sending notifications via proxmox_notify
authorLukas Wagner <l.wagner@proxmox.com>
Tue, 23 Apr 2024 11:51:55 +0000 (13:51 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 Apr 2024 21:14:46 +0000 (23:14 +0200)
commit57570bda1db51b7d729d40d1df25267f502ff30f
treeec8b2f02481c92833c8c4832f8a3c9c4ffbce9d6
parent2764be3db587eb2a93e74c8b04fa92bbd83712f9
notifications: allow sending notifications via proxmox_notify

  - Set the context in proxmox_notify
  - Add helper function which queues notifications to a spool
    directory
  - Set up a worker task, running in the privileged process, which
    periodically checks the spool directory for queued notifications

The queuing is needed because on PBS we send most if not all
notifications from the proxy-process running as the `backup` user.
However, to have access to the protected passwords/tokens for various
notification endpoints, we need to read the notification config as
root.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/bin/proxmox-backup-api.rs
src/bin/proxmox-backup-proxy.rs
src/server/notifications.rs