tools: cgconfig/cgrulesengd - skip parsing non .conf files
Currently, the list of files to be parsed is constructed by reading the
directories passed with '-L' command line option or by cgrulesend from
'/etc/cgconfig.d'. The directories might also host non-configuration
files, parsing them will result in failure.
Consider the following example:
# ls /etc/cgconfig.d
cgconfig-oradb.conf cgconfig-oradb.conf.rpmsave test .conf e
# /usr/sbin/cgconfigparser -l /etc/cgconfig.conf -L /etc/cgconfig.d -s 1664
/usr/sbin/cgconfigparser; error loading /etc/cgconfig.d/cgconfig-oradb.conf.rpmsave:
Cgroup, the requested group parameter does not exist
fix it by skipping files with non .conf extensions, while building the
list of files to be parsed for cgroup configurations.
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com> Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>