From patchwork Tue Dec 1 00:21:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gurucharan Shetty X-Patchwork-Id: 550566 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (unknown [IPv6:2600:3c00::f03c:91ff:fe6e:bdf7]) by ozlabs.org (Postfix) with ESMTP id 9A91A1401DE for ; Tue, 1 Dec 2015 11:28:58 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 6EB64101A2; Mon, 30 Nov 2015 16:28:57 -0800 (PST) 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 6A35710156 for ; Mon, 30 Nov 2015 16:28:56 -0800 (PST) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id 3355A1E03A6 for ; Mon, 30 Nov 2015 17:28:55 -0700 (MST) X-ASG-Debug-ID: 1448929734-09eadd4a30a61b0001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar5.cudamail.com with ESMTP id zp0QkTcl84gn0N8Z (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 30 Nov 2015 17:28:54 -0700 (MST) X-Barracuda-Envelope-From: guru.ovn@gmail.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO mail-pa0-f44.google.com) (209.85.220.44) by mx1-pf1.cudamail.com with ESMTPS (RC4-SHA encrypted); 1 Dec 2015 00:28:54 -0000 Received-SPF: pass (mx1-pf1.cudamail.com: SPF record at _netblocks.google.com designates 209.85.220.44 as permitted sender) X-Barracuda-RBL-Trusted-Forwarder: 209.85.220.44 Received: by padhx2 with SMTP id hx2so201310720pad.1 for ; Mon, 30 Nov 2015 16:28:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id; bh=29nSXW/0cqYNlbw1s54hsaYlthVgW0W+RgB4KoAS1DE=; b=YFo5TzOsSZOafJRgLHMdWpXQP1QZ3HmmxIGpJ9+KmXO7kzyKiGWRHbjreXSsccEhtn HnP+eK3vSO97AeQQm1zvUTAixVjh4VaUcTk9/nnMTJ+tqGbSbRSB5dNj2zih9hMgGvgT I4zVTSNywnjBvyLAdQLGalUbenQz4id2q12txX932+JuHnbz8rS0kLe6ItA+ARBkozoc qLVldU3ATgkfT6mGV3yOXvjAJU3StivDILevFyLOpz/YdFz71Vj+88Y1nYghtAMB3B87 alvp7bHhQOPM5VyIhT+k/YQ6+D+BeEeTWIDyJ13xgp9QR4fkt+PtxYJXIFQgdmWFC9te HjIw== X-Received: by 10.98.65.200 with SMTP id g69mr75653501pfd.33.1448929733664; Mon, 30 Nov 2015 16:28:53 -0800 (PST) Received: from ubuntu-test.eng.vmware.com ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id n75sm53584686pfa.16.2015.11.30.16.28.52 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 Nov 2015 16:28:52 -0800 (PST) X-CudaMail-Envelope-Sender: guru.ovn@gmail.com X-Barracuda-Apparent-Source-IP: 208.91.1.34 From: Gurucharan Shetty To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E1-1129114843 X-CudaMail-DTE: 113015 X-CudaMail-Originating-IP: 209.85.220.44 Date: Mon, 30 Nov 2015 16:21:33 -0800 X-ASG-Orig-Subj: [##CM-E1-1129114843##][PATCH] debian: Skip systemctl redirect. Message-Id: <1448929293-5072-1-git-send-email-guru@ovn.org> X-Mailer: git-send-email 1.7.9.5 X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1448929734 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH] debian: Skip systemctl redirect. 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: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" After some experimentation on Ubuntu15.04, I see the following behavior. 1. If you install openvswitch-switch with 'apt-get install', then you automatically get a upstart and systemd config files for openvswitch. The integration with 'interfaces' fails because both the upstart and systemd jobs do not have logic to handle it. The above behavior will likely get fixed soon in upstream Ubuntu. 2. If you install openvswitch-switch via the packages created from the openvswitch repo, there is no systemd or upstart conf files installed. But systemd notices this and creates a runtime openvswitch conf file which does nothing but call back the sysv startup script. In the above case when you call "/etc/init.d/openvswitch-switch start", it inturn calls "/bin/systemctl start openvswitch-switch.service". But the above for some reason simply hangs. It looks like a call to ifup when invoked in this manner does not return. I am not sure why this is happening. We can avoid the above behavior completely by skipping the systemctl redirect as done in this commit. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- debian/openvswitch-switch.init | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init index 8e156da..aece780 100755 --- a/debian/openvswitch-switch.init +++ b/debian/openvswitch-switch.init @@ -27,6 +27,8 @@ (test -x /usr/sbin/ovs-vswitchd && test -x /usr/sbin/ovsdb-server) || exit 0 +_SYSTEMCTL_SKIP_REDIRECT=yes + . /usr/share/openvswitch/scripts/ovs-lib test -e /etc/default/openvswitch-switch && . /etc/default/openvswitch-switch