Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 552432 - app-admin/cgmanager-0.36-r1: Unable to write pid file: No such file or directory
Summary: app-admin/cgmanager-0.36-r1: Unable to write pid file: No such file or directory
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Markos Chandras (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-18 03:34 UTC by Erik Mackdanz
Modified: 2015-06-21 19:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
proposed patch (cgmanager.init.patch,490 bytes, patch)
2015-06-18 03:35 UTC, Erik Mackdanz
Details | Diff
emerge --info output (emerge.info,16.73 KB, application/x-info)
2015-06-18 03:36 UTC, Erik Mackdanz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Mackdanz gentoo-dev 2015-06-18 03:34:19 UTC
The cgmanager binary, as coded by upstream, doesn't write a pidfile when it starts.  The error "cgmanager: Unable to write pid file: No such file or directory" appears when the daemon starts.

A patch is attached which adds the --make-pidfile --background options to start-stop-daemon.  This fixes the issue for me.

The issue is reproducible with cgmanager but not cgproxy.  I can't explain this, since they both appear to call nih_main_daemonise() the same way and they both have equivalent start-stop-daemon args.



Reproducible: Always

Steps to Reproduce:
1. /etc/init.d/cgmanager start
Actual Results:  
cgmanager: Unable to write pid file: No such file or directory
No /run/cgmanager.pid created

Expected Results:  
service starts without error, and /run/cgmanager.pid exists
Comment 1 Erik Mackdanz gentoo-dev 2015-06-18 03:35:37 UTC
Created attachment 405310 [details, diff]
proposed patch
Comment 2 Erik Mackdanz gentoo-dev 2015-06-18 03:36:26 UTC
Created attachment 405312 [details]
emerge --info output
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2015-06-21 09:15:48 UTC
Would it be terribly wrong to patch the cgproxy file in a similar way?
Comment 4 Erik Mackdanz gentoo-dev 2015-06-21 16:37:33 UTC
Never mind, I upgraded 0.37 and the issue is fixed.  Feel free to WONTFIX.


If there was still a reason to fix 0.36-r1, then here's extra info:

(In reply to Markos Chandras from comment #3)
> Would it be terribly wrong to patch the cgproxy file in a similar way?

Strangely, cgproxy writes its own pidfile correctly for me.  We wouldn't want two things trying to manage it.

FWIW, I've reproduced the issue on a new VM at Rackspace.

emerge --sync
emerge -a =app-admin/cgmanager-0.36-r1
dispatch-conf  # to accept ~
emerge -a =app-admin/cgmanager-0.36-r1
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2015-06-21 19:31:44 UTC
Alright closing since this appears to be fixed in the latest ~testing version