[Bug 758879] New: NetworkManager doesn't write NTP servers provided by DHCP to netconfig
https://bugzilla.novell.com/show_bug.cgi?id=758879 https://bugzilla.novell.com/show_bug.cgi?id=758879#c0 Summary: NetworkManager doesn't write NTP servers provided by DHCP to netconfig Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: x86-64 OS/Version: openSUSE 12.1 Status: NEW Severity: Normal Priority: P5 - None Component: Network AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: suse+build@de-korte.org QAContact: qa-bugs@suse.de Found By: --- Blocker: --- Created an attachment (id=487784) --> (http://bugzilla.novell.com/attachment.cgi?id=487784) Actual NetworkManager.netconfig User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 The dynamic configuration of NTP servers is broken when NetworkManager is used. In the lease file, the 'ntp-servers' option is mentioned, but the value is not propagated in the /var/run/netconfig/NetworkManager.netconfig file in the NTPSERVERS variable. Therefor, when netconfig runs, the NTP_SERVER_LIST is always empty: # netconfig update -m ntp-runtime -v debug: lockfile created (/var/run/netconfig.pid) for PID 4152 debug: lockfile created debug: Module order: dns-resolver dns-bind dns-dnsmasq nis ntp-runtime debug: dns-resolver module skipped debug: dns-bind module skipped debug: dns-dnsmasq module skipped debug: nis module skipped debug: ntp-runtime Module called debug: Static Fallback debug: Use NetworkManager policy merged settings debug: exec get_ntp_settings: /var/run/netconfig/NetworkManager.netconfig debug: get_ntp_settings: NTP_SERVER_LIST='' debug: exit get_ntp_settings: /var/run/netconfig/NetworkManager.netconfig debug: write_ntp_servers: 194.109.22.18 debug: No changes for /var/run/ntp/servers-netconfig This causes netconfig to fallback to the NETCONFIG_NTP_STATIC_SERVERS, which is something I would like to avoid if DHCP suggests a NTP server (which most likely will have a much lower latency than any arbitrary one). Reproducible: Always Steps to Reproduce: 1. Configure 'option ntp-servers 192.168.1.10;' on the DHCP server (and restart DHCP server) 2. Set NETCONFIG_NTP_STATIC_SERVERS to something else on a client 3. Connect client through NetworkManager 4. Examine /var/run/netconfig/NetworkManager.netconfig on client Actual Results: NTPSERVERS is absent Expected Results: NTPSERVERS='192.168.1.10' -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=758879
https://bugzilla.novell.com/show_bug.cgi?id=758879#c1
--- Comment #1 from Arjen de Korte
https://bugzilla.novell.com/show_bug.cgi?id=758879
https://bugzilla.novell.com/show_bug.cgi?id=758879#c2
kk zhang
https://bugzilla.novell.com/show_bug.cgi?id=758879
https://bugzilla.novell.com/show_bug.cgi?id=758879#c3
Arjen de Korte
https://bugzilla.novell.com/show_bug.cgi?id=758879
https://bugzilla.novell.com/show_bug.cgi?id=758879#c
Arjen de Korte
https://bugzilla.novell.com/show_bug.cgi?id=758879
https://bugzilla.novell.com/show_bug.cgi?id=758879#c5
David Mair
https://bugzilla.novell.com/show_bug.cgi?id=758879
https://bugzilla.novell.com/show_bug.cgi?id=758879#c6
--- Comment #6 from David Mair
https://bugzilla.novell.com/show_bug.cgi?id=758879
https://bugzilla.novell.com/show_bug.cgi?id=758879#c7
--- Comment #7 from David Mair
https://bugzilla.novell.com/show_bug.cgi?id=758879
https://bugzilla.novell.com/show_bug.cgi?id=758879#c8
--- Comment #8 from David Mair
https://bugzilla.novell.com/show_bug.cgi?id=758879
https://bugzilla.novell.com/show_bug.cgi?id=758879#c9
David Mair
https://bugzilla.novell.com/show_bug.cgi?id=758879
https://bugzilla.novell.com/show_bug.cgi?id=758879#c10
David Mair
https://bugzilla.novell.com/show_bug.cgi?id=758879
https://bugzilla.novell.com/show_bug.cgi?id=758879#c11
--- Comment #11 from David Mair
https://bugzilla.novell.com/show_bug.cgi?id=758879
https://bugzilla.novell.com/show_bug.cgi?id=758879#c12
Ralf Habacker
Sorry for the incomplete filenames in comment #5. Every filename should be /var/run/netconfig/NetworkManager.netconfig
Looking at the NetworkManager-0.9.8.8 source (Factory). There's a write_to_netconfig() call for DNSSERVERS but no explicit one for NTPSERVERS.
In nm_dhcp_dhclient_create_config() in src/dhcp-manager/nm-dhcp-dhclient-utils.c there is:
add_also_request (alsoreq, "ntp-servers");
but I expect that to only populate the lease file. Then every cases of write_to_netconfig() is in src/dns-manager/nm-dns-manager.c All of them in dispatch_netconfig() which although it sounds generic enough to be more than just DNS configuration is called by update_dns().
Following it up through parent calls I guess that essentially device_state_changed() is incomplete in the case of NM_DEVICE_STATE_ACTIVATED. It has this comment:
/* Add device's new IPv4 and IPv6 configs to DNS */
and appears to update the /var/run/netconfig/NetworkManager.netconfig as if DNS was the only state netconfig could use from there when in fact if there was an ultimate addition of write_to_netconfig() of the NTPSERVERS variable this would be fixed.
The bug should be assigned to one of the current maintainers of NetworkManager.
and appears to update the /var/run/netconfig/NetworkManager.netconfig as if DNS was the only state netconfig could use from there when in fact if there was an ultimate addition of write_to_netconfig() of the NTPSERVERS variable this would be fixed.
The bug should be assigned to one of the current maintainers of NetworkManager.
The patch from https://bugzilla.novell.com/show_bug.cgi?id=798886 fixes exactly this issue. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=758879
https://bugzilla.novell.com/show_bug.cgi?id=758879#c13
--- Comment #13 from David Mair
participants (1)
-
bugzilla_noreply@novell.com