Bug 43915 - Listener error while adding system to pkgdb
Listener error while adding system to pkgdb
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: pkgdb
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.2
Assigned To: Janek Walkenhorst
Stefan Gohmann
: interim-4
: 43889 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-16 19:35 CET by Stefan Gohmann
Modified: 2017-04-04 18:29 CEST (History)
0 users

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 Stefan Gohmann univentionstaff 2017-03-16 19:35:20 CET
The following traceback happens in my UCS 4.2 test environment. I've installed pkgdb on the DC master (USI at Bug #43887):

Traceback (most recent call last):
  File "/usr/sbin/univention-pkgdb-scan", line 37, in <module>
    univention.pkgdb.main()
  File "/usr/lib/pymodules/python2.7/univention/pkgdb.py", line 576, in main
    connection = open_database_connection(config_registry, pkgdbu=True)
  File "/usr/lib/pymodules/python2.7/univention/pkgdb.py", line 554, in open_database_connection
    connection_info['password'] = open(password_file, 'rb').read().rstrip('\n')
IOError: [Errno 2] No such file or directory: '/etc/postgresql/pkgdb.secret'
16.03.17 07:00:56.236  LISTENER    ( ERROR   ) : error while adding system=slave423$ to pkgdb
Comment 1 Janek Walkenhorst univentionstaff 2017-03-21 18:57:58 CET
When installing u-postgresql during the setup process, postgresql does not run because
 FATAL: konnte Shared-Memory-Segment »/PostgreSQL.1203232265« nicht öffnen: Die angeforderte Funktion ist nicht implementiert ... failed!
this is because shm_open tries to create the file under /dev/shm (or /run/shm?) which does not exist in the installer /dev. shm_open then falls back to /run which does not have the permissions to allow the user postgres to create files.

This then leads to postgresql not being available when creating the "pkgdbu" user.

I think /dev/shm should be available during the installation.
Comment 2 Janek Walkenhorst univentionstaff 2017-03-22 11:22:19 CET
*** Bug 43889 has been marked as a duplicate of this bug. ***
Comment 3 Janek Walkenhorst univentionstaff 2017-03-22 16:27:44 CET
univention-system-setup (10.0.10-1) unstable; urgency=medium

  * Bug #43915: Create /dev/shm if it is missing:
    POSIX shared memory objects are created (via shm_open) under /dev/shm or /run
    but /run is only writeable by root, therefore create /dev/shm as tmpfs with
    world-writeable permissions if it is missing
Comment 4 Stefan Gohmann univentionstaff 2017-03-24 06:11:29 CET
OK, it works. I've tested it with my latest test installation.

Please add a changelog entry.
Comment 5 Janek Walkenhorst univentionstaff 2017-03-24 16:53:08 CET
(In reply to Stefan Gohmann from comment #4)
> Please add a changelog entry.
r78309
Comment 6 Stefan Gohmann univentionstaff 2017-03-24 22:34:57 CET
(In reply to Janek Walkenhorst from comment #5)
> (In reply to Stefan Gohmann from comment #4)
> > Please add a changelog entry.
> r78309

OK
Comment 7 Stefan Gohmann univentionstaff 2017-04-04 18:29:31 CEST
UCS 4.2 has been released:
 https://docs.software-univention.de/release-notes-4.2-0-en.html
 https://docs.software-univention.de/release-notes-4.2-0-de.html

If this error occurs again, please use "Clone This Bug".