Bug 44390 - OSError in setup/check/credentials wizard
OSError in setup/check/credentials wizard
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: AD Connector
UCS 4.2
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-18 12:31 CEST by Florian Best
Modified: 2020-07-03 20:51 CEST (History)
2 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?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 4: A User would return the product
User Pain: 0.274
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017041421000441, 2017062621000272, 2017102621000291
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (988 bytes, patch)
2017-09-04 16:01 CEST, Florian Best
Details | Diff
44390-adc-setup-oserror-422.patch (2.60 KB, patch)
2017-09-05 15:26 CEST, Lukas Oyen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2017-04-18 12:31:07 CEST
Version: 4.2-0 errata0 (Lesum)

Remark: Bonjour,
j'arrive pas joindre mon domaine qui est sur un systeme windows serveur 2012
Merci de m'aider

Échec de l'exécution de la commande « setup/check/credentials wizard » :

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 249, in execute
    function.__func__(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/setup/__init__.py", line 754, in check_credentials
    return util.check_credentials_ad(nameserver, address, username, password)
  File "%PY2.7%/univention/management/console/modules/setup/util.py", line 1105, in check_credentials_ad
    do_time_sync(address)
  File "%PY2.7%/univention/lib/admember.py", line 799, in do_time_sync
    close_fds=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] Aucun fichier ou dossier de ce type
Comment 1 Florian Best univentionstaff 2017-04-18 12:31:44 CEST
Google-Translator:

Hello,
I can not join my domain which is on a system windows server 2012
thank you for helping me
Comment 2 Florian Best univentionstaff 2017-04-24 15:22:41 CEST
It's probably a missing dependency in the univention.admember library.
Comment 3 Florian Best univentionstaff 2017-06-27 10:01:59 CEST
Reported again, 4.2-1 errata52 (Lesum)
(french version again).

Remark: Problem bei einer Neuinstallation als AD Mitglied
Comment 4 Arvid Requate univentionstaff 2017-06-27 12:25:45 CEST
rdate is not found in the path.
Comment 5 Florian Best univentionstaff 2017-06-27 12:32:45 CEST
(In reply to Arvid Requate from comment #4)
> rdate is not found in the path.
So it's just a missing dependency?
Comment 6 Arvid Requate univentionstaff 2017-06-27 12:46:56 CEST
> > rdate is not found in the path.
> So it's just a missing dependency?

Looks like

> Remark: Problem bei einer Neuinstallation als AD Mitglied

We should simply check that
Comment 7 Lukas Oyen univentionstaff 2017-08-23 13:46:40 CEST
I am unable to reproduce the exact error with UCS 4.2-1. But I definitely can
produce an error linked to a missing `rdate` binary. Steps to reproduce:

- apt-get remove rdate
- date --set='+10 minutes'
- Join in AD Member Mode

Error: Ein unerwarteter Fehler trat auf: 26univention-samba.inst failed

This leaves the system in a weird state: The Administrator password has changed
to the AD Administrator password, but the ADConnector-Module still provides the
setup wizard.

The function `do_time_sync()` is part of `univention-lib`, but the package
`python-univention-lib` does not specify a dependency to `rdate` or some package
that itself depends on `rdate` like one of the following packages that are
installed on a fresh UCS 4.2-1 with the ADConnector installed:

- univention-base-packages
- univention-role-server-common
- univention-system-setup

`univention-system-setup` "recommends" `rdate`, but does not require it. This
package (specifically `univention-management-console-module-setup`) contains the
function `check_credentials_ad()` which is used in the ADConnector setup wizard.

`univention-management-console-module-adconnector` has no dependency on
`univention-management-console-module-setup`. The following dependency chain
exists, but does not lead to a dependency on
`univention-management-console-module-setup` or `univention-management-console`.

univention-management-console-module-adconnector
 -> univention-management-console-server 
     -> python-univention-management-console

I can't make a good judgment if
`univention-management-console-module-adconnector` should directly depend on
`univention-management-console-module-setup` (instead of
`univention-management-console-server`) or if
`univention-management-console-server` should depend on
`univention-management-console-module-setup`.

`python-univention-lib` should `univention-base-packages` or at least `rdate`.

Please provide input.
Comment 8 Florian Best univentionstaff 2017-09-04 16:01:25 CEST
Created attachment 9168 [details]
patch

I would simply depend on rdate in python-univention-lib (base/univention-lib/python/admember.py) and univention-system-setup (base/univention-system-setup/usr/lib/univention-system-setup/scripts/40_ssl/10ssl).
Comment 9 Lukas Oyen univentionstaff 2017-09-05 14:34:51 CEST
(In reply to Florian Best from comment #8)
> I would simply depend on rdate in python-univention-lib
> (base/univention-lib/python/admember.py) and univention-system-setup
> (base/univention-system-setup/usr/lib/univention-system-setup/scripts/40_ssl/
> 10ssl).

You are right, adding a dependency on `rdate` do `python-univention-lib` solves this problem and we should do that.

But my research uncovered a second dependency problem. I might have not been clear enough:

Under the directory univention-system-setup/ is code, packaged as `univention-management-console-module-setup` (`univention-system-setup` does not depend on it) that is required by the AD-Connector Wizard.

But there is no dependency from 
`univention-management-console-module-adconnector` to `univention-management-console-module-setup` (or the parent package `univention-management-console`).

Either we let `univention-management-console-module-adconnector` depend on `univention-management-console-module-setup`.

Or we let `univention-management-console-server` depend on `univention-management-console-module-setup`. `univention-management-console-module-adconnector` already has a dependency on `univention-management-console-server`  so this would solve the problem by transitivity.
Comment 10 Florian Best univentionstaff 2017-09-05 14:39:05 CEST
(In reply to Lukas Oyen from comment #9)
> (In reply to Florian Best from comment #8)
> > I would simply depend on rdate in python-univention-lib
> > (base/univention-lib/python/admember.py) and univention-system-setup
> > (base/univention-system-setup/usr/lib/univention-system-setup/scripts/40_ssl/
> > 10ssl).
> 
> You are right, adding a dependency on `rdate` do `python-univention-lib`
> solves this problem and we should do that.
> 
> But my research uncovered a second dependency problem. I might have not been
> clear enough:
What are the effects from this dependency problem?

> Under the directory univention-system-setup/ is code, packaged as
> `univention-management-console-module-setup` (`univention-system-setup` does
> not depend on it) that is required by the AD-Connector Wizard.
Which code exactly?

> But there is no dependency from 
> `univention-management-console-module-adconnector` to
> `univention-management-console-module-setup` (or the parent package
> `univention-management-console`).
> 
> Either we let `univention-management-console-module-adconnector` depend on
> `univention-management-console-module-setup`.
Yes

> Or we let `univention-management-console-server` depend on
> `univention-management-console-module-setup`.
> `univention-management-console-module-adconnector` already has a dependency
> on `univention-management-console-server`  so this would solve the problem
> by transitivity.
No way. The UMC-Server doesn't have anything to do with it and should never depend on any module.
Comment 11 Lukas Oyen univentionstaff 2017-09-05 15:26:28 CEST
Created attachment 9175 [details]
44390-adc-setup-oserror-422.patch

(In reply to Florian Best from comment #10)
> What are the effects from this dependency problem?

`univention-management-console-module-setup` can be removed without removing `univention-management-console-module-adconnector`. The user can start the AD-Connector Wizard and it will fail.

> Which code exactly?

See comment 7: `check_credentials_ad()` (univention-system-setup/umc/python/setup/util.py) used in `check_credentials()` (univention-system-setup/umc/python/setup/__init__.py).


> > Either we let `univention-management-console-module-adconnector` depend on
> > `univention-management-console-module-setup`.
> Yes

Ok, see attachment.
Comment 12 Florian Best univentionstaff 2017-11-10 15:10:05 CET
Version: 4.2-2 errata52 (Lesum)

Remark: installation sour un serveur proxmox en VM à partir de l'iso
Comment 13 Ingo Steuwer univentionstaff 2020-07-03 20:51:05 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.