Bug 51937 - Domain Join Client interrupt with traceback if /etc/X11/default-display-manager does not exist
Domain Join Client interrupt with traceback if /etc/X11/default-display-manag...
Status: NEW
Product: UCS
Classification: Unclassified
Component: Univention Domain Join (Ubuntu)
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-09-02 16:04 CEST by Dirk Schnick
Modified: 2020-09-02 16:53 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.011
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2020072221000422
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schnick univentionstaff 2020-09-02 16:04:53 CEST
This will happen really rarely, but happened in a customer environment that uses opsi. The customer changes the default X environment after installation of the client PC and opsi seems to trigger this action simultaneous to the domain-join script. We should improve our script to prevent a traceback. The logfile:

2020-09-02 12:24:39,018 userinfo CRITICAL An error occurred: [Errno 2] No such file or directory: '/etc/X11/default-display-manager'. Please check /var/log/univention/domain-join-cli.log for more information.
2020-09-02 12:24:39,018 debugging CRITICAL [Errno 2] No such file or directory: '/etc/X11/default-display-manager'
Traceback (most recent call last):
  File "/usr/sbin/univention-domain-join-cli", line 187, in <module>
    distribution_joiner.check_if_join_is_possible_without_problems()
  File "/usr/lib/python3/dist-packages/univention_domain_join/distributions/ubuntu.py", line 76, in check_if_join_is_possible_without_problems
    if not self.skip_login_manager and LoginManagerConfigurator().configuration_conflicts():
  File "/usr/lib/python3/dist-packages/univention_domain_join/join_steps/login_manager_configurator.py", line 46, in configuration_conflicts
    login_manager = self.determin_used_login_manager()
  File "/usr/lib/python3/dist-packages/univention_domain_join/join_steps/login_manager_configurator.py", line 59, in determin_used_login_manager
    with open('/etc/X11/default-display-manager', 'r') as login_manager_file:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/X11/default-display-manager'

I'm not sure if we should go on if the file does not exists or if we stop the join, as it is from my point of view no good idea to do other things on a machine simultaneous to the join. If we will stop, we should print a clear message instead of running into a traceback.