Bug 54775 - univention-domain-join: add support for Ubuntu 22.04.
Summary: univention-domain-join: add support for Ubuntu 22.04.
Status: CLOSED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: Univention Domain Join (Ubuntu)
Version: UCS 5.0
Hardware: Other Linux
: P5 normal
Target Milestone: UCS 5.0-2-errata
Assignee: Maximilian Janßen
QA Contact: Philipp Hahn
URL: https://git.knut.univention.de/univen...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-18 21:24 CEST by Dirk Ahrnke
Modified: 2024-07-24 10:31 CEST (History)
7 users (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID: 09711
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Ahrnke univentionstaff 2022-05-18 21:24:27 CEST
univention-domain-join needs to be ported to Ubuntu 22.04 LTS.
Comment 3 Florian Best univentionstaff 2022-05-20 12:45:45 CEST
A Patch / MR is available: https://git.knut.univention.de/univention/univention-domain-join/-/merge_requests/2
Join succeeded but the product tests haven't been completed with it yet.
Comment 5 Robert Heyer univentionstaff 2022-10-05 16:48:00 CEST
+ Request from customer > https://univention.plan.io/issues/40627
Comment 6 andreas@mibes.it 2022-10-07 13:19:24 CEST
https://univention.plan.io/issues/40627 (What login is needed?) 

Is there a way to access the Pull REquest, so i can be tested?
Comment 7 Philipp Hahn univentionstaff 2022-10-07 17:15:40 CEST
(In reply to andreas@mibes.it from comment #6)
> https://univention.plan.io/issues/40627 (What login is needed?)

This is an Univention internal system; sorry.

> Is there a way to access the Pull REquest, so i can be tested?

Next to updating the documentation there is currently only one change:
diff --git univention_domain_join/utils/domain.py univention_domain_join/utils/domain.py
index 0f1d836..2c3edd9 100644
--- univention_domain_join/utils/domain.py
+++ univention_domain_join/utils/domain.py
@@ -91,7 +91,7 @@ def get_ucs_domainname_of_dns_server():
 
 
 def get_nameservers():
-       output = subprocess.check_output(['systemd-resolve', '--status'])
+       output = subprocess.check_output(['resolvectl'])
 
        nameservers = set()
        last_line_was_dns_servers_line = False
Comment 9 Maximilian Janßen univentionstaff 2022-11-07 13:04:49 CET
univention-domain-join (1.0-28ubuntu1)
11d20648bb1d | Bug #54775: Add Ubuntu 22.04 support
Comment 11 Philipp Hahn univentionstaff 2022-11-10 12:43:58 CET
(In reply to Philipp Hahn from comment #7)
> diff --git univention_domain_join/utils/domain.py
> univention_domain_join/utils/domain.py>  def get_nameservers():
> -       output = subprocess.check_output(['systemd-resolve', '--status'])
> +       output = subprocess.check_output(['resolvectl'])

Only after publishing this update I noticed that the code is actually broken:
- `resolvectl` does not provide a stable API to be consumed by machines.
- Also the code handles multiple DNS servers wrong which are all listed one line, but the code tries to parse multiple lines
- <man:resolvectl(1)> will also return more than just IP addresses:

> Each address can optionally take a port number separated with ":", a network interface name or index separated with "%", and a Server Name Indication (SNI) separated with "#". When IPv6 address is specified with a port number, then the address must be in the square brackets.

> $ resolvectl dns ens3 10.207.208.139 8.8.8.8 9.9.9.9 ::1 [::1]:9%2#localhost
> $ resolvectl status>        DNS Servers: 10.207.208.139 8.8.8.8 9.9.9.9 ::1 [::1]:9#localhost

Patch available