Bug 609816

Summary: serivces of libcgroup not LSB-compliant
Product: Red Hat Enterprise Linux 6 Reporter: Caspar Zhang <czhang>
Component: libcgroupAssignee: Ivana Varekova <varekova>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0CC: dkovalsk, jsafrane, ovasik, qcai
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libcgroup-0.36.1-6.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-10 21:02:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 633349    

Description Caspar Zhang 2010-07-01 08:26:55 UTC
Description of problem:
Services related to libcgroup has two parts: cgconfig and cgred, they're not LSB compliant in RHEL6, see: https://wiki.test.redhat.com/BaseOs/Projects/InitScripts.

I have finished the testcase and run them in beaker:
https://beaker.engineering.redhat.com/jobs/5733

The failed items are:
- cgconfig

#action: delete /etc/cgconfig.conf and try start cgconfig
:: [   FAIL   ] :: Try start when /etc/cgconfig.conf not exist (Expected 6, got 3)[1]

#action: create an empty /etc/cgconfig.conf and try start cgconfig
:: [   FAIL   ] :: Try start when /etc/cgconfig.conf not configured (Expected 6, got 3)[1]

#action: stop cgconfig and see status
:: [   FAIL   ] :: Running 'service cgconfig status' (Expected 3, got 0)

- cgred:

#action: stop cgconfig and try starting cgred
:: [   FAIL   ] :: Try start when cgconfig not running (Expected 7, got 1)[2]

#action: make sure cgred is stopped and see status
:: [   FAIL   ] :: Running 'service cgred status' (Expected 3, got 1)

#action: delete /etc/cgrules.conf and try starting cgred
:: [   FAIL   ] :: Try start when /etc/cgrules.conf not exist (Expected 6, got 1) [1]

#action: stop cgred when cgred is stopped already.
:: [   FAIL   ] :: Running 'service cgred stop' (Expected 0, got 7)

#action: see status when cgred dead and /var/lock file exists.
:: [   PASS   ] :: Running 'rm /var/run/cgred.pid'
:: [   FAIL   ] :: Running 'service cgred status' (Expected 2, got 3)


[1] I'm not sure whether it should be 6 here, according to https://fedoraproject.org/wiki/Packaging/SysVInitScript#Exit_Codes_for_non-Status_Actions ,
I think the program is not configured so the right exit_code should be 6.
[2] I'm not sure about this situation, either. I suppose a program-not-running error, but maybe exit_code 1 is also right.

How reproducible:
100%

Steps to Reproduce:
1. run the testcase in /CoreOS/libcgroup/Sanity/initscript
2.
3.
  
Actual results:
FAIL

Expected results:
PASS

Additional info:

Comment 2 RHEL Program Management 2010-07-01 08:43:18 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 6 Evan McNabb 2010-07-29 19:29:53 UTC
Confirmed init script fixes with /CoreOS/libcgroup/Sanity/initscript/ test. (Note: a few changes were required to the test, I'll send them to the author)

# rpm -q libcgroup
libcgroup-0.36.1-6.el6.x86_64
# cd /mnt/tests/CoreOS/libcgroup/Sanity/initscript/
# make
...::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Checking for the presence of libcgroup rpm
:: [   PASS   ] :: Running 'rm -f /etc/cgconfig.conf /etc/cgrules.conf /etc/sysconfig/cgred.conf'
:: [   LOG    ] :: Duration: 0s
:: [   LOG    ] :: Assertions: 2 good, 0 bad
:: [   PASS   ] :: RESULT: Setup

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: cgconfig Start - bad-configured
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Try start when /etc/cgconfig.conf not exist
:: [   PASS   ] :: Running 'service cgconfig status'
:: [   PASS   ] :: Running 'touch /etc/cgconfig.conf'
:: [   PASS   ] :: Try start when /etc/cgconfig.conf not configured
:: [   PASS   ] :: Running 'service cgconfig status'
:: [   LOG    ] :: Duration: 0s
:: [   LOG    ] :: Assertions: 5 good, 0 bad
:: [   PASS   ] :: RESULT: cgconfig Start - bad-configured

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: cgconfig Start - good-configured
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Running 'echo " mount {  cpuset = /cgroup/cpuset;  cpu = /cgroup/cpu;  cpuacct = /cgroup/cpuacct;  memory = /cgroup/memory;  devices = /cgroup/devices;  freezer = /cgroup/freezer;  net_cls = /cgroup/net_cls;  blkio = /cgroup/blkio; } " > /etc/cgconfig.conf'
:: [   PASS   ] :: Running 'service cgconfig start'
:: [   PASS   ] :: Running 'service cgconfig status'
:: [   PASS   ] :: Try start when already running
:: [   PASS   ] :: Running 'service cgconfig status'
:: [   PASS   ] :: Running 'service cgconfig restart'
:: [   PASS   ] :: Running 'service cgconfig status'
:: [   PASS   ] :: Running 'service cgconfig reload'
:: [   PASS   ] :: Running 'service cgconfig status'
:: [   LOG    ] :: Duration: 2s
:: [   LOG    ] :: Assertions: 9 good, 0 bad
:: [   PASS   ] :: RESULT: cgconfig Start - good-configured

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: cgconfig Stop
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Running 'service cgconfig stop'
:: [   PASS   ] :: Running 'service cgconfig status'
:: [   PASS   ] :: Try stop when already stopped
:: [   PASS   ] :: Running 'service cgconfig status'
:: [   LOG    ] :: Duration: 1s
:: [   LOG    ] :: Assertions: 4 good, 0 bad
:: [   PASS   ] :: RESULT: cgconfig Stop

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: cgconfig Cond Restart
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Try condrestart when already running
:: [   PASS   ] :: Running 'service cgconfig status'
:: [   PASS   ] :: Try condrestart when stopped
:: [   PASS   ] :: Running 'service cgconfig status'
:: [   LOG    ] :: Duration: 1s
:: [   LOG    ] :: Assertions: 4 good, 0 bad
:: [   PASS   ] :: RESULT: cgconfig Cond Restart

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: cgred Start
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Try start when cgconfig not running
:: [   PASS   ] :: Running 'service cgred status'
:: [   PASS   ] :: Running 'rm -f /etc/cgrules.conf'
:: [   PASS   ] :: Try start when /etc/cgrules.conf not exist
:: [   PASS   ] :: Running 'service cgred status'
:: [   PASS   ] :: Running 'service cgred start'
:: [   PASS   ] :: Running 'service cgred status'
:: [   PASS   ] :: Running 'service cgred start'
:: [   PASS   ] :: Running 'service cgred status'
:: [   PASS   ] :: Running 'service cgred restart'
:: [   PASS   ] :: Running 'service cgred status'
:: [   PASS   ] :: Running 'service cgred reload'
:: [   PASS   ] :: Running 'service cgred status'
:: [   LOG    ] :: Duration: 2s
:: [   LOG    ] :: Assertions: 13 good, 0 bad
:: [   PASS   ] :: RESULT: cgred Start

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: cgred Stop
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Running 'service cgred stop'
:: [   PASS   ] :: Running 'service cgred status'
:: [   PASS   ] :: Running 'service cgred stop'
:: [   PASS   ] :: Running 'service cgred status'
:: [   LOG    ] :: Duration: 0s
:: [   LOG    ] :: Assertions: 4 good, 0 bad
:: [   PASS   ] :: RESULT: cgred Stop

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: cgred Cond Restart
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Running 'service cgred condrestart'
:: [   PASS   ] :: Running 'service cgred status'
:: [   PASS   ] :: Running 'service cgred condrestart'
:: [   PASS   ] :: Running 'service cgred status'
:: [   LOG    ] :: Duration: 1s
:: [   LOG    ] :: Assertions: 4 good, 0 bad
:: [   PASS   ] :: RESULT: cgred Cond Restart

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: cgred dead and /var/run pid file exists.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Running 'killall -9 cgrulesengd'
:: [   PASS   ] :: Running 'service cgred status'
:: [   LOG    ] :: Duration: 1s
:: [   LOG    ] :: Assertions: 2 good, 0 bad
:: [   PASS   ] :: RESULT: cgred dead and /var/run pid file exists.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: cgred dead and /var/lock file exists.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Running 'rm /var/run/cgred.pid'
:: [   PASS   ] :: Running 'service cgred status'
:: [   PASS   ] :: Running 'rm /var/lock/subsys/cgred'
:: [   LOG    ] :: Duration: 0s
:: [   LOG    ] :: Assertions: 3 good, 0 bad
:: [   PASS   ] :: RESULT: cgred dead and /var/lock file exists.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Duration: 0s
:: [   LOG    ] :: Assertions: 0 good, 0 bad
:: [   PASS   ] :: RESULT: Cleanup
:: [15:28:01] ::  JOURNAL XML: /tmp/beakerlib-TVK1RH4/journal.xml
:: [15:28:01] ::  JOURNAL TXT: /tmp/beakerlib-TVK1RH4/journal.txt

Comment 7 releng-rhel@redhat.com 2010-11-10 21:02:24 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.