Bug 9867 - uuidd pid file path in systemd disagrees with init.d
Summary: uuidd pid file path in systemd disagrees with init.d
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thomas Backlund
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 8615
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-25 14:01 CEST by claire robinson
Modified: 2013-05-02 20:55 CEST (History)
1 user (show)

See Also:
Source RPM: util-linux
CVE:
Status comment:


Attachments

Description claire robinson 2013-04-25 14:01:20 CEST
Please refer to bug 8615 comment 8

# service uuidd start
Starting uuidd (via systemctl):  Job failed. See system journal and 'systemctl status' for details.                                     [FAILED]

# systemctl status uuidd.service
uuidd.service - LSB: UUID daemon
          Loaded: loaded (/etc/rc.d/init.d/uuidd)
          Active: failed (Result: resources) since Thu, 25 Apr 2013 10:41:25 +0100; 11s ago
         Process: 23971 ExecStart=/etc/rc.d/init.d/uuidd start (code=exited, status=0/SUCCESS)
          CGroup: name=systemd:/system/uuidd.service

# tail /var/log/syslog
Apr 25 10:41:25 localhost uuidd[23971]: Starting uuidd: [  OK  ]
Apr 25 10:41:25 localhost systemd[1]: PID file /var/lib/libuuid/uuidd.pid not readable (yet?) after start.
Apr 25 10:41:25 localhost systemd[1]: Unit uuidd.service entered failed state.

# ps aux | grep uuid
uuidd    24000  0.0  0.0  14376    96 ?        Ss   10:41   0:00 /usr/sbin/uuidd

# ll /var/lib/libuuid/uuidd.pid
ls: cannot access /var/lib/libuuid/uuidd.pid: No such file or directory


So, it appears to actually be starting from the init file but systemd isn't finding the pid file and declares a failure. /var/lib/libuuid/ is empty. Directory ownership seems OK but the path for pid file is incorrect as the init file is set to /var/run/uuidd/uuidd.pid.

# ll -d /var/lib/libuuid
drwxrwsr-x 2 uuidd uuidd 4096 Apr  8  2012 /var/lib/libuuid/

From /etc/init.d/uuidd..

# pidfile: /var/lib/libuuid/uuidd.pid

daemon --user uuidd --pidfile /var/run/uuidd/uuidd.pid /usr/sbin/uuidd


Some tests..
# uuidd -r << returns a random uuid
bae72f3e-7699-4f97-b162-5f554c6993ef

# uuidd -t << returns a  time based uuid
108bec70-ad8e-11e2-a5da-00218514ca4e



Reproducible: 

Steps to Reproduce:
claire robinson 2013-04-25 14:02:17 CEST

Assignee: bugsquad => tmb

Comment 1 David Walser 2013-04-25 15:56:12 CEST
The fix in Mageia 2 is to change the pidfile comment in /etc/init.d/uuidd to match what it's really using, /var/run/uuidd/uuidd.pid.  I've confirmed locally that this fixes it.

In Mageia 3, the uuidd service also doesn't work, but for a different reason.  It's a native systemd service, and the service file for uuidd tells it to use systemd socket activation, but this is a compile-time option that's not enabled by default or in our spec, so it fails to start.  I'm rebuilding locally now with --enable-socket-activiation to see if this is all that's needed to fix it there.

CC: (none) => luigiwalser
Version: 2 => Cauldron
Depends on: (none) => 8615
Whiteboard: (none) => MGA2TOO

Comment 2 David Walser 2013-04-25 16:18:59 CEST
I've confirmed the fix for Mageia 3 now as well.  Requesting freeze push.
Comment 3 David Walser 2013-04-25 20:21:15 CEST
Fixed in Cauldron in util-linux-2.22.2-5.mga3.

Version: Cauldron => 2
Whiteboard: MGA2TOO => (none)

Comment 4 David Walser 2013-04-25 20:25:42 CEST
Fixed in util-linux-2.21.1-1.2.mga2 in Mageia 2 updates_testing.
Comment 5 David Walser 2013-05-02 20:55:01 CEST
util-linux-2.21.1-1.2.mga2 uploaded to Mageia 2 updates.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.