From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <f.gruenbichler@proxmox.com>
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 7F8F960E2A
 for <pve-devel@lists.proxmox.com>; Fri, 25 Sep 2020 15:37:22 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 6FE581BEDE
 for <pve-devel@lists.proxmox.com>; Fri, 25 Sep 2020 15:36:52 +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 478401BED2
 for <pve-devel@lists.proxmox.com>; Fri, 25 Sep 2020 15:36:51 +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 0F47F45643
 for <pve-devel@lists.proxmox.com>; Fri, 25 Sep 2020 15:36:51 +0200 (CEST)
Date: Fri, 25 Sep 2020 15:36:47 +0200 (CEST)
From: =?UTF-8?Q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
 Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Message-ID: <954846404.464.1601041007631@webmail.proxmox.com>
In-Reply-To: <de0ed979-6d8b-0574-2cf8-6efbbade19e1@proxmox.com>
References: <20200925125349.2331629-1-f.gruenbichler@proxmox.com>
 <de0ed979-6d8b-0574-2cf8-6efbbade19e1@proxmox.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
Importance: Normal
X-Mailer: Open-Xchange Mailer v7.10.3-Rev22
X-Originating-Client: open-xchange-appsuite
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.036 Adjusted score from AWL reputation of From: address
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 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] applied: [PATCH cluster] pmxcfs sync: properly
 check for corosync error
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Fri, 25 Sep 2020 13:37:22 -0000


> Thomas Lamprecht <t.lamprecht@proxmox.com> hat am 25.09.2020 15:23 geschr=
ieben:
>=20
> =20
> On 25.09.20 14:53, Fabian Gr=C3=BCnbichler wrote:
> > dfsm_send_state_message_full always returns !=3D 0, since it returns
> > cs_error_t which starts with CS_OK at 1, with values >1 representing
> > errors.
> >=20
> > Signed-off-by: Fabian Gr=C3=BCnbichler <f.gruenbichler@proxmox.com>
> > ---
> > unfortunately not that cause of Alexandre's shutdown/restart issue, but
> > might have caused some hangs as well since we would be stuck in
> > START_SYNC in that case..
> >=20
> >  data/src/dfsm.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >=20
> >
>=20
> applied, thanks! But as the old wrong code showed up as critical error
> "failed to send SYNC_START message" if it worked, it either (almost) neve=
r
> works here or is not a probable case, else we'd saw this earlier.
>=20
> (still a valid and appreciated fix, just noting)

no, the old wrong code never triggered the error handling (log + leave), no=
 matter whether the send worked or failed - the return value cannot be 0, s=
o the condition is never true. if the send failed, the code assumed the sta=
te machine is now in START_SYNC mode and waits for STATE messages, which wi=
ll never come since the other nodes haven't switched to START_SYNC..

it would still show up in the logs since cpg_mcast_joined failure is always=
 verbose in the logs, but it would not be obvious that it caused the state =
machine to take a wrong turn I think.