0

I need badly a better way to refresh dnsmasq configuration than in How to let built-in DHCP assign a static IP to LXC container based on name, not MAC address . I cannot afford restarting all containers all the time when I add another one.

IMO The most proper way of solving it is to redesign the /etc/init/lxc-net.conf upstart job, so it doesn't handle both lxc bridge and dnsmasq.

The problem would be fairly simple if dnsmasq was compatible with upstart in a sense that it could work with either expect daemon, expect fork or without any expect stanza.

dnsmasq provides a way of giving the pid of its process - if only there was a way to forward this information to upstart...

For the record, the init script for the dnsmasq package itself is not ported to upstart yet.

1 Answers1

0

You can use the Upstart job and shell scripts in this repository: https://github.com/CameronNemo/lxc-net.

To restart dnsmasq without tearing down the bridge, simply use the restart command (do not use stop then start, that will tear down the bridge).

Note that you will need to migrate your configs from /etc/default/lxc-net to /etc/lxc-net.

CameronNemo
  • 1,675