Re: [PATCH proxmox-backup v3 22/23] daily-update: Refresh OAuth2 state for SMTP notification endpoints

Lukas Wagner
2026-04-21T08:07:19Z

Hi!

One quick note inline.

On Wed Apr 15, 2026 at 9:02 AM CEST, Arthur Bied-Charreton wrote:
> Refresh tokens may expire if unused for extended periods of time. Force
> refresh them in daily update to prevent this for idle endpoints.
>
> Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
> ---
> src/bin/proxmox-daily-update.rs | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/src/bin/proxmox-daily-update.rs b/src/bin/proxmox-daily-update.rs
> index c4d68e30..363f2901 100644
> --- a/src/bin/proxmox-daily-update.rs
> +++ b/src/bin/proxmox-daily-update.rs
> @@ -61,6 +61,15 @@ async fn do_update(rpcenv: &mut dyn RpcEnvironment) -> Result<(), Error> {
> log::error!("error checking certificates: {err}");
> }
>
> + match pbs_config::notifications::config() {
> + Ok(conf) => {
> + if let Err(e) = proxmox_notify::api::common::trigger_state_refresh(&conf) {
> + log::error!("Error refreshing notifications endpoints state: {e}");
> + }
> + }
> + Err(e) => log::error!("Error refreshing notifications endpoints state: {e}"),
> + }
> +

The call into proxmox_notify is sync and potentially blocking, so this
should be inside a `tokio::task::spawn_blocking`

> // TODO: cleanup tasks like in PVE?
>
> Ok(())