Bug 49103 - Univention Domain Join crashes if NetworkManager is not installed (e.g. servers and Ubuntu ≥ 18.04)
Univention Domain Join crashes if NetworkManager is not installed (e.g. serve...
Status: NEW
Product: UCS
Classification: Unclassified
Component: Univention Domain Join (Ubuntu)
UCS 4.4
Other Linux
: P5 normal with 2 votes (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
: 49724 49759 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-03-26 13:33 CET by Florian Best
Modified: 2020-03-12 13:33 CET (History)
8 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 6: Setup Problem: Issue for the setup process
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2019030821000441
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2019-03-26 13:33:59 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.
Comment 1 Ingo Steuwer univentionstaff 2019-05-28 14:52:09 CEST
We support Ubuntu LTS versions, so this will be addressed for the next LTS release (Ubuntu 20.04).
Comment 2 Erik Damrose univentionstaff 2019-06-25 09:58:07 CEST
*** Bug 49724 has been marked as a duplicate of this bug. ***
Comment 3 Erik Damrose univentionstaff 2019-06-25 09:58:51 CEST
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.
Comment 4 Stefan 2019-06-26 21:34:02 CEST
"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.
Comment 5 Moritz Bunkus 2019-06-27 09:05:02 CEST
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.
Comment 6 Philipp Hahn univentionstaff 2019-06-28 16:24:40 CEST
*** Bug 49759 has been marked as a duplicate of this bug. ***
Comment 7 Megachip 2020-03-12 13:33:44 CET
Same issue with Ubuntu 18.04.3 LTS (which is a supported LTS afaik)