Univention Bugzilla – Bug 49724
requires the use of NetworkManager even on servers
Last modified: 2019-06-25 09:58:07 CEST
At the moment the assistant assumes that NetworkManager is used and fails otherwise. If it isn't installed, an obscure Python backtrace is produced as shelling out to nm-cli fails, and afterwards certain Python variables don't contain what the developers assumed they contain: root@ubuntu-bionic:~# univention-domain-join-cli --username=administrator --password=linet123 --skip-login-manager --master-ip=10.199.104.110 An error occurred. Please check /var/log/univention/domain-join-cli.log for more information. Log file: 2019-06-25 07:37:00,963 userinfo CRITICAL An error occurred. Please check /var/log/univention/domain-join-cli.log for more information. 2019-06-25 07:37:00,964 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 If it is installed but not used (e.g. because network configuration is done via netplan.io or /etc/network/interfaces for older versions), DNS configuration and with it domain join fails even if the admin has already configured DNS to point to the UCS DC Master: root@ubuntu-bionic:~# univention-domain-join-cli --username=administrator --password=linet123 --skip-login-manager --master-ip=10.199.104.110 dpkg: warning: failed to open configuration file '/root/.dpkg.cfg' for reading: Permission denied Warning: /etc/ldap/ldap.conf already exists. Warning: /etc/krb5.conf already exists. Created a backup of all configuration files, that will be modified at '/var/univention-backup/20190625073915_domain-join'. dpkg: warning: failed to open configuration file '/root/.dpkg.cfg' for reading: Permission denied An error occurred. Please check /var/log/univention/domain-join-cli.log for more information. Log file: 2019-06-25 07:39:15,293 userinfo WARNING Warning: /etc/ldap/ldap.conf already exists. 2019-06-25 07:39:15,306 userinfo WARNING Warning: /etc/krb5.conf already exists. 2019-06-25 07:39:15,306 userinfo INFO Created a backup of all configuration files, that will be modified at '/var/univention-backup/20190625073915_domain-join'. 2019-06-25 07:39:15,330 userinfo CRITICAL An error occurred. Please check /var/log/univention/domain-join-cli.log for more information. 2019-06-25 07:39:15,330 debugging CRITICAL Traceback (most recent call last): File "/usr/sbin/univention-domain-join-cli", line 195, in <module> distribution_joiner.join_domain() File "/usr/lib/python2.7/dist-packages/univention_domain_join/distributions/ubuntu.py", line 95, in join_domain DnsConfigurator(self.nameservers, self.domain).configure_dns() File "/usr/lib/python2.7/dist-packages/univention_domain_join/utils/general.py", line 40, in root_wrapper return_value = func(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/univention_domain_join/join_steps/dns_configurator.py", line 75, in configure_dns self.working_configurator.configure_dns(self.nameservers, self.domain) File "/usr/lib/python2.7/dist-packages/univention_domain_join/utils/general.py", line 40, in root_wrapper return_value = func(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/univention_domain_join/join_steps/dns_configurator.py", line 169, in configure_dns raise DnsConfigurationException() DnsConfigurationException 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.
Thanks for the report, we already have a bug about the missing dependency with bug 49103. I will mark this as a duplicate and transfer your suggestions. *** This bug has been marked as a duplicate of bug 49103 ***