Univention Bugzilla – Bug 53737
Add consistency check and backup for s4internal.sqlite
Last modified: 2021-09-01 18:32:09 CEST
In the situation of Bug #53736 we also discovered that the S4-Connector was behaving in a strange way and univention-s4connector-list-rejected showed this traceback: ============================================================================ root@server:~/univention-support# univention-s4connector-list-rejected UCS rejected 1: UCS DN: cn=winsystem1,cn=server,cn=computers,ou=someou,dc=example,dc=org Traceback (most recent call last): File "/usr/sbin/univention-s4connector-list-rejected", line 162, in <module> main() File "/usr/sbin/univention-s4connector-list-rejected", line 135, in main s4_dn = univention.s4connector.s4.encode_attrib(s4.get_dn_by_ucs(dn)) File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 709, in get_dn_by_ucs return self.dn_mapped_to_base(dn, self.lo_s4.base) File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 523, in dn_mapped_to_base if dn.endswith(base): AttributeError: 'NoneType' object has no attribute 'endswith' ============================================================================ It turned out, that one of the sqilte databases was partly broken: ============================================================================ root@server:~/univention-support# sqlite3 /etc/univention/connector/s4internal.sqlite 'PRAGMA integrity_check;' *** in database main *** On tree page 905 cell 3: Rowid 204695 out of order On tree page 905 cell 2: Rowid 204790 out of order On tree page 900 cell 27: Rowid 204636 out of order ============================================================================ We should add these files to the backup and maybe also add a check (nagios, diagnostic, system-check, ...) for the consistency of the files.