Activity log for bug #1888391

Date Who What changed Old value New value Message
2020-07-21 12:16:02 Steffan Karger bug added bug
2020-07-21 12:22:17 Steffan Karger description Running dhclient in a (non-root) network namespace on a system with systemd enabled fails because the hook installed by the systemd package updates the DNS configuration of the core/root namespace, instead of simply the /etc/resolv.conf file of that particular network namespace. ("ip netns add <name>" nicely links /etc/resolv.conf in that namespace to /etc/netns/<name>/resolv.conf if it exists.) The following patch ensures that this script no longer misbehaves for this scenario: --- /etc/dhcp/dhclient-enter-hooks.d/resolved.bak 2020-07-21 14:05:23.390989468 +0200 +++ /etc/dhcp/dhclient-enter-hooks.d/resolved 2020-07-21 14:03:18.566046842 +0200 @@ -14,7 +14,7 @@ # (D) = master script downs interface # (-) = master script does nothing with this -if [ -x /lib/systemd/systemd-resolved ] ; then +if [ -x /lib/systemd/systemd-resolved ] && [ -n "$(ip netns identify)" ] ; then # For safety, first undefine the nasty default make_resolv_conf() make_resolv_conf() { : ; } case "$reason" in Running dhclient in a (non-root) network namespace on a system with systemd enabled fails because the hook installed by the systemd package updates the DNS configuration of the core/root namespace, instead of simply the /etc/resolv.conf file of that particular network namespace. ("ip netns add <name>" nicely links /etc/resolv.conf in that namespace to /etc/netns/<name>/resolv.conf if it exists.) The following patch ensures that this script no longer misbehaves for this scenario: --- /etc/dhcp/dhclient-enter-hooks.d/resolved.bak 2020-07-21 14:05:23.390989468 +0200 +++ /etc/dhcp/dhclient-enter-hooks.d/resolved 2020-07-21 14:03:18.566046842 +0200 @@ -14,7 +14,7 @@  # (D) = master script downs interface  # (-) = master script does nothing with this -if [ -x /lib/systemd/systemd-resolved ] ; then +if [ -x /lib/systemd/systemd-resolved ] && [ -z "$(ip netns identify)" ] ; then          # For safety, first undefine the nasty default make_resolv_conf()          make_resolv_conf() { : ; }          case "$reason" in
2020-07-21 14:16:51 Dan Streetman tags dhclient network-namespace systemd dhclient network-namespace resolved-resolvconf systemd
2020-07-21 14:18:01 Dan Streetman bug added subscriber Dan Streetman
2022-05-22 20:54:55 Dan Streetman removed subscriber Dan Streetman
2024-02-23 22:04:27 Nick Rosbrook systemd (Ubuntu): status New Invalid
2024-02-24 13:32:56 Steffan Karger affects systemd (Ubuntu) isc-dhcp (Ubuntu)
2024-02-24 13:32:56 Steffan Karger isc-dhcp (Ubuntu): status Invalid New