From gabriel at kerneis.info Mon Sep 1 08:04:10 2014 From: gabriel at kerneis.info (Gabriel Kerneis) Date: Mon, 1 Sep 2014 10:04:10 +0200 Subject: [Babel-users] Babeld 1.5.1 in OpenWrt: please test! Message-ID: <20140901080410.GA4623@kerneis.info> Dear all, thanks to the hard work of Baptiste, babeld 1.5.1 will be available in OpenWrt snapshot packages within 24 hours. https://github.com/openwrt-routing/packages/commit/cda939baea3116e2e411fa056f6804cf62f5ded4 This version features a major change: it generates a babeld configuration file instead of creating a huge command-line which used it break if too many options were used. Please, test this as much and as soon as possible, in particular for backwards-compatibility with your current configuration files. See the following commit for a few caveats about backwards-compatibility: https://github.com/zorun/packages/commit/de3e16ba82d6fe410e609cf6e8b68483f03d6d20 Many thanks in advance, -- Gabriel From jch at pps.univ-paris-diderot.fr Mon Sep 1 14:25:07 2014 From: jch at pps.univ-paris-diderot.fr (Juliusz Chroboczek) Date: Mon, 01 Sep 2014 16:25:07 +0200 Subject: [Babel-users] Babeld 1.5.1 in OpenWrt: please test! In-Reply-To: <20140901080410.GA4623@kerneis.info> References: <20140901080410.GA4623@kerneis.info> Message-ID: <87ppff8lks.wl-jch@pps.univ-paris-diderot.fr> > thanks to the hard work of Baptiste, babeld 1.5.1 will be available in > OpenWrt snapshot packages within 24 hours. [...] > This version features a major change: it generates a babeld > configuration file instead of creating a huge command-line which used it > break if too many options were used. Good. Thanks a lot to both of you. -- Juliusz From baptiste.jonglez at ens-lyon.fr Wed Sep 3 15:13:40 2014 From: baptiste.jonglez at ens-lyon.fr (Baptiste Jonglez) Date: Wed, 3 Sep 2014 17:13:40 +0200 Subject: [Babel-users] Babeld 1.5.1 in OpenWrt: please test! In-Reply-To: <20140901080410.GA4623@kerneis.info> References: <20140901080410.GA4623@kerneis.info> Message-ID: <20140903151340.GB17920@ens-lyon.fr> Thank you for the announcement, Gabriel. The package has been built, see here for ar71xx: http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/routing/ Hopefully, it should be available in the final version of Barrier Breaker. Please test and report any outstanding bug. There is also some documentation: http://wiki.openwrt.org/doc/uci/babeld Thanks, Baptiste On Mon, Sep 01, 2014 at 10:04:10AM +0200, Gabriel Kerneis wrote: > Dear all, > > thanks to the hard work of Baptiste, babeld 1.5.1 will be available in > OpenWrt snapshot packages within 24 hours. > > https://github.com/openwrt-routing/packages/commit/cda939baea3116e2e411fa056f6804cf62f5ded4 > > This version features a major change: it generates a babeld > configuration file instead of creating a huge command-line which used it > break if too many options were used. > > Please, test this as much and as soon as possible, in particular for > backwards-compatibility with your current configuration files. > > See the following commit for a few caveats about > backwards-compatibility: > https://github.com/zorun/packages/commit/de3e16ba82d6fe410e609cf6e8b68483f03d6d20 > > Many thanks in advance, -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From dave.taht at gmail.com Wed Sep 3 18:08:38 2014 From: dave.taht at gmail.com (Dave Taht) Date: Wed, 3 Sep 2014 11:08:38 -0700 Subject: [Babel-users] Babeld 1.5.1 in OpenWrt: please test! In-Reply-To: <20140903151340.GB17920@ens-lyon.fr> References: <20140901080410.GA4623@kerneis.info> <20140903151340.GB17920@ens-lyon.fr> Message-ID: Did procd support land also? On Wed, Sep 3, 2014 at 8:13 AM, Baptiste Jonglez wrote: > Thank you for the announcement, Gabriel. > > The package has been built, see here for ar71xx: > > http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/routing/ > > Hopefully, it should be available in the final version of Barrier Breaker. > Please test and report any outstanding bug. > > There is also some documentation: > > http://wiki.openwrt.org/doc/uci/babeld > > Thanks, > Baptiste > > On Mon, Sep 01, 2014 at 10:04:10AM +0200, Gabriel Kerneis wrote: >> Dear all, >> >> thanks to the hard work of Baptiste, babeld 1.5.1 will be available in >> OpenWrt snapshot packages within 24 hours. >> >> https://github.com/openwrt-routing/packages/commit/cda939baea3116e2e411fa056f6804cf62f5ded4 >> >> This version features a major change: it generates a babeld >> configuration file instead of creating a huge command-line which used it >> break if too many options were used. >> >> Please, test this as much and as soon as possible, in particular for >> backwards-compatibility with your current configuration files. >> >> See the following commit for a few caveats about >> backwards-compatibility: >> https://github.com/zorun/packages/commit/de3e16ba82d6fe410e609cf6e8b68483f03d6d20 >> >> Many thanks in advance, > > _______________________________________________ > Babel-users mailing list > Babel-users at lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users -- Dave T?ht https://www.bufferbloat.net/projects/make-wifi-fast From baptiste.jonglez at ens-lyon.fr Thu Sep 4 08:46:38 2014 From: baptiste.jonglez at ens-lyon.fr (Baptiste Jonglez) Date: Thu, 4 Sep 2014 10:46:38 +0200 Subject: [Babel-users] Babeld 1.5.1 in OpenWrt: please test! In-Reply-To: References: <20140901080410.GA4623@kerneis.info> <20140903151340.GB17920@ens-lyon.fr> Message-ID: <20140904084638.GB30072@ens-lyon.fr> No. Patch welcome :) https://github.com/openwrt-routing/packages/issues/17 On Wed, Sep 03, 2014 at 11:08:38AM -0700, Dave Taht wrote: > Did procd support land also? > > On Wed, Sep 3, 2014 at 8:13 AM, Baptiste Jonglez > wrote: > > Thank you for the announcement, Gabriel. > > > > The package has been built, see here for ar71xx: > > > > http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/routing/ > > > > Hopefully, it should be available in the final version of Barrier Breaker. > > Please test and report any outstanding bug. > > > > There is also some documentation: > > > > http://wiki.openwrt.org/doc/uci/babeld > > > > Thanks, > > Baptiste > > > > On Mon, Sep 01, 2014 at 10:04:10AM +0200, Gabriel Kerneis wrote: > >> Dear all, > >> > >> thanks to the hard work of Baptiste, babeld 1.5.1 will be available in > >> OpenWrt snapshot packages within 24 hours. > >> > >> https://github.com/openwrt-routing/packages/commit/cda939baea3116e2e411fa056f6804cf62f5ded4 > >> > >> This version features a major change: it generates a babeld > >> configuration file instead of creating a huge command-line which used it > >> break if too many options were used. > >> > >> Please, test this as much and as soon as possible, in particular for > >> backwards-compatibility with your current configuration files. > >> > >> See the following commit for a few caveats about > >> backwards-compatibility: > >> https://github.com/zorun/packages/commit/de3e16ba82d6fe410e609cf6e8b68483f03d6d20 > >> > >> Many thanks in advance, > > > > _______________________________________________ > > Babel-users mailing list > > Babel-users at lists.alioth.debian.org > > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From bjonglez at illyse.org Mon Sep 8 13:10:39 2014 From: bjonglez at illyse.org (Baptiste Jonglez) Date: Mon, 8 Sep 2014 15:10:39 +0200 Subject: [Babel-users] [OpenWrt-Devel] [PATCH] babeld: use procd to start, stop, and respawn In-Reply-To: <257d4c.6a0cdbee.jhzj.mx@tumtum.plumbweb.net> References: <257d4c.6a0cdbee.jhzj.mx@tumtum.plumbweb.net> Message-ID: <20140908131039.GB20031@illyse.org> Hi, Note that babeld is maintained in https://github.com/openwrt-routing/packages. Nevertheless, comments inline. On Sun, Sep 07, 2014 at 05:56:32PM -0400, Tristan Plumb wrote: > Changes the babeld init script to utilize procd and Nice, it was a requested feature: https://github.com/openwrt-routing/packages/issues/17 Could you separate your patch into three patches? (procd support, hotplug script, pidfile hack) > adds a hotplug.d file to restart babeld when interfaces go up or down. Somebody provided a patch for this just a few days ago, see: https://github.com/openwrt-routing/packages/pull/52 However, see the comments: this should not be needed, as babeld detects when an interface is brought up and then starts using it. What is your use-case? > Additionally adds a patch to the babeld source is to prevent the > attempted recreation of a pidfile when babeld restarts uncleanly. This is > also possible to do by passing -I '' on the command line, however procd > interprets an empty argument terminating the list, and thus cannot supply > empty arguments to programs it manages. Patching babeld itself is a workaround. Why not tackle the root issue? It seems that you encountered crashes in babeld, so that should be fixed, instead of working around the crashes. I did experience a few babeld crashes myself, but never managed to find where they came from. > Signed-off-by: Tristan Plumb > --- > diff --git a/babeld/Makefile b/babeld/Makefile > index e939310..70fcd64 100644 > --- a/babeld/Makefile > +++ b/babeld/Makefile > @@ -54,6 +54,8 @@ define Package/babeld/install > $(INSTALL_CONF) ./files/babeld.config $(1)/etc/config/babeld > $(INSTALL_DIR) $(1)/etc/init.d > $(INSTALL_BIN) ./files/babeld.init $(1)/etc/init.d/babeld > + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface > + $(INSTALL_DATA) ./files/babeld.hotplug $(1)/etc/hotplug.d/iface/25-babeld > endef > > $(eval $(call BuildPackage,babeld)) > diff --git a/babeld/files/babeld.hotplug b/babeld/files/babeld.hotplug > new file mode 100644 > index 0000000..3fe674a > --- /dev/null > +++ b/babeld/files/babeld.hotplug > @@ -0,0 +1,6 @@ > +#!/bin/sh > + > +[ "$ACTION" = ifup ] || exit 0 > + > +/etc/init.d/babeld enabled && /etc/init.d/babeld restart > + > diff --git a/babeld/files/babeld.init b/babeld/files/babeld.init > index 180fc7e..de8d73b 100755 > --- a/babeld/files/babeld.init > +++ b/babeld/files/babeld.init > @@ -2,9 +2,9 @@ > > . /lib/functions/network.sh > > +USE_PROCD=1 > START=70 > > -pidfile='/var/run/babeld.pid' > CONFIGFILE='/var/etc/babeld.conf' > OTHERCONFIGFILE="/etc/babeld.conf" > EXTRA_COMMANDS="status" > @@ -197,7 +197,7 @@ babel_config_cb() { > esac > } > > -start() { > +start_service() { > mkdir -p /var/lib > # Start by emptying the generated config file > >"$CONFIGFILE" > @@ -213,26 +213,17 @@ start() { > config_foreach parse_old_global_options general > # Parse filters separately, since we know which options we expect > config_foreach babel_filter filter > + procd_open_instance > # Using multiple config files is supported since babeld 1.5.1 > - /usr/sbin/babeld -D -I "$pidfile" -c "$OTHERCONFIGFILE" -c "$CONFIGFILE" > - # Wait for the pidfile to appear > - for i in 1 2 > - do > - [ -f "$pidfile" ] || sleep 1 > - done > - [ -f "$pidfile" ] || (echo "Failed to start babeld"; exit 42) > + procd_set_param command /usr/sbin/babeld -c "$OTHERCONFIGFILE" -c "$CONFIGFILE" > + procd_set_param respawn > + procd_close_instance > } > > -stop() { > - [ -f "$pidfile" ] && kill $(cat $pidfile) > - # avoid race-condition on restart: wait for > - # babeld to die for real. > - [ -f "$pidfile" ] && sleep 1 > - [ -f "$pidfile" ] && sleep 1 > - [ -f "$pidfile" ] && sleep 1 > - [ -f "$pidfile" ] && exit 42 > +service_triggers() { > + procd_add_reload_trigger babeld > } > > status() { > - [ -f "$pidfile" ] && kill -USR1 $(cat $pidfile) > + kill -USR1 $(pidof babeld) > } > diff --git a/babeld/patches/001-no-default-pidfile.patch b/babeld/patches/001-no-default-pidfile.patch > new file mode 100644 > index 0000000..74ac6b4 > --- /dev/null > +++ b/babeld/patches/001-no-default-pidfile.patch > @@ -0,0 +1,21 @@ > +diff --git a/babeld.c b/babeld.c > +index 656c9da..88e4aec 100644 > +--- a/babeld.c > ++++ b/babeld.c > +@@ -66,7 +66,7 @@ int resend_delay = -1; > + int random_id = 0; > + int do_daemonise = 0; > + const char *logfile = NULL, > +- *pidfile = "/var/run/babeld.pid", > ++ *pidfile = NULL, > + *state_file = "/var/lib/babel-state"; > + > + unsigned char *receive_buffer = NULL; > +@@ -251,6 +251,7 @@ main(int argc, char **argv) > + break; > + case 'D': > + do_daemonise = 1; > ++ pidfile = "/var/run/babeld.pid"; > + break; > + case 'L': > + logfile = optarg; -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From dave.taht at gmail.com Mon Sep 8 17:54:29 2014 From: dave.taht at gmail.com (Dave Taht) Date: Mon, 8 Sep 2014 10:54:29 -0700 Subject: [Babel-users] [OpenWrt-Devel] [PATCH] babeld: use procd to start, stop, and respawn In-Reply-To: <20140908131039.GB20031@illyse.org> References: <257d4c.6a0cdbee.jhzj.mx@tumtum.plumbweb.net> <20140908131039.GB20031@illyse.org> Message-ID: On Mon, Sep 8, 2014 at 6:10 AM, Baptiste Jonglez wrote: > Hi, > > Note that babeld is maintained in https://github.com/openwrt-routing/packages. > Nevertheless, comments inline. > > On Sun, Sep 07, 2014 at 05:56:32PM -0400, Tristan Plumb wrote: >> Changes the babeld init script to utilize procd and > > Nice, it was a requested feature: > > https://github.com/openwrt-routing/packages/issues/17 > > Could you separate your patch into three patches? (procd support, hotplug > script, pidfile hack) > >> adds a hotplug.d file to restart babeld when interfaces go up or down. > > Somebody provided a patch for this just a few days ago, see: > > https://github.com/openwrt-routing/packages/pull/52 > > However, see the comments: this should not be needed, as babeld detects > when an interface is brought up and then starts using it. What is your > use-case? > >> Additionally adds a patch to the babeld source is to prevent the >> attempted recreation of a pidfile when babeld restarts uncleanly. This is >> also possible to do by passing -I '' on the command line, however procd >> interprets an empty argument terminating the list, and thus cannot supply >> empty arguments to programs it manages. > Patching babeld itself is a workaround. Why not tackle the root issue? > It seems that you encountered crashes in babeld, so that should be fixed, > instead of working around the crashes. I did experience a few babeld > crashes myself, but never managed to find where they came from. There lies the rub. If you have a deployed machine on a rooftop somewhere, it is better to restart the daemon automagically and log the action rather than attempt to debug it. Using procd to manage this stuff reduces the probability of a babel failure taking out a node by several orders of magnitude, and I strongly favor managing it this way. Certainly finding and fixing bugs so that it doesn't ever crash is a good option, but in the real world, nothing is perfect, and defense in depth is needed. > >> Signed-off-by: Tristan Plumb >> --- >> diff --git a/babeld/Makefile b/babeld/Makefile >> index e939310..70fcd64 100644 >> --- a/babeld/Makefile >> +++ b/babeld/Makefile >> @@ -54,6 +54,8 @@ define Package/babeld/install >> $(INSTALL_CONF) ./files/babeld.config $(1)/etc/config/babeld >> $(INSTALL_DIR) $(1)/etc/init.d >> $(INSTALL_BIN) ./files/babeld.init $(1)/etc/init.d/babeld >> + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface >> + $(INSTALL_DATA) ./files/babeld.hotplug $(1)/etc/hotplug.d/iface/25-babeld >> endef >> >> $(eval $(call BuildPackage,babeld)) >> diff --git a/babeld/files/babeld.hotplug b/babeld/files/babeld.hotplug >> new file mode 100644 >> index 0000000..3fe674a >> --- /dev/null >> +++ b/babeld/files/babeld.hotplug >> @@ -0,0 +1,6 @@ >> +#!/bin/sh >> + >> +[ "$ACTION" = ifup ] || exit 0 >> + >> +/etc/init.d/babeld enabled && /etc/init.d/babeld restart >> + >> diff --git a/babeld/files/babeld.init b/babeld/files/babeld.init >> index 180fc7e..de8d73b 100755 >> --- a/babeld/files/babeld.init >> +++ b/babeld/files/babeld.init >> @@ -2,9 +2,9 @@ >> >> . /lib/functions/network.sh >> >> +USE_PROCD=1 >> START=70 >> >> -pidfile='/var/run/babeld.pid' >> CONFIGFILE='/var/etc/babeld.conf' >> OTHERCONFIGFILE="/etc/babeld.conf" >> EXTRA_COMMANDS="status" >> @@ -197,7 +197,7 @@ babel_config_cb() { >> esac >> } >> >> -start() { >> +start_service() { >> mkdir -p /var/lib >> # Start by emptying the generated config file >> >"$CONFIGFILE" >> @@ -213,26 +213,17 @@ start() { >> config_foreach parse_old_global_options general >> # Parse filters separately, since we know which options we expect >> config_foreach babel_filter filter >> + procd_open_instance >> # Using multiple config files is supported since babeld 1.5.1 >> - /usr/sbin/babeld -D -I "$pidfile" -c "$OTHERCONFIGFILE" -c "$CONFIGFILE" >> - # Wait for the pidfile to appear >> - for i in 1 2 >> - do >> - [ -f "$pidfile" ] || sleep 1 >> - done >> - [ -f "$pidfile" ] || (echo "Failed to start babeld"; exit 42) >> + procd_set_param command /usr/sbin/babeld -c "$OTHERCONFIGFILE" -c "$CONFIGFILE" >> + procd_set_param respawn >> + procd_close_instance >> } >> >> -stop() { >> - [ -f "$pidfile" ] && kill $(cat $pidfile) >> - # avoid race-condition on restart: wait for >> - # babeld to die for real. >> - [ -f "$pidfile" ] && sleep 1 >> - [ -f "$pidfile" ] && sleep 1 >> - [ -f "$pidfile" ] && sleep 1 >> - [ -f "$pidfile" ] && exit 42 >> +service_triggers() { >> + procd_add_reload_trigger babeld >> } >> >> status() { >> - [ -f "$pidfile" ] && kill -USR1 $(cat $pidfile) >> + kill -USR1 $(pidof babeld) >> } >> diff --git a/babeld/patches/001-no-default-pidfile.patch b/babeld/patches/001-no-default-pidfile.patch >> new file mode 100644 >> index 0000000..74ac6b4 >> --- /dev/null >> +++ b/babeld/patches/001-no-default-pidfile.patch >> @@ -0,0 +1,21 @@ >> +diff --git a/babeld.c b/babeld.c >> +index 656c9da..88e4aec 100644 >> +--- a/babeld.c >> ++++ b/babeld.c >> +@@ -66,7 +66,7 @@ int resend_delay = -1; >> + int random_id = 0; >> + int do_daemonise = 0; >> + const char *logfile = NULL, >> +- *pidfile = "/var/run/babeld.pid", >> ++ *pidfile = NULL, >> + *state_file = "/var/lib/babel-state"; >> + >> + unsigned char *receive_buffer = NULL; >> +@@ -251,6 +251,7 @@ main(int argc, char **argv) >> + break; >> + case 'D': >> + do_daemonise = 1; >> ++ pidfile = "/var/run/babeld.pid"; >> + break; >> + case 'L': >> + logfile = optarg; > > _______________________________________________ > Babel-users mailing list > Babel-users at lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users -- Dave T?ht https://www.bufferbloat.net/projects/make-wifi-fast From gabriel at kerneis.info Mon Sep 8 20:22:27 2014 From: gabriel at kerneis.info (Gabriel Kerneis) Date: Mon, 8 Sep 2014 22:22:27 +0200 Subject: [Babel-users] [OpenWrt-Devel] [PATCH] babeld: use procd to start, stop, and respawn In-Reply-To: References: <257d4c.6a0cdbee.jhzj.mx@tumtum.plumbweb.net> <20140908131039.GB20031@illyse.org> Message-ID: <20140908202227.GA3712@kerneis.info> On Mon, Sep 08, 2014 at 10:54:29AM -0700, Dave Taht wrote: > On Mon, Sep 8, 2014 at 6:10 AM, Baptiste Jonglez wrote: > >> Additionally adds a patch to the babeld source is to prevent the > >> attempted recreation of a pidfile when babeld restarts uncleanly. This is > >> also possible to do by passing -I '' on the command line, however procd > >> interprets an empty argument terminating the list, and thus cannot supply > >> empty arguments to programs it manages. > > > Patching babeld itself is a workaround. Why not tackle the root issue? > > It seems that you encountered crashes in babeld, so that should be fixed, > > instead of working around the crashes. I did experience a few babeld > > crashes myself, but never managed to find where they came from. > > There lies the rub. If you have a deployed machine on a rooftop > somewhere, it is better to restart the daemon automagically and log > the action rather than attempt to debug it. Using procd to manage this > stuff reduces the probability of a babel failure taking out a node by > several orders of magnitude, and I strongly favor managing it this > way. Certainly finding and fixing bugs so that it doesn't ever crash > is a good option, but in the real world, nothing is perfect, and > defense in depth is needed. However, there is an elephant in the room here: "procd interprets an empty argument terminating the list, and thus cannot supply empty arguments to programs it manages". Isn't there a way to fix *that* bug (or rather limitation) at least? Best, -- Gabriel From dave.taht at gmail.com Tue Sep 9 16:18:56 2014 From: dave.taht at gmail.com (Dave Taht) Date: Tue, 9 Sep 2014 09:18:56 -0700 Subject: [Babel-users] [OpenWrt-Devel] [PATCH] babeld: use procd to start, stop, and respawn In-Reply-To: <87ha0g6aw3.wl-jch@pps.univ-paris-diderot.fr> References: <257d4c.6a0cdbee.jhzj.mx@tumtum.plumbweb.net> <20140908131039.GB20031@illyse.org> <87ha0g6aw3.wl-jch@pps.univ-paris-diderot.fr> Message-ID: On Tue, Sep 9, 2014 at 9:01 AM, Juliusz Chroboczek wrote: > [Felix, John, we're discussing the integration of babeld (a routing daemon) > with procd. By default, babeld creates a pidfile, which can be disabled > with "-I ''" on babeld's command line. Unfortunately, it turns out that > procd is unable to pass an empty argument to babeld.] > >> There lies the rub. If you have a deployed machine on a rooftop >> somewhere, it is better to restart the daemon automagically and log the >> action rather than attempt to debug it. > > We're in full agreement here. Babeld shouldn't crash, ever. However, > should it crash, the crash should be logged somewhere and babeld restarted. > > As Gabriel mentioned, the issue is with procd being unable to pass an > empty argument. A simple workaround would be to hack babeld to interpret > "-I none" as a synonym of "-I ''", but this issue should really be fixed > in procd. > > So, folks, please: > > 1. file a bug against procd; > 2. provide me with a useful report if you manage to get babeld to crash; > 3. let me know if you want me to implement the "-I none" hack in babeld > and release it as 1.5.2; it will cost you one beer, non tax-deductible. Cheap at the price. I note that merely treating an argument of /dev/null specially communicates the intent to not create a pidfile. > -- Juliusz > > P.S. Baptiste, please forward this mail to openwrt-devel, which pitylessly > rejects my mails. -- Dave T?ht https://www.bufferbloat.net/projects/make-wifi-fast From blogic at openwrt.org Tue Sep 9 18:10:02 2014 From: blogic at openwrt.org (John Crispin) Date: Tue, 09 Sep 2014 20:10:02 +0200 Subject: [Babel-users] [OpenWrt-Devel] [PATCH] babeld: use procd to start, stop, and respawn In-Reply-To: References: <257d4c.6a0cdbee.jhzj.mx@tumtum.plumbweb.net> <20140908131039.GB20031@illyse.org> <87ha0g6aw3.wl-jch@pps.univ-paris-diderot.fr> Message-ID: <540F427A.2000503@openwrt.org> On 09/09/2014 18:18, Dave Taht wrote: > On Tue, Sep 9, 2014 at 9:01 AM, Juliusz Chroboczek > wrote: >> [Felix, John, we're discussing the integration of babeld (a routing daemon) >> with procd. By default, babeld creates a pidfile, which can be disabled >> with "-I ''" on babeld's command line. Unfortunately, it turns out that >> procd is unable to pass an empty argument to babeld.] >> >>> There lies the rub. If you have a deployed machine on a rooftop >>> somewhere, it is better to restart the daemon automagically and log the >>> action rather than attempt to debug it. >> We're in full agreement here. Babeld shouldn't crash, ever. However, >> should it crash, the crash should be logged somewhere and babeld restarted. >> >> As Gabriel mentioned, the issue is with procd being unable to pass an >> empty argument. A simple workaround would be to hack babeld to interpret >> "-I none" as a synonym of "-I ''", but this issue should really be fixed >> in procd. >> >> So, folks, please: >> >> 1. file a bug against procd; i did not actually read the thread, but if there is a bug i would like to know regardless of wonky /dev/null workarounds ... so procd refuses to start service instances with no cmdline parameters ? or did i understand the bug incorrectly? additionally i recommend respawn + setting procd to generate core dumps for babel if the daemon is flaky. if the log output upon crash is not verbose enough we can make it more apparent if bable crashed. >> 2. provide me with a useful report if you manage to get babeld to crash; core dumps ftw >> 3. let me know if you want me to implement the "-I none" hack in babeld >> and release it as 1.5.2; it will cost you one beer, non tax-deductible. > Cheap at the price. I note that merely treating an argument of /dev/null > specially communicates the intent to not create a pidfile. > >> -- Juliusz >> >> P.S. Baptiste, please forward this mail to openwrt-devel, which pitylessly >> rejects my mails. > > From nbd at openwrt.org Tue Sep 9 19:16:27 2014 From: nbd at openwrt.org (Felix Fietkau) Date: Tue, 09 Sep 2014 21:16:27 +0200 Subject: [Babel-users] [OpenWrt-Devel] [PATCH] babeld: use procd to start, stop, and respawn In-Reply-To: <87ha0g6aw3.wl-jch@pps.univ-paris-diderot.fr> References: <257d4c.6a0cdbee.jhzj.mx@tumtum.plumbweb.net> <20140908131039.GB20031@illyse.org> <87ha0g6aw3.wl-jch@pps.univ-paris-diderot.fr> Message-ID: <540F520B.7040404@openwrt.org> On 2014-09-09 18:01, Juliusz Chroboczek wrote: > [Felix, John, we're discussing the integration of babeld (a routing daemon) > with procd. By default, babeld creates a pidfile, which can be disabled > with "-I ''" on babeld's command line. Unfortunately, it turns out that > procd is unable to pass an empty argument to babeld.] > >> There lies the rub. If you have a deployed machine on a rooftop >> somewhere, it is better to restart the daemon automagically and log the >> action rather than attempt to debug it. > > We're in full agreement here. Babeld shouldn't crash, ever. However, > should it crash, the crash should be logged somewhere and babeld restarted. > > As Gabriel mentioned, the issue is with procd being unable to pass an > empty argument. A simple workaround would be to hack babeld to interpret > "-I none" as a synonym of "-I ''", but this issue should really be fixed > in procd. If I understand the issue correctly, this patch should fix it - please test. --- --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -75,7 +75,7 @@ _procd_close_service() { } _procd_add_array_data() { - while [ -n "$1" ]; do + while [ "$#" -gt 0 ]; do json_add_string "" "$1" shift done From blogic at openwrt.org Tue Sep 9 19:45:45 2014 From: blogic at openwrt.org (John Crispin) Date: Tue, 09 Sep 2014 21:45:45 +0200 Subject: [Babel-users] [OpenWrt-Devel] [PATCH] babeld: use procd to start, stop, and respawn In-Reply-To: <8761gw61um.wl-jch@pps.univ-paris-diderot.fr> References: <257d4c.6a0cdbee.jhzj.mx@tumtum.plumbweb.net> <20140908131039.GB20031@illyse.org> <87ha0g6aw3.wl-jch@pps.univ-paris-diderot.fr> <540F427A.2000503@openwrt.org> <8761gw61um.wl-jch@pps.univ-paris-diderot.fr> Message-ID: <540F58E9.1020509@openwrt.org> On 09/09/2014 21:16, Juliusz Chroboczek wrote: >> i did not actually read the thread, but if there is a bug i would like >> to know regardless of wonky /dev/null workarounds ... so procd refuses >> to start service instances with no cmdline parameters ? or did i >> understand the bug incorrectly? > No, there appears to be no way to pass the empty string as a parameter to > a daemon started by procd. > > I.e., we need the equivalent of the following shell command: > > babeld -I '' > ok, i think felix's patch is not enough in that case, i'll look into it in the morning >> additionally i recommend respawn + setting procd to generate core dumps >> for babel if the daemon is flaky. > It's rock solid. Which is why we're unable to debug the root issue -- the > crashes happen very seldom. ok, enable core dumps by default so that when it does crash you get the dump. > -- Juliusz From dave.taht at gmail.com Thu Sep 11 18:48:50 2014 From: dave.taht at gmail.com (Dave Taht) Date: Thu, 11 Sep 2014 11:48:50 -0700 Subject: [Babel-users] "unreachable" feature request for openwrt /etc/config/network or /etc/config/firewall Message-ID: I use the ip "unreachable" mechanism to export a covering route for babel in cerowrt, so I don't have to export all the /27s, just the /24, to other routers. I am presently dumping that one line of code into /etc/firewall.user e.g.: ip route add unreachable 172.30.42.0/24 proto static and running it out of /etc/config/firewall It would be nice if this worked in /etc/config/network instead and could be viewed in luci. but I was unable to get it to work there with either the ip rule or ip route mechanism. ideas? methods? -- Dave T?ht https://www.bufferbloat.net/projects/make-wifi-fast From dave.taht at gmail.com Mon Sep 22 17:59:55 2014 From: dave.taht at gmail.com (Dave Taht) Date: Mon, 22 Sep 2014 10:59:55 -0700 Subject: [Babel-users] Looping in EAGAIN Message-ID: Saw this go by today: https://dev.openwrt.org/browser/trunk/package/network/services/dnsmasq/patches/003-fix-unresponsiveness-on-interface-disappearance.patch?rev=42648 I HAVE seen babel do weird things when tearing down and recreating an interface... has anyone else? -- Dave T?ht https://www.bufferbloat.net/projects/make-wifi-fast