From patchwork Tue Jul 6 22:37:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1501473 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GKHVy4kXXz9sWq for ; Wed, 7 Jul 2021 08:37:28 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id ACDB0608A2; Tue, 6 Jul 2021 22:37:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M1GzHb9l0H8L; Tue, 6 Jul 2021 22:37:24 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id EE4C6605BB; Tue, 6 Jul 2021 22:37:23 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C1BB8C001A; Tue, 6 Jul 2021 22:37:23 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7E48CC000E for ; Tue, 6 Jul 2021 22:37:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 60CB482F9E for ; Tue, 6 Jul 2021 22:37:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KaLGzzCmmNNg for ; Tue, 6 Jul 2021 22:37:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by smtp1.osuosl.org (Postfix) with ESMTPS id 3998C82F4F for ; Tue, 6 Jul 2021 22:37:20 +0000 (UTC) Received: (Authenticated sender: blp@ovn.org) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 9E3A51BF203; Tue, 6 Jul 2021 22:37:17 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Tue, 6 Jul 2021 15:37:09 -0700 Message-Id: <20210706223709.2926478-1-blp@ovn.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Cc: Ben Pfaff Subject: [ovs-dev] [PATCH] bridge: Use correct (legacy) role names in database. 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" The vswitchd database schema requires role names to be "master" or "slave", but this code tried to use "primary" and "secondary". Signed-off-by: Ben Pfaff Reported-at: https://github.com/openvswitch/ovs-issues/issues/218 Fixes: 807152a4ddfb ("Use primary/secondary, not master/slave, as names for OpenFlow roles.") --- vswitchd/bridge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 0432d2abf0af..cb7c5cb769da 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -3019,9 +3019,9 @@ ofp12_controller_role_to_str(enum ofp12_controller_role role) case OFPCR12_ROLE_EQUAL: return "other"; case OFPCR12_ROLE_PRIMARY: - return "primary"; + return "master"; case OFPCR12_ROLE_SECONDARY: - return "secondary"; + return "slave"; case OFPCR12_ROLE_NOCHANGE: default: return NULL;