From patchwork Fri Jun 14 03:16:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hangbin Liu X-Patchwork-Id: 10994153 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66B7B76 for ; Fri, 14 Jun 2019 03:17:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A29527BA5 for ; Fri, 14 Jun 2019 03:17:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DA2727D4A; Fri, 14 Jun 2019 03:17:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from bastion.fedoraproject.org (bastion01.fedoraproject.org [209.132.181.2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EA9AF209CD for ; Fri, 14 Jun 2019 03:17:14 +0000 (UTC) Received: from mailman01.phx2.fedoraproject.org (mailman01.phx2.fedoraproject.org [10.5.126.36]) by bastion01.phx2.fedoraproject.org (Postfix) with ESMTP id 63C9B626B610; Fri, 14 Jun 2019 03:17:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 bastion01.phx2.fedoraproject.org 63C9B626B610 Received: from mailman01.phx2.fedoraproject.org (localhost [IPv6:::1]) by mailman01.phx2.fedoraproject.org (Postfix) with ESMTP id 60CF4580402A5; Fri, 14 Jun 2019 03:17:14 +0000 (UTC) Received: by mailman01.phx2.fedoraproject.org (Postfix, from userid 991) id 3F32F580402A5; Fri, 14 Jun 2019 03:17:12 +0000 (UTC) Received: from smtp-mm-osuosl01.fedoraproject.org (smtp-mm-osuosl01.vpn.fedoraproject.org [192.168.1.23]) by mailman01.phx2.fedoraproject.org (Postfix) with ESMTP id 391F058040287 for ; Fri, 14 Jun 2019 03:17:11 +0000 (UTC) Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by smtp-mm-osuosl01.fedoraproject.org (Postfix) with ESMTPS id 004F298059 for ; Fri, 14 Jun 2019 03:17:11 +0000 (UTC) Received: by mail-pf1-x42d.google.com with SMTP id x15so513946pfq.0 for ; Thu, 13 Jun 2019 20:17:10 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=zWyZ5npNu3UHxpEhKhjrXCO0AX4ofk9u96s0EtJ0dGo=; b=YoysPqPSjVYNocrR+ivFpb74hYmqjBqJz2Wlh7p2AwXusfiFpu74XvZiQG6cuPIYQP esz7A2VjUDYnsd9XHG1QzqE5C1mkvhgisji+cI8owN4TPZxQDR3c9Z5fVkjCjpY4ht+b Lmdqo3z10mBTiwZ6g3kHlCiAiPrjG9jdbU3V/ZnnlFN2qSasYMdtdFQOHQ80z+wECaiX 49Oxlu3cdJqc4YyztsGPZjmcSqGd9K9Ot94WwsUZPqD7IFbSpwcMY7D8ol97SM404s1+ EsbKD0+k0e7d+CpUHbn17sUT1dh54ViO0Qg0bz88lXZeRv4IIlA0jP+vacZdAZcqsJDy WpaA== X-Gm-Message-State: APjAAAWj3whzP2SPWKpbE6EI8QY9dhSp5FbYmN/hKE2q8V0Zn/VCayYS DKQ+1zXMuDX21FrHfQtxHtDDh7aoED9bew== X-Google-Smtp-Source: APXvYqwmp/jks10jPxdG+LbnmAmYpvz98AmbMsh5PBFsHzQnjHnEZzZfrlWxdClnN9+RUVTBh7MkyQ== X-Received: by 2002:a65:5004:: with SMTP id f4mr34467255pgo.268.1560482230065; Thu, 13 Jun 2019 20:17:10 -0700 (PDT) Received: from dhcp-12-139.nay.redhat.com ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id p15sm1019579pgj.61.2019.06.13.20.17.08 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 13 Jun 2019 20:17:09 -0700 (PDT) From: Hangbin Liu To: libteam@lists.fedorahosted.org Subject: [patch libteam] initscripts: need add the port before update config Date: Fri, 14 Jun 2019 11:16:59 +0800 Message-Id: <20190614031659.3313-1-liuhangbin@gmail.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Message-ID-Hash: UMZ2LR2P63KX6DTIASQKFTDNJX2Y3L5S X-Message-ID-Hash: UMZ2LR2P63KX6DTIASQKFTDNJX2Y3L5S X-MailFrom: liuhangbin@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Jiri Pirko , Hangbin Liu X-Mailman-Version: 3.1.1 Precedence: list List-Id: Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-Virus-Scanned: ClamAV using ClamSMTP After c8b356a3cd36 ("teamd: config: update local prio to kernel"), we update team port prio not only on local, but also on kernel side. So we need to add the port to team first before update TEAM_PORT_CONFIG. Or the teamd_config_port_update() would be failed because we could not find the port in teamd_get_port_by_ifname() during teamd_config_port_set(). Reported-by: LiLiang Fixes: c8b356a3cd36 ("teamd: config: update local prio to kernel") Signed-off-by: Hangbin Liu --- teamd/redhat/initscripts/network-scripts/ifup-TeamPort | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teamd/redhat/initscripts/network-scripts/ifup-TeamPort b/teamd/redhat/initscripts/network-scripts/ifup-TeamPort index 8c3cc3a..954b47a 100755 --- a/teamd/redhat/initscripts/network-scripts/ifup-TeamPort +++ b/teamd/redhat/initscripts/network-scripts/ifup-TeamPort @@ -51,8 +51,8 @@ if [ -n "${TEAM_MASTER}" ]; then exit 0 fi /sbin/ip link set dev ${DEVICE} down + /usr/bin/teamdctl ${TEAM_MASTER} port add ${DEVICE} || exit 1 if [ -n "${TEAM_PORT_CONFIG}" ]; then /usr/bin/teamdctl ${TEAM_MASTER} port config update ${DEVICE} "${TEAM_PORT_CONFIG}" || exit 1 fi - /usr/bin/teamdctl ${TEAM_MASTER} port add ${DEVICE} || exit 1 fi