Re: [Babel-users] babeld and systemd [was: babeld wishlist]

2016-02-15 Thread Toke Høiland-Jørgensen
Juliusz Chroboczek  writes:

> Perhaps I'm confused, but are you trying to make it possible to run
> multiple instances of babeld?

Yes, exactly.

> Are your users actually clamoring for that feature?

My users being me in this case: yes. Basically this comes from using the
same boxes to run my production network (on a VPN), and doing
development and experimentation. So I have a separate Babel instance
tied to the VPN that is always running (on separate interface(s) and
separate config) and then one or more instances running on virtual or
sometimes another physical interface for experimentation. I don't mind
all the routes from the VPN being distributed into the experimental
daemon (via the kernel), but not vice versa (which I avoid by having a
fairly restrictive filtering on the VPN interface).

-Toke

___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users


Re: [Babel-users] babeld and systemd [was: babeld wishlist]

2016-02-15 Thread Juliusz Chroboczek
>> Awesome! Any chance of also including a 'babeld@.service' file to easily
>> run babeld on a single interface without editing the configuration file? :)

> ExecStart=/usr/bin/babeld -D -I /run/babeld-%I.pid -S /var/lib/babel-state-%I 
> -c /etc/babeld-%I.conf %I

Perhaps I'm confused, but are you trying to make it possible to run
multiple instances of babeld?

Are your users actually clamoring for that feature?

-- Juliusz

___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users


Re: [Babel-users] babeld and systemd [was: babeld wishlist]

2016-02-15 Thread Toke Høiland-Jørgensen
Baptiste Jonglez  writes:

>> Awesome! Any chance of also including a 'babeld@.service' file to easily
>> run babeld on a single interface without editing the configuration file? :)
>
> You mean, in the Arch package, in addition to the regular service
> file?

Yeah, that was my thought.

> By the way, the service file you posted earlier *does* require editing
> a configuration file, /etc/babeld-%I.conf :)
>
>   ExecStart=/usr/bin/babeld -D -I /run/babeld-%I.pid -S 
> /var/lib/babel-state-%I -c /etc/babeld-%I.conf %I

Right, good point. Actually thought babeld would start fine if the file
doesn't exist. Seems not.

> Should we just tell babeld not to use any configuration file in this
> case?

Hmm, might be better. What I'd ideally like is something like 'use this
config file if it exists, otherwise nothing'. Not sure if that is easily
expressible in a service file.

> Otherwise, we could just use /etc/babeld.conf, but we might end up with
> babeld running on multiple interfaces even though the user only started
> e.g. babeld@eth0...  It would feel weird.  Also, I don't know what would
> happen if multiple instances of babeld run on the same interface.  For
> instance, what if somebody puts this in /etc/babeld.conf:
>
>   interface eth0
>   interface eth1
>
> and starts both babeld@eth0 and babeld@eth1? Both babeld instances
> would run on both interfaces.

Yeah, that would probably be bad. I do believe my service file predates
the ability to specify interfaces in the configuration file.

Hmm, another thought would be to make the part after the @ specify a
config file and not an interface. I.e.

ExecStart=/usr/bin/babeld -S /var/lib/babel-state-%I -c /etc/babeld-%I.conf


That would retain the ability to have separate independent instances of
babeld, but not tie it to interface names. My use case for this is
having a separate instance of babeld that is started along with my VPN
connection (on the VPN interface, tied to the VPN service file). I need
a config file for that anyway, so sticking the interface name in there
is no problem :)

-Toke


signature.asc
Description: PGP signature
___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users

Re: [Babel-users] babeld and systemd [was: babeld wishlist]

2016-02-13 Thread Baptiste Jonglez
On Fri, Feb 12, 2016 at 03:09:55PM +0100, Toke Høiland-Jørgensen wrote:
> Baptiste Jonglez  writes:
> 
> > Thanks, that did the trick!  I have updated the service file to restart
> > babeld automatically in case of failure, if somebody is interested:
> 
> 
> Awesome! Any chance of also including a 'babeld@.service' file to easily
> run babeld on a single interface without editing the configuration file? :)

You mean, in the Arch package, in addition to the regular service file?

By the way, the service file you posted earlier *does* require editing a
configuration file, /etc/babeld-%I.conf :)

  ExecStart=/usr/bin/babeld -D -I /run/babeld-%I.pid -S /var/lib/babel-state-%I 
-c /etc/babeld-%I.conf %I

Should we just tell babeld not to use any configuration file in this case?

Otherwise, we could just use /etc/babeld.conf, but we might end up with
babeld running on multiple interfaces even though the user only started
e.g. babeld@eth0...  It would feel weird.  Also, I don't know what would
happen if multiple instances of babeld run on the same interface.  For
instance, what if somebody puts this in /etc/babeld.conf:

  interface eth0
  interface eth1

and starts both babeld@eth0 and babeld@eth1?  Both babeld instances would
run on both interfaces.

Any thoughts on this?


signature.asc
Description: PGP signature
___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users

Re: [Babel-users] babeld and systemd [was: babeld wishlist]

2016-02-12 Thread Baptiste Jonglez
On Wed, Dec 09, 2015 at 10:24:41AM +0100, Toke Høiland-Jørgensen wrote:
> There's a package for Arch in the AUR:
> https://aur.archlinux.org/packages/babeld/
> 
> That also includes a systemd unit file:
> https://aur.archlinux.org/cgit/aur.git/tree/babeld.service?h=babeld

On Wed, Dec 09, 2015 at 06:55:38PM +0100, Juliusz Chroboczek wrote:
> > Type=forking
> > PIDFile=/run/babeld-%I.pid
> > ExecStart=/usr/bin/babeld -D -I /run/babeld-%I.pid -S 
> > /var/lib/babel-state-%I -c /etc/babeld-%I.conf %I
> 
> Please don't do that, Toke -- there's no need.  Please use "Type=simple",
> and remove -D and -I, which are only there to support System V init.

Good catch, thanks.  I have updated the systemd service file in the
Archlinux package to use Type=simple.

Is it possible to tell babeld *not* to write a PID file at all?  Passing
"-I /dev/null" does not work, babeld complains that the file already
exists.

This is necessary to use the "automatic restart in case of failure"
feature of systemd, using e.g. "restart=on-failure".  Currently, if babeld
crashes, it leaves its PID file in place, and categorically refuses to
start again.


signature.asc
Description: PGP signature
___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users

Re: [Babel-users] babeld and systemd [was: babeld wishlist]

2016-02-12 Thread Juliusz Chroboczek
> Is it possible to tell babeld *not* to write a PID file at all?

  babeld -I ''

Hmm, looks like it's not documented.


___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users


Re: [Babel-users] babeld and systemd [was: babeld wishlist]

2016-02-12 Thread Toke Høiland-Jørgensen
Baptiste Jonglez  writes:

> Thanks, that did the trick!  I have updated the service file to restart
> babeld automatically in case of failure, if somebody is interested:


Awesome! Any chance of also including a 'babeld@.service' file to easily
run babeld on a single interface without editing the configuration file? :)

-Toke

___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users


Re: [Babel-users] babeld and systemd [was: babeld wishlist]

2016-02-12 Thread Baptiste Jonglez
On Fri, Feb 12, 2016 at 01:21:49PM +0100, Juliusz Chroboczek wrote:
> > Is it possible to tell babeld *not* to write a PID file at all?
> 
>   babeld -I ''

Thanks, that did the trick!  I have updated the service file to restart
babeld automatically in case of failure, if somebody is interested:

  https://aur.archlinux.org/cgit/aur.git/tree/babeld.service?h=babeld

One slightly annoying "feature" is that babeld will be restarted several
times if it exits with a non-zero code, for instance if there is a syntax
error in the configuration file.  I don't think it is such a big deal,
though.

Baptiste


signature.asc
Description: PGP signature
___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users

Re: [Babel-users] babeld and systemd [was: babeld wishlist]

2015-12-09 Thread Juliusz Chroboczek
> Systemd is your friend!

It's more like family.  You can choose your friends.

-- Juliusz

___
Babel-users mailing list
Babel-users@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users