From patchwork Thu Oct 29 23:00:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saurabh Mohan X-Patchwork-Id: 538061 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (li376-54.members.linode.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id F09D31412D8 for ; Fri, 30 Oct 2015 10:01:22 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 2A97110617; Thu, 29 Oct 2015 16:01:21 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 7A7E610611 for ; Thu, 29 Oct 2015 16:01:20 -0700 (PDT) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id CA6811E0360 for ; Thu, 29 Oct 2015 17:01:19 -0600 (MDT) X-ASG-Debug-ID: 1446159678-09eadd4c935a9ee0001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar5.cudamail.com with ESMTP id HgSM4L9MKrMVEPzI (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 29 Oct 2015 17:01:18 -0600 (MDT) X-Barracuda-Envelope-From: saurabh@cplanenetworks.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO na01-bl2-obe.outbound.protection.outlook.com) (65.55.169.119) by mx1-pf2.cudamail.com with ESMTPS (AES256-SHA encrypted); 29 Oct 2015 23:01:18 -0000 Received-SPF: unknown (mx1-pf2.cudamail.com: Multiple SPF records returned) X-Barracuda-Apparent-Source-IP: 65.55.169.119 X-Barracuda-RBL-IP: 65.55.169.119 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=saurabh@cplanenetworks.com; Received: from localhost.localdomain (67.161.25.15) by BY2PR08MB522.namprd08.prod.outlook.com (10.141.144.16) with Microsoft SMTP Server (TLS) id 15.1.306.13; Thu, 29 Oct 2015 23:01:13 +0000 X-CudaMail-Envelope-Sender: saurabh@cplanenetworks.com From: Saurabh Mohan To: X-CudaMail-MID: CM-E2-1028110895 X-CudaMail-DTE: 102915 X-CudaMail-Originating-IP: 65.55.169.119 Date: Thu, 29 Oct 2015 16:00:30 -0700 X-ASG-Orig-Subj: [##CM-E2-1028110895##][PATCH ] debian: Fix bringup seq for OVSPort type of vlan. Message-ID: <1446159630-9281-1-git-send-email-saurabh@cplanenetworks.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [67.161.25.15] X-ClientProxiedBy: BY1PR10CA0023.namprd10.prod.outlook.com (25.160.197.33) To BY2PR08MB522.namprd08.prod.outlook.com (10.141.144.16) X-Microsoft-Exchange-Diagnostics: 1; BY2PR08MB522; 2:xqqqNZVcrJil0ThJLjwtY+oeRcbxLpfU80ttS0G79dARft/xGqP4tejDmM3aO6Yw0lY2tSl6TZ9rEdAhf6UK71aXrfP09Mvl/rPw4P3xi4gG2MqH0qBWHmpzO0vOuyyqV4kHEg7lmMb798AOTtxH2BLVD+67wbBjSiJqb9ikRL4=; 3:Wyq3OBZENYl9vZciUfoKkHcJqbrn9To16KizWUPYdj58iSqgXXph5M3tmIBfpTLRxqeF+AAfpeovSZrk8BfqVsZ64Da0bYf96hoqizhiYUZUGgRpMSg9Bp3x4NmanAgOrAG4X1/h39pwUSlWwtwnGA==; 25:7sGEj54o8R8VC+65WsOsufeLZbXqhYtWzXf0iWlbPmV+H+U9OjDcMeAywwR4MRg8Cs7URyJGX27Oh5UokeQx42exvffDwuaXNmRpXjBBd8YScCsBFqfng1L72JBytQ/9IhXowoYAK7rvp+03g42M0GrMI1vxhZpZ/GcJlIwNIkOOo0OQZelszwcPbok5d2FIjf0k1Rhk/hJPktebvrUbMeT1v7tjMt/Q07DT7wTSrYO5LOamGgg5gUP6iI3XeKaR X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR08MB522; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001)(10201501046)(102215026); SRVR:BY2PR08MB522; BCL:0; PCL:0; RULEID:; SRVR:BY2PR08MB522; X-Microsoft-Exchange-Diagnostics: 1; BY2PR08MB522; 4:0Vz9CSATKux7GGVhG2rx9Za+u8fNdIQrGmM4f/QWLEirLLHBAZMvUY/cFSxX9TkFZwvLwnvaW2poJKONRlwKg24tUr41chMJVQhWnsTNxwMmOXG+NdCPvYmt40ChnqP7eO91A/zqy4iJzrYtcPfTc8XeFqwQ2ZpLJTDA2r00HdyWsYgM8oPgHVCwkXIXCBz4SG1kmhmIr8HY3zg8lOtPHO4A0QxShBq69CfP0k8Z1QD2VJTT279b9zuIZnJEwcyPxkN9Zibq60j2OeDd7keZ4wMgksrVP6IvrglDTMVx1N68r3opH7ccDL5ozoeCC6zKT0b1Kqfq8rnzNBNukuhVaW8nKLZVO2nlooOoEfYjurBAskpADuoXDdx2XSBdriv+VKkG22kiBXYkPLwKJ3H0gw== X-Forefront-PRVS: 0744CFB5E8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(6009001)(189002)(199003)(5003940100001)(189998001)(105586002)(101416001)(50466002)(47776003)(2351001)(50986999)(110136002)(48376002)(81156007)(97736004)(5001960100002)(106356001)(36756003)(229853001)(87976001)(19580405001)(4001430100002)(19580395003)(86362001)(92566002)(33646002)(107886002)(5008740100001)(66066001)(122386002)(42186005)(450100001)(5004730100002)(77096005)(5007970100001)(40100003)(50226001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR08MB522; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cplanenetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR08MB522; 23:Z2HBi3sRNiZwY42+L4gTRqAiiuADNhfDPRRWHole6x?= =?us-ascii?Q?RIJavoiRuQrRly3SHBATo99EPbvkzeTpX2AurygkMNJDJKOh/8fXGSx+ES7z?= =?us-ascii?Q?5aSpRDrlmdxC0Kk2RHJYIIqYTLs9Nq4PUSE3li5qYjyn8t9MLYzZOmL9UTZY?= =?us-ascii?Q?yuZmCEWs43EpO4LM8czk2bqPbDyrVFfcEVAKgJB2XMpHCTfV9XHvoVUjLSVJ?= =?us-ascii?Q?o0aEfl+R+EikoItGrNo3NgYOQ8Kd7P+q7fr+lyKklTC1DoIPhNHOCTxr76MI?= =?us-ascii?Q?/IebnS3Kt+M2wz2chtp2czfWYe5MpJSlDDz7cnC0jKrX8YRosAeImaARLMo5?= =?us-ascii?Q?NVjVpaypoKrWOk0Q6bMycAJDYPgWqiOlUrv5u1lf9RrAlSDM9lELA64uEhzR?= =?us-ascii?Q?fG4P02WsYKCZ/NGOs3ypd7jxpO3cUsOu5DYMAxlwbuN5xUd0wh3tsWly6Kw2?= =?us-ascii?Q?fBThdaY18sEtt+e41Vom/L5HSOFd0gALun6WQViAqPmcCKe9W/gnIIw8w1Od?= =?us-ascii?Q?kSlVL488idbVG1ZrCXG127sZrb8+chsPgX1G1+ErsBn3M3EO0n/KwbRGs8Gs?= =?us-ascii?Q?TCGPVUMff+4VMI+lqsuB2cLJHkMr7/Nr0UpROwN2LW8b270M3VLaMN+Nic/y?= =?us-ascii?Q?2rXN6Kbp1oxnp82pY+OYOKv3wcskBUCq6r94SSS+dqvZUPci26iaVSFx3drX?= =?us-ascii?Q?sF5f2FxL6UWUgQFWZbalSXKhruN9Lsac+of0OPF8OhqVfnoJ+JmbC/d0UT1e?= =?us-ascii?Q?sGcTZeqSbrnxeJQnEGfC6mfEFF8SZ3pHzv0Rdmi4JaH39V/XbZnlhLhmpaAh?= =?us-ascii?Q?zDuWWUQH9wgD0nzGoyRdF66WqWHOxAlJ9hQdLQVomuxku5+OsQJa6GmUOQjA?= =?us-ascii?Q?jHSxZ92x+3w5CQpNpKfy6vQCEGHFUuMzBTyRudlHPpu07nabEtrz8A78dux+?= =?us-ascii?Q?L9yPVPE6E0wktO/bUGOISE2qTosmDlxoP1JOK07T+7rKdgqTH3/J3ox0tHzp?= =?us-ascii?Q?AjJmpYYNZesU/N+sLr0HAZtE8JpmviPcvinesP2PAlC14Q+S0QxcThxq4nsF?= =?us-ascii?Q?M6oFY=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR08MB522; 5:N7AsV0gyDFm7epLbeZ25z2J75KLvsrb1uW2fLdXmwKm8w9W2F1K+8QX+mgJiVo0PqwVAjEdSlFlO9vqXedaTELW6uq2xgRMx8o7EwqQJTxPXhCqurA9kAznIvadWnO2NB8YvtTp/B4Omcqp8COFfcQ==; 24:Zu8ZJuU7jqFxL1Nrz5p4T5rKIi4rMKhlLke/tquThiHRxzitixD3NtxWEjKlFX0RafQfqrBq/SwDAEo5P7UjEmofpoBObZlUkokkNB+RYP0=; 20:qzyIxGWWGP2VJJNjcJsL7kyOWkVRlPaFmUfLQmh78XbxIHzj52koQegUCozJwP4glkHwZtTQ5+av9Ku+9aF7vw== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cplanenetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2015 23:01:13.7961 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR08MB522 X-GBUdb-Analysis: 0, 65.55.169.119, Ugly c=0.434822 p=-0.323529 Source Normal X-MessageSniffer-Rules: 0-0-0-9416-c X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1446159678 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using per-user scores of TAG_LEVEL=3.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=3.0 tests=BSF_SC5_MJ1963, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.23937 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Cc: Saurabh Mohan Subject: [ovs-dev] [PATCH ] debian: Fix bringup seq for OVSPort type of vlan. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@openvswitch.org Sender: "dev" Problem: When the OVSPort is a vlan interface there is a sequencing issue when we try to bring up the OVSBridge. Consider the following configuration in /etc/network/interfaces allow-ovs br-foo iface br-foo inet static address 1.1.1.1 netmask 255.255.255.0 ovs_type OVSBridge ovs_ports eth1.2052 # Interface eth1.2052 allow-br-foo eth1.2052 iface eth1.2052 inet manual ovs_type OVSPort ovs_bridge br-foo bridge_name br-foo If we run 'service openvswitch start' then we'd get the following errors. 2015-10-08T00:05:45.279Z|00019|bridge|WARN|could not open network device eth1.2052 (No such device) Reason: Due to the current sequence the script /etc/network/if-pre-up.d/openvswitch with IF_OVS_TYPE=OVSPort is run prior to the script /etc/network.if-pre-up.d/vlan which brings up the vlan interface eth1.2052. saurabh@ubuntu-test:~$ run-parts --test /etc/network/if-pre-up.d/ /etc/network/if-pre-up.d//bridge /etc/network/if-pre-up.d//ethtool /etc/network/if-pre-up.d//openvswitch /etc/network/if-pre-up.d//vlan /etc/network/if-pre-up.d//wireless-tools /etc/network/if-pre-up.d//wpasupplicant Fix: The fix is to order the openvswitch script to run after the other interface scripts in /etc/network/if-pre-up.d/ Signed-off-by: Saurabh Mohan --- debian/openvswitch-switch.links | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/openvswitch-switch.links b/debian/openvswitch-switch.links index cf58073..5c7b1f1 100644 --- a/debian/openvswitch-switch.links +++ b/debian/openvswitch-switch.links @@ -1,2 +1,2 @@ usr/share/openvswitch/scripts/ifupdown.sh etc/network/if-post-down.d/openvswitch -usr/share/openvswitch/scripts/ifupdown.sh etc/network/if-pre-up.d/openvswitch +usr/share/openvswitch/scripts/ifupdown.sh etc/network/if-pre-up.d/z09_openvswitch