Bug 502687 - cgroup directory is removed on service stop without a directory creation process
Summary: cgroup directory is removed on service stop without a directory creation process
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: libcgroup
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Dhaval Giani
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-26 23:00 UTC by Larry Brigman
Modified: 2014-09-08 16:15 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-06-28 12:43:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch to do the mkdir -p in config load (952 bytes, patch)
2009-05-27 07:01 UTC, Dhaval Giani
no flags Details | Diff

Description Larry Brigman 2009-05-26 23:00:54 UTC
Description of problem:
/cgroup directory is removed on stop but not created on start

Version-Release number of selected component (if applicable):
0.33-3

How reproducible:
100%

Steps to Reproduce:
1. mkdir  /cgroup 
2. service cgconf start
3. service cgconf stop
4. service cgconf start
  
Actual results:
Error on second and subsequent starts /cgroup directory is removed
during the stop process.

Expected results:
Have the init script create the directory on start or not remove
the directory on stop

Additional info:

Comment 1 Larry Brigman 2009-05-26 23:15:37 UTC
sorry, should have been
service cgconfig

Comment 2 Dhaval Giani 2009-05-27 06:42:46 UTC
Can you share the mount section of your config file? I think I know where the issue is and how to fix it.

Comment 3 Dhaval Giani 2009-05-27 07:01:28 UTC
Created attachment 345568 [details]
Patch to do the mkdir -p in config load

Comment 4 Dhaval Giani 2009-05-27 07:01:45 UTC
Does the attached patch help?

Comment 5 Larry Brigman 2009-05-27 15:26:51 UTC
config file:
###################################################
group tty {
        perm {
                task {
                        uid = nvs;
                        gid = sys;
                }
                admin {
                        uid = root;
                        gid = root;
                }
        }

        memory {
                memory.limit_in_bytes = 1024M;
        }
}


mount {
        memory = /cgroup;
}

########################################################

Comment 6 Larry Brigman 2009-05-27 15:29:37 UTC
We found that changing the init script to add -p to the mkdir command 
allowed the system to succeed.

Comment 7 Dhaval Giani 2009-05-27 16:44:20 UTC
Did you make a change to the initscript or did you apply the patch I sent? If you made a change to the initscript, please attach those changes.

Comment 8 Larry Brigman 2009-05-27 16:50:26 UTC
We fixed our issue by doing this patch.  Sorry I don't see how to attach it as a patch so it going in the response here.
---------------------------------------
diff -rcp libcgroup-0.33/scripts/init.d/cgconfig mylibcgroup/scripts/init.d/cgconfig
*** libcgroup-0.33/scripts/init.d/cgconfig	2009-05-26 16:16:49.000920000 -0700
--- mylibcgroup/scripts/init.d/cgconfig	2009-05-26 16:16:13.000026000 -0700
*************** start() {
*** 108,114 ****
              #
              # Ignore if directory already exists
              #
!             mkdir ${MOUNTPOINT[$i]}/$defaultcgroup 2> /dev/null
              chmod a+rw ${MOUNTPOINT[$i]}/$defaultcgroup/tasks
              #
              # special rule for cpusets
--- 108,114 ----
              #
              # Ignore if directory already exists
              #
!             mkdir -p ${MOUNTPOINT[$i]}/$defaultcgroup 2> /dev/null
              chmod a+rw ${MOUNTPOINT[$i]}/$defaultcgroup/tasks
              #
              # special rule for cpusets
*************** start() {
*** 139,145 ****
              done
          done
  	
!         [ $? == 0 ] && touch /var/lock/subsys/$servicename
          return $?
  }
  
--- 139,145 ----
              done
          done
  	
!         touch /var/lock/subsys/$servicename
          return $?
  }

Comment 9 Dhaval Giani 2009-06-01 09:24:09 UTC
Does the patch I attached resolve the situation?

Also can you attach a unified diff of your script (try diff -upN)

Comment 10 Bug Zapper 2009-06-09 16:36:36 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 11 Bug Zapper 2010-04-27 14:32:18 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 12 Bug Zapper 2010-06-28 12:43:22 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 13 Larry Brigman 2014-09-08 16:15:02 UTC
No additional info for a closed/wontfix bug.  The patches supplied did fix the issue though.


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