Univention Bugzilla – Bug 38330
Query DNS configuration automatically via DHCP, as well
Last modified: 2015-07-16 14:24:39 CEST
We received the feedback that the DNS server needs to be configured manually when using DHCP. It would be nice to automatically use the DNS information sent via DHCP.
The DNS information can be accessed by JavaScript, and when querying DHCP information, this is already sent to JavaScript, as well, in the following format (executing on a VirtualBox VM): domainname: "knut.univention.de" is_ucs_nameserver_1: false nameserver_1: "10.0.3.3" nameserver_2: "" nameserver_3: "" gateway: "10.0.3.2" eth1_ip: "10.0.3.15" eth1_broadcast: "10.0.3.255" eth1_netmask: "255.255.255.0" Currently, the code only uses the DHCP nameserver if it is a UCS nameserver. This logic should probably be adapted.
(In reply to Alexander Kläser from comment #1) > Currently, the code only uses the DHCP nameserver if it is a UCS nameserver. > This logic should probably be adapted. The code is btw. already used in the normal 'networks' module.
I made the following adjustments to address this issue + some related usability aspects: * If DHCP is preconfigured and if no link local DHCP fallback address is set, an initial DHCP requests is sent right at the start of the setup wizard. This is needed in order to gain the DHCP nameserver address. As the requests will run in the background, the user will probably not notice it. If the requests still run when entering the network page, a spinning animation is shown until the requests are finished (similar to issuing a new DHCP request manually). BTW... this adjustment also fixes Bug 37938. * From the backend code I removed the check whether the DHCP nameserver is a UCS nameserver, as this will slow down the DHCP request and as this will by checked anyways when choosing to join into a UCS domain. * As a usability goodie, I added a check that makes sure that the network settings are not applied a second time (when clicking 'next') if the have not changed (via comparing all widget values from the network page). univention-system-setup (8.1.69-16): r61873 | Bug #38330: Use DHCP nameserver if given 2015-07-03-univention-system-setup.yaml: r61875 | Bug #38330: added YAML entry
*** Bug 37938 has been marked as a duplicate of this bug. ***
*** Bug 38816 has been marked as a duplicate of this bug. ***
OK - initial DHCP requests OK - removed the check whether the DHCP nameserver is a UCS nameserver OK - makes sure that the network settings are not applied a second time OK - debian/changelog r62043 Adapted package nr for yaml file
(In reply to Alexander Kläser from comment #3) > I made the following adjustments to address this issue + some related > usability aspects: > > * If DHCP is preconfigured and if no link local DHCP fallback address is > set, an initial DHCP requests is sent right at the start of the setup > wizard. My system with a link local address (169.254.255.255) also triggers a initial DHCP request.
(In reply to Alexander Kramer from comment #7) > My system with a link local address (169.254.255.255) also triggers a > initial DHCP request. Oops, I have overseen a JS return statement in the array.forEach() loop. Fixed. Packages are building. [UCS 4.0-2] univention-system-setup (8.1.69-21): r62106 | Bug #38330: adjust wrong return statement in ApplianceWizard method [UCS 4.1-0] univention-system-setup (8.1.69-21): r62107 | Bug #38330: adjust wrong return statement in ApplianceWizard method
(In reply to Alexander Kramer from comment #6) > OK - initial DHCP requests > OK - removed the check whether the DHCP nameserver is a UCS nameserver > OK - makes sure that the network settings are not applied a second time > > OK - debian/changelog > > r62043 > Adapted package nr for yaml file OK - no initial request if a link local address is set OK - also works with multiple interfaces OK - debian/changelog 4.0-2 OK - yaml file 4.0-2 OK - changes merged to 4.1-0 OK - debian/changelog 4.1-0
<http://errata.univention.de/ucs/4.0/243.html>