Bug 55766 - univention-fetchmail-schema joinscript fails
univention-fetchmail-schema joinscript fails
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Mail
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-3-errata
Assigned To: Juan Carlos
Christian Castens
https://git.knut.univention.de/univen...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2023-02-28 15:30 CET by Christina Scheinig
Modified: 2023-03-08 16:36 CET (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.069
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2023022121000651
Bug group (optional): Regression
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christina Scheinig univentionstaff 2023-02-28 15:30:51 CET
After upgrading to fetchmail=6.3.26 the issue is not solved, but the next tracebacks occur on primary and memberserver:


server/role: domaincontroller_master
UCS: 5.0-3 errata594
Installed: dhcp-server=12.0 openvpn4ucs=2.0 pkgdb=11.0 samba4=4.16 self-service=5.0 self-service-backend=5.0 4.4/nextcloud=24.0.7-1
Upgradable: 

Join.log
RUNNING 92univention-fetchmail-schema.inst
2023-02-22 21:06:25.988786388+01:00 (in joinscript_init)
Object exists: cn=ldapschema,cn=univention,dc=example,dc=de
Object exists: cn=ldapacl,cn=univention,dc=example,dc=de
INFO: No change of core data of object univention-fetchmail.
INFO: No change of core data of object 58univention-fetchmail-schema.
No modification: cn=univention-fetchmail,cn=ldapschema,cn=univention,dc=example,dc=de

No modification: cn=58univention-fetchmail-schema,cn=ldapacl,cn=univention,dc=example,dc=de

Waiting for activation of the extension object univention-fetchmail: OK
Waiting for activation of the extension object 58univention-fetchmail-schema: OK
Object exists: cn=udm_syntax,cn=univention,dc=example,dc=de
INFO: No change of core data of object fetchmail.
Object modified: cn=fetchmail,cn=udm_syntax,cn=univention,dc=example,dc=de

Waiting for activation of the extension object fetchmail: OK
Waiting for file /usr/lib/python3/dist-packages/univention/admin/syntax.d/fetchmail.py: OK
Object exists: cn=udm_hook,cn=univention,dc=example,dc=de
INFO: No change of core data of object fetchmail.
No modification: cn=fetchmail,cn=udm_hook,cn=univention,dc=example,dc=de

Waiting for activation of the extension object fetchmail: OK
Waiting for file /usr/lib/python3/dist-packages/univention/admin/hooks.d/fetchmail.py: OK
Object exists: cn=mail,cn=custom attributes,cn=univention,dc=example,dc=de
Object exists: cn=FetchmailConfigSingle,cn=mail,cn=custom attributes,cn=univention,dc=example,dc=de
Create extended attribute univentionFetchmailSingle univentionFetchmailMulti
Object exists: cn=FetchmailConfigMulti,cn=mail,cn=custom attributes,cn=univention,dc=example,dc=de
Converting old fetchmail configuration...
Skip object with uid "Administrator". Already migrated or incomplete configuration
Traceback (most recent call last):
  File "/usr/share/univention-fetchmail/migrate-fetchmail.py", line 155, in <module>
    main()
  File "/usr/share/univention-fetchmail/migrate-fetchmail.py", line 150, in main
    c.main()
  File "/usr/share/univention-fetchmail/migrate-fetchmail.py", line 92, in main
    ret = self.convert()
  File "/usr/share/univention-fetchmail/migrate-fetchmail.py", line 123, in convert
    passwd[0] if passwd else get_pw_from_rc(file, attrs['uid'][0].decode('UTF-8')).encode('UTF-8'),
  File "/usr/share/univention-fetchmail/migrate-fetchmail.py", line 63, in get_pw_from_rc
    for line in lines:
TypeError: 'NoneType' object is not iterable

__JOINERR__:FAILED: /usr/lib/univention-install/92univention-fetchmail-schema.inst
EXITCODE=1
f1d7a80d-9eed-451e-8d3e-726bb09704ba
univention-join-hooks: looking for hook type "join/post-joinscripts" on primary.example.de

--------------------------

server/role: memberserver

UCS: 5.0-3 errata588
Installed: fetchmail=6.3.26 kopano-core=8.7.25.0-1 kopano-webapp=5.3.0.0-1 z-push-kopano=2.6.4 4.4/rocketchat=3.18.2
Upgradable: 

RUNNING 92univention-fetchmail-schema.inst
2023-02-22 21:22:08.562838062+01:00 (in joinscript_init)
Object exists: cn=ldapschema,cn=univention,dc=example,dc=de
Object exists: cn=ldapacl,cn=univention,dc=example,dc=de
INFO: No change of core data of object univention-fetchmail.
INFO: No change of core data of object 58univention-fetchmail-schema.
No modification: cn=univention-fetchmail,cn=ldapschema,cn=univention,dc=example,dc=de

No modification: cn=58univention-fetchmail-schema,cn=ldapacl,cn=univention,dc=example,dc=de

Waiting for activation of the extension object univention-fetchmail: OK
Waiting for activation of the extension object 58univention-fetchmail-schema: OK
Object exists: cn=udm_syntax,cn=univention,dc=example,dc=de
INFO: No change of core data of object fetchmail.
Object modified: cn=fetchmail,cn=udm_syntax,cn=univention,dc=example,dc=de

Waiting for activation of the extension object fetchmail: OK
Waiting for file /usr/lib/python3/dist-packages/univention/admin/syntax.d/fetchmail.py: OK
Object exists: cn=udm_hook,cn=univention,dc=example,dc=de
INFO: No change of core data of object fetchmail.
No modification: cn=fetchmail,cn=udm_hook,cn=univention,dc=example,dc=de

Waiting for activation of the extension object fetchmail: OK
Waiting for file /usr/lib/python3/dist-packages/univention/admin/hooks.d/fetchmail.py: OK
Object exists: cn=mail,cn=custom attributes,cn=univention,dc=example,dc=de
Object exists: cn=FetchmailConfigSingle,cn=mail,cn=custom attributes,cn=univention,dc=example,dc=de
Create extended attribute univentionFetchmailSingle univentionFetchmailMulti
Object exists: cn=FetchmailConfigMulti,cn=mail,cn=custom attributes,cn=univention,dc=example,dc=de
Traceback (most recent call last):
  File "/usr/share/univention-fetchmail/migrate-fetchmail.py", line 155, in <module>
    main()
  File "/usr/share/univention-fetchmail/migrate-fetchmail.py", line 150, in main
    c.main()
  File "/usr/share/univention-fetchmail/migrate-fetchmail.py", line 91, in main
    self.get_ldap()
  File "/usr/share/univention-fetchmail/migrate-fetchmail.py", line 97, in get_ldap
    self.access, self.position = univention.admin.uldap.getAdminConnection()
  File "/usr/lib/python3/dist-packages/univention/admin/uldap.py", line 161, in getAdminConnection
    lo = univention.uldap.getAdminConnection(start_tls, decode_ignorelist=decode_ignorelist)
  File "/usr/lib/python3/dist-packages/univention/uldap.py", line 124, in getAdminConnection
    bindpw = open('/etc/ldap.secret').read().rstrip('\n')
FileNotFoundError: [Errno 2] No such file or directory: '/etc/ldap.secret'

__JOINERR__:FAILED: /usr/lib/univention-install/92univention-fetchmail-schema.inst


+++ This bug was initially created as a clone of Bug #55681 +++

The 13.0.5-1 update of univention-fetchmail adds some files like /usr/share/univention-fetchmail/syntax.d/fetchmail.py or /usr/share/univention-fetchmail/hooks.d/fetchmail.py that are installed by the univention-fetchmail package but used in the univention-fetchmail-schema joinscript. 

This causes an error in the joinscript execution for installations or updates where the univention-fetchmail-schema package is installed alone on a primary or backup and the univention-fetchmail one is installed in a member or slave.
Comment 1 Juan Carlos univentionstaff 2023-03-07 10:59:24 CET
Changes:

The migration scripts checks if the /etc/fetchmailrc exists.
Non primary servers use the correct credentials to connect to LDAP in the migration script. 

Package:

Package: univention-fetchmail
Version: 13.0.5-4A~5.0.0.202303071052
Branch: ucs_5.0-0
Scope: errata5.0-3

Commits:

a1fc455e8bb9 | Bug #55766: changelog and advisory
ac9263d8da31 | Bug #55766: Fix univention-fetchmail-schema joinscript execution
Comment 2 Christian Castens univentionstaff 2023-03-07 11:13:55 CET
QA:
Both reported errors do not occur anymore: OK
yaml/changelog: OK