openshift / puppet-openshift_origin

Puppet module to create OpenShift Brokers and Nodes. Can be used to create a full OpenShift Origin deployment.
http://forge.puppetlabs.com/openshift/openshift_origin
Other
45 stars 128 forks source link

failed to parse cgconfig #301

Closed Filirom1 closed 9 years ago

Filirom1 commented 10 years ago

After installing openshift origin r4 with oo-install, cgconfig is failing due to a bad configuration file : /etc/cgconfig.conf

$ cat /etc/cgconfig.conf
mount {blkio=/cgroup/blkio;cpu=/cgroup/cpu;cpuacct=/cgroup/cpuacct;cpuset=/cgroup/cpuset;devices=/cgroup/devices;freezer=/cgroup/freezer;memory=/cgroup/memory;net_cls=/cgroup/net_cls;# Managed by puppet:openshift_origin
}

The comment at the end of the line is not allowed. The man tell us that only line starting with ’#’ is considered a comment line and is ignored.

$ /etc/init.d/cgconfig restart
Stopping cgconfig service:                                 [  OK  ]
Starting cgconfig service: error at line number 1 at #:syntax error
Error: failed to parse file /etc/cgconfig.conf
/sbin/cgconfigparser; error loading /etc/cgconfig.conf: Have multiple paths for the same namespace
Failed to parse /etc/cgconfig.conf                         [ÉCHOUÉ]
sdodson commented 9 years ago

@Filirom1 we've removed the comment. Can you do me a favor though and let me know which exact version of libcgroup you have installed? What OS release is it as well?

Filirom1 commented 9 years ago
[root@node8 ~]# cat /etc/redhat-release
CentOS release 6.5 (Final)

[root@node8 ~]# yum list installed |grep libcgroup
libcgroup.x86_64                       0.40.rc1-6.el6_5.1 @updates
libcgroup-pam.x86_64                   0.40.rc1-6.el6_5.1 @updates
andrewklau commented 9 years ago

I'm not very familiar with augeas, but won't this change cause issues as it's going to now change contents on each puppet run?

Also, I recall facing this issue last time I played with cgroups. If the comment is at the very start of the line you won't have this issue - it cannot be indented at all.

sdodson commented 9 years ago

@andrewklau I've just tested and it's only updating the values when they don't match those defined in puppet. I think the context is specific to the mount hash it's not duplicating things.

I've added a change to remove the comment if it existed.

Filirom1 commented 9 years ago

thx