From patchwork Tue Apr 23 12:44:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1926543 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=D0Nj4Gax; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VP1zC3l25z1yZP for ; Tue, 23 Apr 2024 22:44:38 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 16527402C0; Tue, 23 Apr 2024 12:44:36 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id t-K-avK-dpO3; Tue, 23 Apr 2024 12:44:35 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org CDCB74014B Authentication-Results: smtp4.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=D0Nj4Gax Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id CDCB74014B; Tue, 23 Apr 2024 12:44:34 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 86683C0077; Tue, 23 Apr 2024 12:44:34 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1966FC0037 for ; Tue, 23 Apr 2024 12:44:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id E71B1402F6 for ; Tue, 23 Apr 2024 12:44:32 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id qQpFSqjybruX for ; Tue, 23 Apr 2024 12:44:32 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=xsimonar@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 31F154013C Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 31F154013C Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=D0Nj4Gax Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 31F154013C for ; Tue, 23 Apr 2024 12:44:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713876270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ydHFEe1+DzeG3MPQoBO05kKhHhQRAtY6S+Z3Pka4Jvg=; b=D0Nj4GaxDs/wbK3rWnNz/ZTycD90uGwnemialksdZ3VLfhS+yih07cQodkl3Gz1JgZmTqd cJFovcS6+EfLjFeJvl2RPhK+DK8RtbAyJgOUmlSm/doAI/qTW2vdwssMhcwoh5BzRMaDwN R8AyB1JGkGH6EqZ0FA0nlCR1oieiy14= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-107-35PRiu3QPRyFb1FmAWbZug-1; Tue, 23 Apr 2024 08:44:26 -0400 X-MC-Unique: 35PRiu3QPRyFb1FmAWbZug-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A77A680B935 for ; Tue, 23 Apr 2024 12:44:26 +0000 (UTC) Received: from wsfd-netdev90.ntdv.lab.eng.bos.redhat.com (wsfd-netdev90.anl.eng.rdu2.dc.redhat.com [10.6.38.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9D64F3543A; Tue, 23 Apr 2024 12:44:26 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Tue, 23 Apr 2024 14:44:26 +0200 Message-Id: <20240423124426.307018-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn] northd, ic: Fix handling of ovn-appctl resume. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" After ovn-appctl resume was issued for northd or ovn-ic, there was no guarantee that northd or ovn-ic were waking up, potentially handling changes received while they were paused.. Usually, poll_block would be woken up by POLLHUP, but race conditions could cause this not to happen. ovn-controller is already properly handling the resume. This caused the following tests to fail sporadically: - ovn-ic -- sync ISB status to INB - propagate Port_Binding.up to NB and OVS. Signed-off-by: Xavier Simonart Acked-by: Ales Musil --- ic/ovn-ic.c | 2 +- northd/ovn-northd.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ic/ovn-ic.c b/ic/ovn-ic.c index e947323bf..be23f199d 100644 --- a/ic/ovn-ic.c +++ b/ic/ovn-ic.c @@ -2409,7 +2409,7 @@ ovn_ic_resume(struct unixctl_conn *conn, int argc OVS_UNUSED, { struct ic_state *state = state_; state->paused = false; - + poll_immediate_wake(); unixctl_command_reply(conn, NULL); } diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c index 3a5544b0c..d71114f35 100644 --- a/northd/ovn-northd.c +++ b/northd/ovn-northd.c @@ -1107,6 +1107,7 @@ ovn_northd_resume(struct unixctl_conn *conn, int argc OVS_UNUSED, { struct northd_state *state = state_; state->paused = false; + poll_immediate_wake(); unixctl_command_reply(conn, NULL); }