From patchwork Tue Jun 25 18:45:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1122208 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="HziPiDTV"; 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 45YFVN4mW6z9s4Y for ; Wed, 26 Jun 2019 04:46:03 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 2B72BDDC; Tue, 25 Jun 2019 18:46:00 +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 9A450CB7 for ; Tue, 25 Jun 2019 18:45:58 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id A09DC710 for ; Tue, 25 Jun 2019 18:45:57 +0000 (UTC) Received: by mail-pf1-f177.google.com with SMTP id r7so9944994pfl.3 for ; Tue, 25 Jun 2019 11:45:57 -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=rm70dxShgGBA+VQ3hWRJhjaGcCQdzYCcToKMVqTbMOY=; b=HziPiDTV5UNryrc97KZtnoqi3N9x1Qosg+vYwIxdqUiKF+WL3e6K3/xMbzwBjpm1Fl b89p+nkifKC9XBs1U/gnhnndzd/jutm/VfRmD13JnEAwgKAWgMX8zPwEyL3rtqCooykH 7p2Y1gz6oppuH4dAQc8RvB7ViuyKWQ/hkC+HXwlPCqTI3L5P2Y0sK3IKw17Mn20BRHA/ CMW3cxIUja3HTqwV706jU8nt2EJptK9wsOnsVoEADZigsPigCsiiws6OSx0JVOP3qqgW Eg579eGiQ/4Ukd09fVOSVg3mT7ae0D2rdKji/2+m7+AqpKW9GU/ni4ja6/OQbEF74/fX jJMA== 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=rm70dxShgGBA+VQ3hWRJhjaGcCQdzYCcToKMVqTbMOY=; b=VTmIs/hFB+GAe73OkkKxXrehDuaVEam/zPtbBUOpp5aXyubYsqloCRMQ8aMpYOFi5n glyx7ecWcBz1eomY1l8HxoymEjOdI5I44bSKEtFODM8arABuIZK0AvALTEFzLHJLT3yx z4bWYW8SNcQfs2mkMZLRRODZcH0IS3dWpiFJ3VEY+eWqmpWGmrUugxD9kLItKvRX/rGj rVjk7jVHgCanoB34L3uF9y2dP2Ij0327xpPAptMIPnrMbl1JxukWQLYU6O6uerYNf+Nz 84gP4kaVRtJnqs62xjvO+a5PX8BZt99uGfgPJkJS92SwcdMlxJp6tcaZ6vVI8Qv76kHX L7zQ== X-Gm-Message-State: APjAAAVdcpXey4YXS9a3zpOtnF+cBiyTBIm4cbDHbtQfz7zRpMozsEgS /ot/iyQhRIUIHGnHK/SyrMKASrrp X-Google-Smtp-Source: APXvYqygakr/v+2rnKARHt1BPUWsCPIIWpg5P8ayF6P9bAPFfrbiP1lKKpRsn9sdx4pCtggWtKxy6Q== X-Received: by 2002:a17:90a:80c4:: with SMTP id k4mr350885pjw.74.1561488356686; Tue, 25 Jun 2019 11:45:56 -0700 (PDT) Received: from gizo.domain (97-115-113-19.ptld.qwest.net. [97.115.113.19]) by smtp.gmail.com with ESMTPSA id x3sm4267517pja.4.2019.06.25.11.45.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jun 2019 11:45:55 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Tue, 25 Jun 2019 11:45:52 -0700 Message-Id: <1561488352-13391-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: Flavio Leitner Subject: [ovs-dev] [PATCH] rhel: Fix upgrade path 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 There is a bug in the upgrade path from the old kmod-openvswitch SysV based RPM to the new openvswitch-kmod systemd based RPM. Since the name of the package is changed it is not possible to use the yum or rpm upgrade options. This prevents passing in a 1 or 2 to the %postun scriptlet section of the older RPM and that causes the section to be treated as an 'erase'. The old kmod-openvswitch %postun section proceeds to erase the symlinks in ../weak-updates/openvwswitch that the installation of the new package had just created. Fix this by adding a %posttrans tag to the systemd spec file. This scriptlet is called after the symlinks have just been erased and it calls the ovs-kmod-manage.sh script to recreate the symlinks and run depmod -a again so that the correct kernel modules will be found and loaded. VMware-BZ: #236987 Cc: Aaron Conole Cc: Flavio Leitner Signed-off-by: Greg Rose Acked-by: Aaron Conole --- rhel/openvswitch-kmod-fedora.spec.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in index 92d763f..a50016d 100644 --- a/rhel/openvswitch-kmod-fedora.spec.in +++ b/rhel/openvswitch-kmod-fedora.spec.in @@ -120,6 +120,15 @@ done fi /sbin/depmod -a +%posttrans +# The upgrade path from the older kmod-openvswitch SysV package to +# the newer openvswitch-kmod systemd package will end up removing +# the symlinks to the weak-updates/openvswitch drivers because of +# it's %postun section. We add this section to handle that case. +if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then + %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh +fi + %files %defattr(0644,root,root) /lib/modules/*/extra/openvswitch/*.ko