Bug 53737 - Add consistency check and backup for s4internal.sqlite
Add consistency check and backup for s4internal.sqlite
Status: NEW
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-09-01 18:21 CEST by Arvid Requate
Modified: 2021-09-01 18:32 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?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.023
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2021083121000367
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 Arvid Requate univentionstaff 2021-09-01 18:21:39 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.