Bug 50342 - S4-Connector: modernize UDM modules
S4-Connector: modernize UDM modules
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-2-errata
Assigned To: Florian Best
Arvid Requate
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-10 16:26 CEST by Florian Best
Modified: 2019-11-06 14:41 CET (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
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):
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-10-10 16:26:06 CEST
The UDM modules in the univention-s4-connector are not state of the art:

* DN's are build manually
* lookup and identify is explicit defined, without common error handling and filter replacement
* property default values are defined
* object classes are manually added into the addlist

A lot of code can be removed.
Comment 1 Florian Best univentionstaff 2019-10-10 16:29:10 CEST
univention-s4-connector (13.0.2-50)
3fd394f78e81 | Bug #50342: modernize UDM modules

univention-s4-connector.yaml
3fd394f78e81 | Bug #50342: modernize UDM modules
Comment 2 Arvid Requate univentionstaff 2019-10-10 21:20:12 CEST
Verified:
* Code review (identifies change in settings/mswmifilter looks ok)
* Advisory Ok
Comment 3 Felix Botner univentionstaff 2019-10-14 15:13:01 CEST
Please revert, this fails if there are older UCS systems, which do not support object.identify, e.g. appbox

Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 44, in <module>
    import univention.admincli.admin
  File "/usr/lib/pymodules/python2.7/univention/admincli/admin.py", line 56, in <module>
    univention.admin.modules.update()
  File "/usr/lib/pymodules/python2.7/univention/admin/modules.py", line 93, in update
    os.path.walk(dir, _walk, p)
  File "/usr/lib/python2.7/posixpath.py", line 239, in walk
    walk(name, func, arg)
  File "/usr/lib/python2.7/posixpath.py", line 231, in walk
    func(arg, top, names)
  File "/usr/lib/pymodules/python2.7/univention/admin/modules.py", line 78, in _walk
    m = __import__(mod, globals(), locals(), name)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/container/msgpo.py", line 162, in <module>
    identify = object.identify
AttributeError: type object 'object' has no attribute 'identify'


That is also the reason for the failed errata tests.
Comment 4 Florian Best univentionstaff 2019-10-14 15:32:39 CEST
Thanks!

I added backwards compatiblity:

univention-s4-connector (13.0.2-53)
8127ca3d27b6 | Bug #50342: add backwards compatibility for older UCS systems
Comment 5 Arvid Requate univentionstaff 2019-10-15 19:01:06 CEST
Code review: Ok
Jenkins tests: Ok

Felix and I also discussed this type of regression and designed a test setup scenario to generically check for issues that happen if a new server is installed and joined into an updated UCS master. Additionally we will probably also include a non-updated slave in that test setup to simulate a "real life" UCS domain life cycle.

The thing with these changes to LDAP-registered UDM modules is that they are only updated when a joinscript runs (either threw new installation, re-join or increased joinscript-version-number) on any system in the UCS domain that has the new package version installed. This may lead to surprising sudden change of behaviour at a point in time, where a couple of errata changes (that never actually got active) suddenly are rolled out domain wide.

Anyway, the changes for this bug are verified.
Comment 6 Florian Best univentionstaff 2019-10-15 23:06:13 CEST
Accidently commited one commmit with the wrong bug number:

univention-s4-connector (13.0.2-54)
c08c6c3b5df4 | Bug #50288: use "cn" instead of "msWMIID" as RDN component
Comment 7 Arvid Requate univentionstaff 2019-10-16 10:51:49 CEST
Commit c08c6c3b5df4: Ok
Advisory: Ok
Comment 8 Arvid Requate univentionstaff 2019-11-06 14:41:05 CET
<http://errata.software-univention.de/ucs/4.4/330.html>