From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 2DE22715A5 for ; Thu, 8 Apr 2021 11:28:54 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1A8E0193D6 for ; Thu, 8 Apr 2021 11:28:24 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 7646E193CC for ; Thu, 8 Apr 2021 11:28:23 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 3766441F8D for ; Thu, 8 Apr 2021 11:28:23 +0200 (CEST) Message-ID: Date: Thu, 8 Apr 2021 11:28:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Thunderbird/88.0 Content-Language: en-US To: =?UTF-8?Q?Dominic_J=c3=a4ger?= , Proxmox VE development discussion References: <20210407083045.62463-1-d.jaeger@proxmox.com> <20210407083045.62463-2-d.jaeger@proxmox.com> <1f8805e2-27e2-57fb-b49c-cd7767d0c09f@proxmox.com> <20210408092101.GA8824@mala> From: Thomas Lamprecht In-Reply-To: <20210408092101.GA8824@mala> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL -0.043 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.001 Looks like a legit reply (A) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH manager 2/2] Close #1295: Make apt notifications configurable X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2021 09:28:54 -0000 On 08.04.21 11:21, Dominic J=C3=A4ger wrote: > On Wed, Apr 07, 2021 at 10:51:43AM +0200, Thomas Lamprecht wrote: >> On 07.04.21 10:30, Dominic J=C3=A4ger wrote: >>> -# We assume that users with subscriptions want informations >>> -# about new packages. >>> -my $notify =3D ($info && $info->{status} eq 'Active') ? 1 : 0; >>> +my $notify =3D $dccfg->{notify_updates} // 1; >> >> We may want to keep the default value the same, i.e.: >> >> my $notify =3D $dccfg->{notify_updates} // ($info && $info->{status} e= q 'Active'); >=20 > Is there a reason why we assume that users without subscription do not = want > such notifications? For a production-class setup a subscription is highly recommended, so we can assume that without such one it is a test/evaluation setup where we m= ay not want to get the mails... >=20 > As far as I see it, if we change it to >> $dccfg->{notify_updates} // 1 > Then (until they change something) > - users with active subscription should _continue_ to get notifications= > - enterprise repo configured but invalid subscription will continue to = _not_ > get mails (because pveupdate exits with error 100) this is not only for enterprise repo or? What if user disable the enterprise repo in test system. Just keep the default... >=20 > Then the only change is that users > - without/invalid subscription and > - with only no-subscription-repo configured > will now suddenly get mails, but this is actually good? >=20 > We could also append a line "You can deactivate these notifications in = the > Datacenter options" to the mail. >=20 >> >> (the following is actually meant for the pve-cluster patch): >> I'd really prefer using a colon for new config property entries, and I=20 can imagine >> that there will be more such switches in the future, so maybe start ou= t with a format >> sting (like migration is there) and have something like: >> >> 'notify: package-updates=3D1' >> >> what do you think? > Done :) So the mentioned >> $dccfg->{notify_updates} // 1 > is actually >> my $notify =3D $dccfg->{notify}->{package_updates} // 1; > already. >=20