SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to configure /etc/cgconfig.conf like described in Chris Willings' LXC tutorial, but can't get rid of this error:
Code:
# sh /etc/rc.d/rc.cgconfig start
Starting cgconfig service: error at line number 50 at qwerty:syntax error
Error: failed to parse file /etc/cgconfig.conf
/usr/sbin/cgconfigparser; error loading /etc/cgconfig.conf: Have multiple paths for the same namespace
Failed to parse /etc/cgconfig.conf
The solution posted in this thread didn't solve for me, as I'm already using the latest patched libcgroup in my Slackware-14.2.
I have LANG=it_IT in my /etc/profile.d/lang.sh.
I also tested the sources of -current with no luck.
I hope someone has an hint how to solve this.
Thanks,
Roberto
Last edited by roberto967; 08-16-2019 at 06:19 AM.
The solution posted in this thread didn't solve for me, as I'm already using the latest patched libcgroup in my Slackware-14.2.
The 32 bit version is "buggy" as I have stated in the same thread. You must download the the slackbuild and all source files (including the patches) from here and recompile them according to the instructions (i.e., LANG=C ...) in aforementioned thread.
PS: I assume you know how to build and install software in Slackware manually. Post again for directions if this is not the case.
The 32 bit version is still buggy as I have stated in the same thread. You must download the the slackbuild and all source files (including the patches) from here and recompile them according to the instructions (i.e., LANG=C ...) in aforementioned thread.
This is what I have done, with no luck. Anyway the option LANG=C is already included in the patches/package
Anyway the option LANG=C is already included in the patches/package
Really? I just checked the Slackbuild and did not find that option. What were the exact commands that you issued on the command line? Please post them verbatim.
PS:
Please also post your /etc/cgconfig.conf. I am not sure if you are allowed to have a trailing whitespace or comment on the same line that has instructions on it.
Really? I just checked the Slackbuild and did not find that option. What were the exact commands that you issued on the command line? Please post them verbatim.
PS:
Please also post your /etc/cgconfig.conf. I am not sure if you are allowed to have a trailing whitespace or comment on the same line that has instructions on it.
here it is (I'm just testing Chris Willings' guide):
Code:
#
# Copyright IBM Corporation. 2007
#
# Authors: Balbir Singh <balbir@linux.vnet.ibm.com>
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2.1 of the GNU Lesser General Public License
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it would be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
#group daemons/www {
# perm {
# task {
# uid = root;
# gid = webmaster;
# }
# admin {
# uid = root;
# gid = root;
# }
# }
# cpu {
# cpu.shares = 1000;
# }
#}
#
#group daemons/ftp {
# perm {
# task {
# uid = root;
# gid = ftpmaster;
# }
# admin {
# uid = root;
# gid = root;
# }
# }
# cpu {
# cpu.shares = 500;
# }
#}
#
#mount {
# cpu = /mnt/cgroups/cpu;
# cpuacct = /mnt/cgroups/cpuacct;
#}
group qwerty {
perm {
task {
uid = chris;
gid = users;
}
admin {
uid = chris;
gid = users;
}
}
cpuset {
cgroup.clone_children = 1;
cpuset.mems = 0;
cpuset.cpus = 0-3;
}
cpu {}
cpuacct {}
blkio {}
memory { memory.use_hierarchy = 1; }
devices {}
freezer {}
net_cls {}
perf_event {}
net_prio {}
pids {}
}
I get the same error even when using the commented example
Last edited by roberto967; 08-16-2019 at 08:09 AM.
Alright, you will really have to humour me on this one because I am seeing some odd behaviour on my 32bit machine (64bit works fine).
Uninstall the prebuilt version from the Slackware repository:
You may have to restart your machine first, at least I have to. Does it work now?
That is the only way I can make it work. The prebuilt version from the repo still exhibits the same behaviour as mentioned above.
[...]
You may have to restart your machine first, at least I have to. Does it work now?
That is the only way I can make it work. The prebuilt version from the repo still exhibits the same behaviour as mentioned above.
No, it didn't
And I have removed the package before running the slackbuild and rebooted as you suggested... this is verrry strange...
Hm, is it still the same error or is it different? What is the exact output? How are you starting the service? Until the issue is resolved you should the remove the executable bits from all involved rc.* scripts so the errors do not just scroll by during boot. Please post every command you have issued and its output until it errors.
Are you really using a 32bit machine with four cpu-cores? This looks like copy+pasted from the article. You might have to adjust the value according to the actual number of cpus/cores in your machine.
Hm, is it still the same error or is it different? What is the exact output? How are you starting the service?
It is the same error:
Code:
# sh rc.cgconfig start
Starting cgconfig service: error at line number 50 at qwerty:syntax error
Error: failed to parse file /etc/cgconfig.conf
/usr/sbin/cgconfigparser; error loading /etc/cgconfig.conf: Have multiple paths for the same namespace
Failed to parse /etc/cgconfig.conf
Quote:
Originally Posted by crts
Until the issue is resolved you should the remove the executable bits from all involved rc.* scripts so the errors do not just scroll by during boot.
The +x flag was already off
Quote:
Originally Posted by crts
Please post every command you have issued and its output until it errors.
Trying one of these produces the error above
Code:
sh rc.cgconfig start
cgconfigparser -l /etc/cgconfig.conf
I suppose that the last one is the command which throws into error rc.config
Are you really using a 32bit machine with four cpu-cores? This looks like copy+pasted from the article. You might have to adjust the value according to the actual number of cpus/cores in your machine.
Yes, you're right, it was a cut&paste. Now I adjusted like this cpuset.cpus = 0-1; and also tried to comment that line but the error is still there. As said I tested the commented example as well...
Last edited by roberto967; 08-16-2019 at 04:45 PM.
Well, I am out of ideas. When I try to parse your sample I get an error for another line:
Code:
/usr/sbin/cgconfigparser -l ./cgconfig.conf
parsing failed at line number 53
Error: failed to parse file ./orgcgconfig.conf
/usr/sbin/cgconfigparser; error loading ./orgcgconfig.conf: Have multiple paths for the same namespace
This is because I do not have a user 'chris' on my system. After replacing the line with a user that exists on my system the error goes away.
The only other reasons I know is if a line has a trailing comment, e.g.,
Code:
group somegroupname { # comment
then it will fail with the same error. Finally - this is rather unlikely - if you have DOS style newlines. This would only be the case if you created the file under Windows and are now trying to work with it under Linux.
I created the user chris, also the group qwerty (never knows at this point), but the error was again at the first not commented line
Code:
Starting cgconfig service: error at line number 50 at qwerty:syntax error
Quote:
Originally Posted by crts
[...]
Finally - this is rather unlikely - if you have DOS style newlines. This would only be the case if you created the file under Windows and are now trying to work with it under Linux.
Code:
od -a /etc/cgconfig.conf
would reveal something like that.
No windows at all, I did a cut&paste from chris' web page on my nano editor. Anyway this is what I see at the end, I suppose it's fine:
Code:
# od -a /etc/cgconfig.conf
[..............]
0001600 t ; nl # } nl nl g r o u p sp q w e
0001620 r t y sp { nl sp sp sp sp p e r m sp {
0001640 nl sp sp sp sp sp sp sp sp t a s k sp { nl
0001660 sp sp sp sp sp sp sp sp sp sp sp sp u i d sp
0001700 = sp r o b e r t o ; nl sp sp sp sp sp
0001720 sp sp sp sp sp sp sp g i d sp = sp u s e
0001740 r s ; nl sp sp sp sp sp sp sp sp } nl sp sp
0001760 sp sp a d m i n sp { nl sp sp sp sp sp sp
0002000 sp sp sp sp u i d sp = sp r o b e r t
0002020 o ; nl sp sp sp sp sp sp sp sp sp sp g i d
0002040 sp = sp u s e r s ; nl sp sp sp sp sp sp
0002060 } nl sp sp } nl } nl
0002070
You could try to change you LANG setting to something like
Code:
export LANG=en_US.UTF-8
but we are grasping at straws here, it will probably not help.
Another thing I noticed is that your profile says you are using Slackware64 but in your initial you state just Slackware-14.2 which is the 32-bit version. Note, that I only encountered this problem on my 32-bit machine, never had this problem on the 64-bit machines.
Does LXC with unprivileged users work on a 64-bit installation?
You could try to change you LANG setting to something like
Code:
export LANG=en_US.UTF-8
it didn't help
Quote:
Originally Posted by crts
Another thing I noticed is that your profile says you are using Slackware64 but in your initial you state just Slackware-14.2 which is the 32-bit version. Note, that I only encountered this problem on my 32-bit machine, never had this problem on the 64-bit machines.
Does LXC with unprivileged users work on a 64-bit installation?
My profile refers to the computer I have at home, now I'm away playing with a 32b.
Anyway I connected to my 64b server and it works fine there (didn't test LXC yet).
[OT]
I'm a little scared doing tests with LXC containers there, as the server already has containers based on Linux-vserver and I would like to ask if LXC and Linux-vserver containers can cohexist as long as I do the migration to LXC one day.
Last edited by roberto967; 08-17-2019 at 07:32 AM.
I have not experimented with any other containers than LXC, so I cannot say if they will play nice with Linux-vserver.
It is a bit hard to guess what is going on if I cannot reproduce the error. I assume that your 32-bit machine is fully updated, except for libcgroup. You have been using the one that you compiled yourself, right? You could try compiling all versions from the repository starting with the first version
Code:
libcgroup-0.41-i586-1_slack14.2
and work your way up to
Code:
libcgroup-0.41-i586-5_slack14.2
Compile all of them by explicitly passing
Code:
LANG=C ./libcgroup.Slackbuild
I does not matter if LANG=C is also defined in the Slackbuild.
If that does not help then try building the configuration file from scratch. Start with an empty file, no comments, just
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.