[quagga-users 14013] Re: Running Multiple Instances of Quagga

Nicolas Dichtel nicolas.dichtel at 6wind.com
Wed Jun 17 14:40:42 BST 2015


Le 16/06/2015 16:28, Olivier Tilmans a écrit :
> Hello Jafar,
>
> If you don't have a 'main' process in the network namespace in charge of
> spawning all other processes for that namespace to which you can send
> command, then you will need to remount /var/run each time you issue an
> ip netns exec as mount namespaces are process-inherited.
>
> e.g.
> mkdir -p /tmp/newns/var/run
> ip netns add newns
> ip netns exec newns bash -c 'mount --bind /tmp/newns/var/run /var/run &&
> command_to_start_quagga'
> ## Later on ...
> ip netns exec newns bash -c 'mount --bind /tmp/newns/var/run /var/run &&
> vtysh'
>
> A less constraining solution would be to patch the daemons & vtysh to
> add a launch argument to specify to location of the vtysh socket ...
It is also possible to set the default path to
/etc/netns/<iproute2-netns-name>/var/run/ instead of /var/run/.
'ip netns exec foo command_to_start_quagga' will remount /etc/netns/foo to /etc/

It's a bit ugly, but it's simpler ;-)

Regards,
Nicolas



More information about the Quagga-users mailing list