Skip to content

th/dhcp-client-id-mac-rh1640494

Thomas Haller requested to merge th/dhcp-client-id-mac-rh1640494 into master

See https://bugzilla.redhat.com/show_bug.cgi?id=1640494

Also:

Originally, the idea was to enable a "match-kernel-command-line" option, like ConditionKernelCommandLine= in man systemd.unit. It would optionally enable configuration snippets based on /proc/cmdline. And, then we would install a configuration snippet that resets the default for the DHCP client ID to "mac", based on the presence of some boot option. This feature, may or may not be interesting in its own right. Note, the user may also be able to simulate this, by installing a Before=NetworkManager.conf service (with ConditionKernelCommandLine=), which writes a configuration snippet to /var/run/NetworkManager/conf.d.

Anyway, an alternative solution is now proposed there:

instead, let NetworkManager-config-server package carry a configuration snippet which specifies the client-id default.

However, note NetworkManager ends up using the dhclient DHCP plugin (main.dhcp=dhclient), then dhclient can have defaults configured in /etc/dhcp. Naively specifying the default in a configuration snippet (which we would always install on servers), would also overwrite the dhclient configuration, which is problematic. So, we actually only want to change the default when using the internal DHCP client. For that, this approach needs another new feature: dhcp-plugin match.

Merge request reports