Description of problem: After a fresh installation of postgresql9.3-server on Mageia 4: [doktor5000@Mageia4 ~]$ systemctl status postgresql.service postgresql.service - PostgreSQL database server Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled) Active: inactive (dead) [doktor5000@Mageia4 ~]$ sudo systemctl start postgresql.service Job for postgresql.service failed. See 'systemctl status postgresql.service' and 'journalctl -xn' for details. [doktor5000@Mageia4 ~]$ systemctl status postgresql.service postgresql.service - PostgreSQL database server Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled) Active: failed (Result: exit-code) since So 2014-04-20 14:20:01 CEST; 8s ago Process: 23375 ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o -p ${PGPORT} -w -t 300 (code=exited, status=1/FAILURE) Process: 23337 ExecStartPre=/usr/libexec/postgresql_initdb.sh ${PGDATA} (code=exited, status=0/SUCCESS) Apr 20 14:19:56 Mageia4 pg_ctl[23375]: FATAL: could not create lock file "/var/run/postgresql/.s.PGSQL.5432.lock": No such file or directory Apr 20 14:20:01 Mageia4 pg_ctl[23375]: pg_ctl: could not start server Apr 20 14:20:01 Mageia4 pg_ctl[23375]: Examine the log output. Apr 20 14:20:01 Mageia4 systemd[1]: postgresql.service: control process exited, code=exited status=1 Apr 20 14:20:01 Mageia4 systemd[1]: Failed to start PostgreSQL database server. Apr 20 14:20:01 Mageia4 systemd[1]: Unit postgresql.service entered failed state. [doktor5000@Mageia4 ~]$ df /var/run/postgresql df: â/var/run/postgresqlâ: file or directory not found After creating the folder and adjusting ownership postgresql starts fine: [doktor5000@Mageia4 ~]$ sudo mkdir /var/run/postgresql [doktor5000@Mageia4 ~]$ sudo chown postgres:postgres /var/run/postgresql [doktor5000@Mageia4 ~]$ ls -ald /var/run/postgresql drwxr-xr-x 2 postgres postgres 40 Apr 20 14:20 /var/run/postgresql/ [doktor5000@Mageia4 ~]$ systemctl status postgresql.service postgresql.service - PostgreSQL database server Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled) Active: active (running) since So 2014-04-20 14:22:22 CEST; 4s ago Process: 23538 ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o -p ${PGPORT} -w -t 300 (code=exited, status=0/SUCCESS) Process: 23536 ExecStartPre=/usr/libexec/postgresql_initdb.sh ${PGDATA} (code=exited, status=0/SUCCESS) Main PID: 23541 (postgres) CGroup: /system.slice/postgresql.service ââ23541 /usr/bin/postgres -D /var/lib/pgsql/data -p 5432 ââ23544 postgres: checkpointer process ââ23545 postgres: writer process ââ23546 postgres: wal writer process ââ23547 postgres: autovacuum launcher process ââ23548 postgres: stats collector process Apr 20 14:22:21 Mageia4 systemd[1]: Starting PostgreSQL database server... Apr 20 14:22:21 Mageia4 pg_ctl[23538]: LOG: database system was shut down at 2014-04-20 14:19:56 CEST Apr 20 14:22:21 Mageia4 pg_ctl[23538]: LOG: database system is ready to accept connections Apr 20 14:22:21 Mageia4 pg_ctl[23538]: LOG: autovacuum launcher started Apr 20 14:22:22 Mageia4 systemd[1]: Started PostgreSQL database server. Reproducible: Steps to Reproduce:
Some more information: [doktor5000@Mageia4 ~]$ rpm -qf /var/run/postgresql/ postgresql9.3-server-9.3.2-2.mga4 Seems the issue is how the directory is listed in %files list in the SPEC. It gets created during %install: 338 # Create the directory for sockets. 339 install -d -m 755 %{buildroot}/var/run/postgresql but in %files list it is listed as %ghost and only %dir? 576 %attr(755,postgres,postgres) %ghost %dir /var/run/postgresql If this is marked as %ghost, it would have to be created on target system during one of the %post phases, right?
CC: (none) => doktor5000
Submitted a fix to updates/4/postgresql9.3 and an updates candidate to updates_testing after testing if this work. Will write advisory soon.
https://wiki.mageia.org/en/System_Service_policy#Transient_folders_.28.2Frun.2C_.2Fvar.2Frun.2C_.2Fvar.2Flock.29
CC: (none) => zen25000
*** Bug 12782 has been marked as a duplicate of this bug. ***
CC: (none) => stormi
Depends on: (none) => 12841
(In reply to Barry Jackson from comment #3) > https://wiki.mageia.org/en/System_Service_policy#Transient_folders_.28.2Frun. > 2C_.2Fvar.2Frun.2C_.2Fvar.2Flock.29 Yeah, yeah, just saw it when I came back home. Was rejected by buildsystem http://pkgsubmit.mageia.org/uploads/rejected/4/core/updates_testing/20140420132809.doktor5000.valstar.4551.youri Submission errors, aborting: - postgresql9.3-server-9.3.2-2.1.mga4: - non-ghost-in-var-run /var/run/postgresql - non-ghost-in-var-run /var/run/postgresql But that instructions from the wiki alone won't work, I had to use the full path to the config file in %post: %_tmpfilescreate %{_tmpfilesdir}/%{bname} Already commited new fix for updates/4/postgresql9.3 @Luigi: Doesn't seem like Funda will do the security updates, shall I help with those, at least for mga4?
CC: (none) => luigiwalser, nanardon
(In reply to Florian Hubold from comment #5) > @Luigi: Doesn't seem like Funda will do the security updates, shall I help > with those, at least for mga4? Yes, please. BTW does this tmpfiles issue affect only 9.3, or also the others?
(In reply to David Walser from comment #6) > does this tmpfiles issue affect only 9.3, or also the others? No clue at all, didn't even look yet. Will take a look once I find some time. Also, do you want to combine this bugfix and the security fix into one update candidate?
Assignee: fundawang => doktor5000
(In reply to Florian Hubold from comment #7) > Also, do you want to combine this bugfix and the security fix into one > update candidate? Yes, we can save the QA team some work that way.
To reproduce and simulate installation on freshly installed system (WARNING: this will wipe your postgres databases!) urpme $(rpm -qa | grep ^postgresql9.3) 1>/dev/null; rm -rf /var/lib/pgsql ; rm -rf /var/run/postgresql #verify socket directory does not exist: ls -ald /var/run/postgresql #install and start postgres server, then check status urpmi postgresql9.3-server --auto && systemctl start postgresql && sleep 3; systemctl status postgresql #see the failure Job for postgresql.service failed. See 'systemctl status postgresql.service' and 'journalctl -xn' for details. #verify socket directory has not been created: ls -ald /var/run/postgresql ====================================================================== #rinse and repeat with update candidate, socket directory should exist # ls -ald /var/run/postgresql drwxr-xr-x 2 postgres postgres 40 Mai 5 21:05 /var/run/postgresql/ list of packages: x86_64 postgresql9.3-pltcl-9.3.4-1.mga4.x86_64.rpm lib64pq9.3_5-9.3.4-1.mga4.x86_64.rpm postgresql9.3-debuginfo-9.3.4-1.mga4.x86_64.rpm postgresql9.3-server-9.3.4-1.mga4.x86_64.rpm postgresql9.3-pl-9.3.4-1.mga4.x86_64.rpm postgresql9.3-plpython-9.3.4-1.mga4.x86_64.rpm lib64ecpg9.3_6-9.3.4-1.mga4.x86_64.rpm postgresql9.3-plpgsql-9.3.4-1.mga4.x86_64.rpm postgresql9.3-plperl-9.3.4-1.mga4.x86_64.rpm postgresql9.3-9.3.4-1.mga4.x86_64.rpm postgresql9.3-contrib-9.3.4-1.mga4.x86_64.rpm postgresql9.3-devel-9.3.4-1.mga4.x86_64.rpm postgresql9.3-docs-9.3.4-1.mga4.noarch.rpm i586 postgresql9.3-pltcl-9.3.4-1.mga4.i586.rpm lib64pq9.3_5-9.3.4-1.mga4.i586.rpm postgresql9.3-debuginfo-9.3.4-1.mga4.i586.rpm postgresql9.3-server-9.3.4-1.mga4.i586.rpm postgresql9.3-pl-9.3.4-1.mga4.i586.rpm postgresql9.3-plpython-9.3.4-1.mga4.i586.rpm lib64ecpg9.3_6-9.3.4-1.mga4.i586.rpm postgresql9.3-plpgsql-9.3.4-1.mga4.i586.rpm postgresql9.3-plperl-9.3.4-1.mga4.i586.rpm postgresql9.3-9.3.4-1.mga4.i586.rpm postgresql9.3-contrib-9.3.4-1.mga4.i586.rpm postgresql9.3-devel-9.3.4-1.mga4.i586.rpm postgresql9.3-docs-9.3.4-1.mga4.noarch.rpm SRPMs postgresql9.3-9.3.4-1.mga4.src.rpm
Status: NEW => ASSIGNEDAssignee: doktor5000 => qa-bugs
Please don't assign multiple bugs to QA for the same update Florian. I've added these details in bug 12841.
CC: (none) => qa-bugsAssignee: qa-bugs => doktor5000
Depends on: (none) => 13336
Depends on: 13336 => (none)
Update pushed: http://advisories.mageia.org/MGASA-2014-0205.html
Status: ASSIGNED => RESOLVEDCC: (none) => tmbResolution: (none) => FIXED