Hi,
If we run the cgconfigparser manually, it fails alternatively. It is a little
weird behaviour. The problem surfaces when there is some cgroup already
mounted.
The explaination for alternate failure :
first time cgconfig parser mounts cgroup.
second time the code in config.c tries to mount and fails since it is already
mounted. But error handling path now unmounts the mounted cgroups. and this
repeats.
Main problem is cgconfig start can fail first time.

Repeatability : Permanent.

This patch adresses it by adding unmount and then retrying mount before going
to error handling path.

Before
============
[root@libcg]#cgconfigparser -l /etc/cgconfig.conf
[root@libcg]#cgconfigparser -l /etc/cgconfig.conf
Loading configuration file /etc/cgconfig.conf failed
Cgroup mounting failed
[root@libcg]#cgconfigparser -l /etc/cgconfig.conf
[root@libcg]#cgconfigparser -l /etc/cgconfig.conf
Loading configuration file /etc/cgconfig.conf failed
Cgroup mounting failed
[root@libcg]#cgconfigparser -l /etc/cgconfig.conf
[root@libcg]# service cgconfig start
Starting cgconfig service: Loading configuration file /etc/cgconfig.conf
failed
Cgroup mounting failed
Failed to parse /etc/cgconfig.conf                         [FAILED]
[root@libcg]# service cgconfig start
Starting cgconfig service:                                 [  OK  ]

After
==========
[root@libcg]# service cgconfig start
Starting cgconfig service:                                 [  OK  ]
[root@libcg]#cgconfigparser -l /etc/cgconfig.conf
[root@libcg]#cgconfigparser -l /etc/cgconfig.conf
[root@libcg]#cgconfigparser -l /etc/cgconfig.conf
[root@libcg]# service cgconfig start
Starting cgconfig service:                                 [  OK  ]

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to