[systemd-devel] Changing configurations with networkd
Brendan Hide
brendan at swiftspirit.co.za
Thu Jul 24 05:02:49 PDT 2014
On 24/07/14 10:49, Tom Gundersen wrote:
> On Thu, Jul 24, 2014 at 10:16 AM, Michael Olbrich
> <m.olbrich at pengutronix.de> wrote:
>> On Wed, Jul 23, 2014 at 04:46:26PM +0200, Marcel Holtmann wrote:
>>>
>>> There is no mandate that the server has to give you the same address
>>> after 10 minutes when you ask again. It is valid to just get a different one.
>>> And that many home routers try to give you back the same one does not mean
>>> that they are required to do so.
[snip]
>>
>> What is causing your DHCP server to send out a different
>> IP address later on, I don't know, but it seems unlikely that this is
>> anything we can fix in the client.
As Marcel says, the DHCP server behaviour of giving a different IP is perfectly normal behaviour. Once the lease is expired the DHCP server's only obligation is to give a "valid" config - it doesn't have to be the same. Based on the information given, networkd isn't taking the right action.
A peripheral issue with this thread is that I don't see any mention of a "reload" option. A graceful zero-to-minimal-downtime "reload" should cater for Michael's use-case of manual changes to the "static" config files. Of course I haven't checked if this is already supported. ;)
I see a couple of choices here with regards to the restart/stop-start situation:
a) What *seems* to be the direction in this thread: Don't tear down, save the state, re-attempt same lease (keeps config functional when the daemon is stopped; not standards-compliant; doesn't fit with previous paradigms)
b) tear down on stop, save state, rebuild on start (robust; less "musical chairs"; downtime)
Technically I see b) as the right choices. The reasoning to me is twofold:
1) The alternative would violate standards: A DHCP lease might end after the daemon has stopped and the network is not going to automatically deconfigure. For static configs this is less of an issue.
2) The "standard" paradigm for most (all?) of the network{,ing} services for any current or previous *nix I've seen is that a stop or restart tears down the configuration.
--
__________
Brendan Hide
http://swiftspirit.co.za/
http://www.webafrica.co.za/?AFF1E97
More information about the systemd-devel
mailing list