From patchwork Wed Jun 26 21:25:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1123028 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="U6IE62hU"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45Yx0M5l9zz9s7h for ; Thu, 27 Jun 2019 07:25:54 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 7BC8BD7F; Wed, 26 Jun 2019 21:25:51 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 24FFFD73 for ; Wed, 26 Jun 2019 21:25:50 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D3B6082C for ; Wed, 26 Jun 2019 21:25:49 +0000 (UTC) Received: by mail-pl1-f181.google.com with SMTP id c14so48635plo.0 for ; Wed, 26 Jun 2019 14:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=oNKQneN3/juwLZKzeeQQrlja4PheVPoQQcIUPef4wKI=; b=U6IE62hUA68rfNYJsJ/6S65x50iyLNc4exGqYzVb6hx+BvrAOfKKyoId5Ex2qVp7XI 28cE33fu8Jc6T2yD+qxYQydoICScHCgCICgtgXR2GXP3JX4I9F0diAID4zmBdqNbMMSx hdtjjFe2BbDWhcKqkZzeN9UhTmtYiWEo3yYIKAkHtFOToVsiB65eK7GuhuxPzRALewcB WXd16bdeXP6F3AptAwZgifsEJlMNVkgWFDsKWe8KNXZkeCB8uuteHhhxqiGinH8/gpKq x1iyNSImPLOlCMpkofYCHqj4MU02BxW1SmVHncthY4csSY+iEI3U7fkAm3qVH88/Qe8F oaZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=oNKQneN3/juwLZKzeeQQrlja4PheVPoQQcIUPef4wKI=; b=Vfr0/WxdCxXGyTrgtsdPW2qOwhqRvaM/eDIgtQGplqeZM/33kZs/MZ2vHjcDExhJi6 rARcDJICrxRS+sdo0khgL1J5w5jT5Q3Pr4xYwC1P2Aui4opiSMBx9sa9iqpY+G5tOuau mXM3Vhusn/KsT1/K/2Ia4ZJvB8FUl9Ik6rSnw6/sEFCbD7nRsU3Ldszo1d5ojSqzjLZB bT/ACn8zxCD3IhjSjszKHG/pvEHfAZmc6kV7DQVYpgItXh2f4b+YoyuoMzcHl0LoJoqp BQ33UMGe4KBaQgVPGmEquawy+AKsh37JNGbo3GW0bidiOunrdV6TbmXWezJNpwCWzwMa n8IA== X-Gm-Message-State: APjAAAUoZPrp3ePq02SHefHwqHGFce1bx1noPDra8wraQX6U11Vup3MY NQlTeoRhOMyDvCB1OpfzgMMhjq/2 X-Google-Smtp-Source: APXvYqwcx8xXG7rO3k4dZ46QdMCml3UkBymNI+6c1v+4ErzeE7rDi9V+dcZhbJOgj9C8tktRv5xu2g== X-Received: by 2002:a17:902:be12:: with SMTP id r18mr195225pls.341.1561584348968; Wed, 26 Jun 2019 14:25:48 -0700 (PDT) Received: from gizo.domain (97-115-113-19.ptld.qwest.net. [97.115.113.19]) by smtp.gmail.com with ESMTPSA id b1sm175251pfi.91.2019.06.26.14.25.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Jun 2019 14:25:48 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Wed, 26 Jun 2019 14:25:45 -0700 Message-Id: <1561584345-671-1-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: guru@ovn.org Subject: [ovs-dev] [PATCH] ovs-ctl: Remove rtnetlink geneve and vxlan interfaces X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Bug 2128511 is a result of a conflict that arises when upgrading on RHEL 7.x systems when the built-in geneve and vxlan kernel modules were in use before the upgrade but then the newer compat geneve and vxlan interfaces embedded in the openvswitch kernel module are used after the upgrade. This patch fixes the problem by deleting the rtnetlink based geneve and vxlan interfaces before executing the kernel module reload. VMware-BZ: 2128511 Signed-off-by: Greg Rose --- utilities/ovs-lib.in | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in index fa840ec..dbb6179 100644 --- a/utilities/ovs-lib.in +++ b/utilities/ovs-lib.in @@ -632,6 +632,20 @@ force_reload_kmod () { action "Removing datapath: $dp" ovs-dpctl del-dp "$dp" done + # Older releases may be using the rtnetlink interface while a + # newer release will want to use the internal compat interface + # for geneve and vxlan. Execute these blind - if they exist + # as rtnetlink type interfaces then they'll be removed, if not + # then the error is ignored and no harm is done. + action "ip link del link genev_sys_6081 dev genev_sys_6081" + action "ip link del link vxlan_sys_4789 dev vxlan_sys_4789" + + action "ovs-appctl dpctl/flush-conntrack" + + for vport in `awk '/^vport_/ { print $1 }' /proc/modules`; do + action "Removing $vport module" rmmod $vport + done + if test -e /sys/module/ip_gre; then action "Forcing removal of ip_gre module" rmmod ip_gre fi