X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 33E8FDC0172; Wed, 2 Sep 2015 13:38:13 +0000 (UTC) Received: from ncopa-desktop.alpinelinux.org (unknown [79.160.13.133]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: n@tanael.org) by mail.alpinelinux.org (Postfix) with ESMTPSA id 8FC32DC00C6; Wed, 2 Sep 2015 13:38:12 +0000 (UTC) Date: Wed, 2 Sep 2015 15:38:08 +0200 From: Natanael Copa To: IT Developer Cc: alpine-aports@lists.alpinelinux.org Subject: Re: [alpine-aports] [PATCH] main/openvswitch: fix ifupdown script Message-ID: <20150902153808.09f49f6d@ncopa-desktop.alpinelinux.org> In-Reply-To: <55DCF51C.5060201@it-offshore.co.uk> References: <1439851162-53509-1-git-send-email-developer@it-offshore.co.uk> <20150825094747.0471379c@ncopa-desktop.alpinelinux.org> <55DCF51C.5060201@it-offshore.co.uk> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; x86_64-alpine-linux-musl) X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP On Wed, 26 Aug 2015 00:07:08 +0100 IT Developer wrote: > Adding rc_depends to /etc/conf.d/ovs-vswitchd did not start the depends. > Starting init scripts from within a shell script does not start the > depends How was the script started? via a manual "ifup something" of pulled in from the networking service? > so I revised the ifupdown script to loop through: > > DEPENDS=$(/lib/rc/bin/rc-depend -t ineed -qq ovs-vswitchd) > > 2 new ovs patches sent a little earlier. I still don't like this. Questions: - Are there any situation that ovs-vswitchd may run without that ovsdb-server runs? eg can you run ovsdb-server on a remove host? can you run a ovs-vswitchd configuration without ovsdb-server? - If both ovsdb-server and ovs-vswitchd serivce are running, and you stop or restart the ovsdb-server service. What should happen? should ovs-vswitchd also stop/restart? When it comes to the ovs-modules service, it is fully possible to configure your system so that you load kernel module vi /etc/modules so you technically dont need the ovs-modules serivce (I suppose). If that is the case, then I don't start it in a hardcoded script. What i think is: if you have marked ovs-vswitchd service to autostart at boot and also marked networking service to autostart, then should the openrc dependency handling make sure that ovsd-vswitchd is started before networking. (ovs-vswitchd should have an rc_before="networking") If there are any valid (theoretical) situations where you need to start networking service before you start ovs-vswitchd (maybe ovsdb-server is on a remote host?), then we cannot hardcode it and the start order needs to be a part of configuration (eg /etc/conf.d) The only time the ovs-vswitchd service may be started from the ifupdown.sh script is when "networking" is not started, and you do "ifup ovsbr0" or similar, but then should the dependencies for the ovs-vswitchd be pulled in by openrc, not by the ifupdown.sh script. -nc > > Stuart. > > On 25/08/15 08:47, Natanael Copa wrote: > > On Mon, 17 Aug 2015 22:39:22 +0000 > > Stuart Cardall wrote: > > > >> --- a/main/openvswitch/ifupdown.sh > >> +++ b/main/openvswitch/ifupdown.sh > >> @@ -29,7 +29,9 @@ if (ovs_vsctl --version) > /dev/null 2>&1; then :; else > >> exit 0 > >> fi > >> > >> -if /etc/init.d/ovs-vswitchd status > /dev/null 2>&1; then :; else > >> +if ! /etc/init.d/ovs-vswitchd status &>/dev/null; then > >> + /etc/init.d/ovs-modules start > >> + /etc/init.d/ovsdb-server start > >> /etc/init.d/ovs-vswitchd start > >> fi > >> > > Why don't we add ovsdb-server and ovs-modules as dependencies for ovs-vswitchd? > > > > If it is not a hard dependency (but a configurable, soft dependency), > > then maybe the /etc/conf.d/ovs-vswitchd should have: > > > > rc_depend="ovs-modules ovsdb-server" > > > > I think hardcoding it in the ifupdown.sh script is wrong in case the > > dependencies for the ovs-vswitchd service changes in future version. > > > > > > -nc > --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---