Red Hat Bugzilla – Bug 921328
The cgred service fails to start with an empty configuration file.
Last modified: 2013-11-21 17:32:44 EST
Description of problem: If /etc/cgrules.conf is empty (but exists) cgred refuses to start. If even a comment is present, it starts correctly. Version-Release number of selected component (if applicable): libcgroup-0.37-7.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1.have an empty or non-existent /etc/cgrules.conf 2.attempt to start cgred service 3. Actual results: service fails to start Expected results: service should start Additional info: # Empty File Stopping CGroup Rules Engine Daemon... [ OK ] Starting CGroup Rules Engine Daemon: not configured [FAILED] Can you provide the results from $ ls -l /etc/cgrules.conf -rw-r--r-- 1 root root 0 Feb 22 18:30 /etc/cgrules.conf When a comment is placed in /etc/cgrules.conf files (so there is only one hash mark in the file) the service starts normally # One hash mark Stopping CGroup Rules Engine Daemon... [ OK ] Starting CGroup Rules Engine Daemon: [ OK ]
Created attachment 762873 [details] libcgroup-0.37-cgred-empty-config.patch
[root@dhcp137-133 initscript]# rpm -q libcgroup libcgroup-0.40.rc1-2.el6.x86_64 [root@dhcp137-133 initscript]# rm /etc/cgrules.conf rm: remove regular file `/etc/cgrules.conf'? y [root@dhcp137-133 initscript]# service cgred restart # no cgrules.conf Stopping CGroup Rules Engine Daemon... [ OK ] Starting CGroup Rules Engine Daemon: [ OK ] [root@dhcp137-133 initscript]# service cgred start # empty cgrules.conf Starting CGroup Rules Engine Daemon: [ OK ] [root@dhcp137-133 initscript]# ps ax | grep cg 13 ? S 0:00 [cgroup] 28322 ? Ss 0:00 /sbin/cgrulesengd -g cgred 28327 pts/2 S+ 0:00 grep cg [root@dhcp137-133 initscript]# service cgred restart # cgrules.conf only comments Stopping CGroup Rules Engine Daemon... [ OK ] Starting CGroup Rules Engine Daemon: [ OK ] Fixed in libcgroup-0.40.rc1-2.el6.x86_64, this can be verified.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1685.html