Univention Bugzilla – Bug 49103
Univention Domain Join crashes if NetworkManager is not installed (e.g. servers and Ubuntu ≥ 18.04)
Last modified: 2020-03-12 13:33:44 CET
Reported in: https://help.univention.com/t/ubuntu-server-18-10-domain-join-fails/11375/2 sudo /usr/sbin/univention-domain-join-cli --skip-login-manager 2019-03-02 12:22:36,298 userinfo CRITICAL An error occurred. Please check /var/log/univention/domain-join-cli.log for more information. 2019-03-02 12:22:36,302 debugging CRITICAL [Errno 2] No such file or directory Traceback (most recent call last): File "/usr/sbin/univention-domain-join-cli", line 194, in <module> distribution_joiner.create_backup_of_config_files() File "/usr/lib/python2.7/dist-packages/univention_domain_join/distributions/ubuntu.py", line 78, in create_backup_of_config_files DnsConfigurator(self.nameservers, self.domain).backup(backup_dir) File "/usr/lib/python2.7/dist-packages/univention_domain_join/join_steps/dns_configurator.py", line 65, in __init__ if DnsConfiguratorNetworkManager().works_on_this_system(): File "/usr/lib/python2.7/dist-packages/univention_domain_join/join_steps/dns_configurator.py", line 144, in works_on_this_system stdout=subprocess.PIPE, stderr=subprocess.PIPE File "/usr/lib/python2.7/subprocess.py", line 394, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory The code tries to call: /usr/bin/nmcli There is no dependency on network-manager in the package.
We support Ubuntu LTS versions, so this will be addressed for the next LTS release (Ubuntu 20.04).
*** Bug 49724 has been marked as a duplicate of this bug. ***
Info from duplicate Bug #49724: This is a real drawback for server installations where NetworkManager usually isn't used at all. On current Ubuntu (≥ 18.04) netplan.io is more likely to be used, and traditional /etc/network/interfaces on older Ubuntus/Debians. Suggestions how to fix this from the PoV of an administrator: 1. Add auto-detection for other types of network configuration management, at least the most common ones on the supported platforms 2. Add command-line options overriding the auto-detection mechanism telling the assistant to configure network configuration management type XYZ 3. Add a command-line option disabling DNS configuration (with an appropriate warning message that the admin has to set up DNS to point to the UCS DC Master manually) The best option from the PoV of admins would be 1 + 3, obviously, but just as obviously that'd also require the most amount of work. I'd be fine with just 3 for the time being. At the moment the only workaround is to modify the assistant's source code, disabling the whole DNS configuration. I'd rather not have to do that, and admins who aren't at least hobby-level Python programmers surely share that sentiment.
"3. Add a command-line option disabling DNS configuration (with an appropriate warning message that the admin has to set up DNS to point to the UCS DC Master manually)" Normally as administrator I want to use DHCP to distribute the correct DNS server to my clients. So at least the default behavior of the join tool should be IMO not to change the DNS configuration.
Adding to that "DNS set via DHCP" comment: another scenario is having multiple sites with local UCS DCs (e.g. DC Slaves). In such a case the admin probably wants the clients to use the local DNS server, a DC Slave. However, the assistant insists on configuring the DC Master as the DNS server. One way to handle this might be searching the LDAP for all DCs and trying to match the local network address to the addresses of all DCs found, then trying DNS against those local DCs and using one of them if they provide the DNS information required. My preferred way as an admin, to be honest, would be not to modify DNS by default, and to provide two CLI switches: one for attempted DNS auto-configuration and one for manually specifying the DNS server to use.
*** Bug 49759 has been marked as a duplicate of this bug. ***
Same issue with Ubuntu 18.04.3 LTS (which is a supported LTS afaik)