Bug 46202 - Try to determine the domain of the client in more ways
Try to determine the domain of the client in more ways
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Univention Domain Join (Ubuntu)
UCS 4.3
Other Linux
: P5 enhancement (vote)
: UCS 4.3-0-errata
Assigned To: Richard Ulmer
Arvid Requate
:
Depends on: 35981
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-31 13:12 CET by Richard Ulmer
Modified: 2018-05-02 15:41 CEST (History)
8 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?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): External feedback, Roadmap discussion (moved)
Max CVSS v3 score:


Attachments
All debian packages needed for the QA (75.23 KB, application/gzip)
2018-03-16 11:23 CET, Richard Ulmer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Ulmer univentionstaff 2018-01-31 13:12:18 CET
Currently the GUI and CLI try to determine the domain of the client using the python function `socket.getfqdn()`. This will only work if the domain name for the client is configured correctly.

To improve the usability it should also be tried to find the domain by asking the DNS server for the client's FQDN and if that doesn't work use the FQDN of the DNS sever itself to determine the domain name.
Comment 1 Richard Ulmer univentionstaff 2018-02-07 12:03:24 CET
The tool will now try to detect the domain name via reverse DNS. If that doesn't work it will try to find the domain of the set DNS server and check if that is an UCS domain.

When trying to find the domain name of the set DNS server, the DNS server will be determined by looking at the configuration files of the NetworkManager at /etc/NetworkManager/system-connections/ .

Commit 7a87330ef3356cdfa3fb9c53bd779be98adc6b0f
Comment 2 Arvid Requate univentionstaff 2018-02-22 19:13:47 CET
Ok, cool, this works. I've sent you a proposal for some technical improvement, but the feature in implemented and form this side I have no objections to merge the code so an updated version can be uploaded.

Please consider my proposal though at some point, so that we can upload a final technically polished version.
Comment 3 Arvid Requate univentionstaff 2018-02-22 19:18:58 CET
Sorry, my wording was weird: The code is "merged", we should just build, sign and upload an updated package. After that please pursue the technical comment sent via email.
Comment 4 Arvid Requate univentionstaff 2018-03-05 11:18:54 CET
*** Bug 46285 has been marked as a duplicate of this bug. ***
Comment 5 Richard Ulmer univentionstaff 2018-03-16 11:17:59 CET
I have now implemented the technical changes Arvid sent me.

In git these tags indicate the updated state for this change:
1.0-5ubuntu1 -> Ubuntu 17.10
1.0-5ubuntu2 -> Ubuntu 16.04
1.0-5ubuntu3 -> Ubuntu 14.04

7932310c8e51 | Bug #46202: Add changelog entry
4fdd063284fa | Bug #46202: Add changelog entry
3cacee1d11fc | Bug #46202: Add changelog entry
e411620eab49 | Bug #46202: Add changelog entry
9beb2b281e7c | Bug #46202: Add dependency for nmcli
e543b593ad6a | Bug #46202: Remove code, that is unnecessary for Ubuntu 16.04
688365868bce | Bug #46202: Adapt code for DNS server detection for Ubuntu 14.04
69d37ce9b346 | Bug #46202: Add dependency for nmcli
c93c32ea406a | Bug #46202: Remove code, that is unnecessary for Ubuntu 16.04
5767c4965bab | Bug #46202: Remove code, that is unnecessary for Ubuntu 17.10
24deaf63b04d | Bug #46202: Save work with systemd-resolve and nmcli
Comment 6 Richard Ulmer univentionstaff 2018-03-16 11:23:12 CET
Created attachment 9475 [details]
All debian packages needed for the QA
Comment 7 Arvid Requate univentionstaff 2018-03-27 18:53:45 CEST
You now made the Debian package depend on network-manager but that should not be necessary. The tool should detect if systemd-resolve can be used, and if not it should fall back to nmcli, if present.
Comment 8 Richard Ulmer univentionstaff 2018-04-09 10:26:01 CEST
To simplify the code I have left out the check whether systemd-resolve or nmcli should be used.

Instead I used my knowledge about the Ubuntu versions and included the dependency for network-manager (which brings nmcli with it) only for Ubuntu 16.04 and Ubuntu 14.04, which do not use systemd-resolve.

The package for Ubuntu 17.10 does not depend on the network-manager package and uses systemd-resolve.
Comment 9 Arvid Requate univentionstaff 2018-04-26 17:07:08 CEST
Ok, works
Comment 10 Arvid Requate univentionstaff 2018-05-02 15:41:47 CEST
Published as version 1.0-11:
 https://launchpad.net/~univention-dev/+archive/ubuntu/ppa