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 3479190CC7 for ; Mon, 5 Sep 2022 14:06:34 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 27E691CB12 for ; Mon, 5 Sep 2022 14:06:04 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (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 for ; Mon, 5 Sep 2022 14:06:03 +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 21E6644936 for ; Mon, 5 Sep 2022 14:06:03 +0200 (CEST) Message-ID: <0746f4b0-bec7-d8bd-54f4-fcaf6f7b01e0@proxmox.com> Date: Mon, 5 Sep 2022 14:06:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 To: pve-devel@lists.proxmox.com References: <20220905115840.176352-1-s.ivanov@proxmox.com> Content-Language: en-US From: Aaron Lauterer In-Reply-To: <20220905115840.176352-1-s.ivanov@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.843 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -1.716 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pve-devel] [RFC cluster] pmxcfs startup: order before MTAs 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: Mon, 05 Sep 2022 12:06:34 -0000 If the systemd ordering is okay, what about how we have with Ceph, where we place the "ceph-after-pve-cluster.conf" for each service instead of changing the pve-cluster.service? See my recent patch regarding this [0]. [0] https://lists.proxmox.com/pipermail/pve-devel/2022-July/053546.html On 9/5/22 13:58, Stoiko Ivanov wrote: > currently pmxcfs and the running mta (postfix in most cases I assume) > have no ordering between them - resulting in the mta starting before > pmxcfs. > > This can be problematic in case of a mail for 'root' being in the > mailq: postfix tries to deliver the mail - pvemailforward tries to > look up the destination address in /etc/pve/user.cfg and gets a > connection refused since pmxcfs is not running yet. > > reported via our community-forum: > https://forum.proxmox.com/threads/.108893/ > > Signed-off-by: Stoiko Ivanov > --- > sending as RFC, since while thinking about this issue and discussing it > off-list (thx @Fiona!) the following alternative approaches were/are > considered: > * letting pvemailforward.pl exit with an error-code - sadly does not work > as the only difference is that postfix generates a bounce for the mail > and in (the most-common) case of root being the sender that bounce is > also undeliverable, and thus dropped > * the fix through systemd-ordering does work for this case - but seems > not quite fitting (after all pmxcfs and postfix can happily exist w/o > the other - only delivering mail to root does not work) - also > the issue also happens if pmxcfs is not available for other reasons > * an alternative approach would be to retry fetching the information from > pmxcfs a few times (afair postfix' command-timeout is 1000s for this), > e.g. like we do in the installer when looking for the correct ISO. > > debian/pve-cluster.service | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/debian/pve-cluster.service b/debian/pve-cluster.service > index 4327055..fb706be 100644 > --- a/debian/pve-cluster.service > +++ b/debian/pve-cluster.service > @@ -5,6 +5,7 @@ Wants=corosync.service > Wants=rrdcached.service > Before=corosync.service > Before=cron.service > +Before=postfix.service exim4.service sendmail.service qmail.service > After=network.target > After=sys-fs-fuse-connections.mount > After=time-sync.target