[pve-devel] [PATCH v2 guest-common/manager 0/4] vzdump: add 'notification-mode' parameter

Lukas Wagner l.wagner at proxmox.com
Tue Nov 21 13:13:08 CET 2023


On 11/21/23 11:55, Fiona Ebner wrote:
> Am 21.11.23 um 11:22 schrieb Lukas Wagner:
>> This patch series adds the 'notification-mode' setting for backup jobs.
>> It allows users to choose between the 'old-style' notifications
>> (mail to configured address, directly via a call to sendmail) or
>> the 'new-style' notification system.
>>
>> notification-mode has three possible values:
>>    - legacy-sendmail: Use old system, considering mailto/mailtnotification parameters
>>    - notification-system: Use the new system (always sending a notification, irregardless
>>      of success/failure. The user is supposed to configure filtering/matching in
>>      notification settings)
>>    - auto: use old system if mailto is set, or new system if not
>>
>> This should provide a fix/workaround for the users' reports of
>>    - double notifications (these happened in case mailto was set to the same address
>>      as root at pam)
> 
> Can't we detect and avoid this more easily?

There would be other ways to solve this, yes. I could also deduplicate
email-addresses in the backend - which isn't is as trivial as it sounds, 
since the 'legacy' mails are sent via separate, temporary target of
type 'sendmail' - so essentially I'd need to have 'cross-target' context
or something alike.

> 
>>    - notifications always being sent, even if 'mailnotification' is set to failure
> 
> Can't we just treat 'failure' mode as always defaulting to legacy
> sendmail? And properly deprecate the setting, showing a warning/info
> that new notification system is not used if set to 'failure' for both
> CLI and UI. And maybe not even allow setting it for new jobs/manual backups?

I think an explicit switch here is much more obvious and predictable to 
the user.

Personally I think we should wait a bit before deprecating/disallowing 
'mailto' for new backup jobs. This gives us time to polish the UX of
creating matchers etc. without 'forcing' the user into the new system.

-- 
- Lukas





More information about the pve-devel mailing list