Bug 52764 - dbm.error: db type could not be determined
dbm.error: db type could not be determined
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: Jürn Brodersen
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-02-10 14:21 CET by Florian Best
Modified: 2022-04-29 14:42 CEST (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 2021-02-10 14:21:32 CET
During the upgrade to UCS 5.0 job, the exception is logged:

4 times in /var/log/univention/management-console-web-server.log.1.gz:
https://jenkins.knut.univention.de:8181/job/UCS-5.0/job/UCS-5.0-0/job/AutotestUpgrade/SambaVersion=no-samba,Systemrolle=master/ws/test/management-console-web-server.log.1.gz

Traceback (most recent call last):
  File "/usr/sbin/univention-management-console-web-server", line 1207, in reload
    cls.SP = Saml2Client(config_file=cls.configfile, identity_cache=cls.identity_cache % (PORT,), state_cache=cls.state_cache)
  File "/usr/lib/python3/dist-packages/saml2/client_base.py", line 108, in __init__
    self.users = Population(identity_cache)
  File "/usr/lib/python3/dist-packages/saml2/population.py", line 13, in __init__
    self.cache = Cache(cache)
  File "/usr/lib/python3/dist-packages/saml2/cache.py", line 27, in __init__
    self._db = shelve.open(filename, writeback=False, protocol=2)
  File "/usr/lib/python3.7/shelve.py", line 243, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/lib/python3.7/shelve.py", line 227, in __init__
    Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
  File "/usr/lib/python3.7/dbm/__init__.py", line 88, in open
    raise error[0]("db type could not be determined")
dbm.error: db type could not be determined
Comment 1 Jürn Brodersen univentionstaff 2021-02-17 17:22:39 CET
This breaks saml after the 4.4->5.0 update:

For example:
https://jenkins.knut.univention.de:8181/job/UCS-5.0/job/UCS-5.0-0/job/AutotestUpgrade/SambaVersion=no-samba,Systemrolle=master/lastCompletedBuild/testReport/82_saml/04_saml_login/master070/

python3 changed the backend db for shelves and can by default not read python2 shelves.
Since umc-server and umc-web-server are restarted during the update, I don't see any reason not to just delete the old saml session cache.
Comment 2 Jürn Brodersen univentionstaff 2021-02-17 17:41:42 CET
[5.0-0 3031338ed0] Bug #52764: fix saml login after UCS 5.0 upgrade
[5.0-0 73d6efd679] Bug #52764: changelog
Comment 3 Florian Best univentionstaff 2021-02-19 21:02:44 CET
OK: removal of database
OK: Jenkins Tests are repaired
OK: changelog entry
Comment 4 Florian Best univentionstaff 2021-05-25 16:03:20 CEST
UCS 5.0 has been released:
 https://docs.software-univention.de/release-notes-5.0-0-en.html
 https://docs.software-univention.de/release-notes-5.0-0-de.html

If this error occurs again, please use "Clone This Bug".
Comment 5 Florian Best univentionstaff 2022-04-29 14:42:20 CEST
To fix the problem execute `rm -f /var/cache/univention-management-console/saml-*.bdb`