: BUG#1
Hi All,
Recently i have started using tool (lxc-0.4.1.tar.gz) for container creation released by Daniel. I am not sure if inside container, cgroup support is there or not. If it is not supported till now then here is the point where we can start to look into it.
Steps executed:
- create a container : lxc-create -f /etc/lxc-no-netns.conf -n xray rishi :~ # cat /etc/lxc-no-netns.conf
# Container with non-virtualized network
lxc.utsname = delta
- Execute container
:~ # lxc-execute -n xray /bin/bash
delta:~ #
- Execute the following command inside container delta:~ # mkdir /cpu
delta:~ # mount -t cgroup -ocpu cgroup /cpu
- delta:~ # cat /cpu/tasks
- You can see many zero's has attached with task file inside
container.
As i can understand cgroup has been mounted inside container so it should attach the task which is running inside container. Please correct me if i am wrong here.
Additional info:
rishi:~ # cat /boot/config-2.6.27.7-4-pae | grep CGROUP CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not setCONFIG_CGROUP_NS=yCONFIG_CGROUP_DEVICE=yCONFIG_CGROUP_FREEZER=yCONFIG_CGROUP_SCHED=yCONFIG_CGROUP_CPUACCT=yCONFIG_CGROUP_MEM_RES_CTLR=y
rishi:~ # cat /boot/config-2.6.27.7-4-pae | grep _NS CONFIG_CGROUP_NS=yCONFIG_UTS_NS=yCONFIG_IPC_NS=yCONFIG_USER_NS=yCONFIG_PID_NS=yCONFIG_NF_CONNTRACK_NETBIOS_NS=mCONFIG_NSC_FIR=mCONFIG_BLK_DEV_NS87415=mCONFIG_SCSI_NSP32=mCONFIG_PATA_NS87410=mCONFIG_PATA_NS87415=mCONFIG_NS83820=mCONFIG_GAMEPORT_NS558=mCONFIG_NSC_GPIO=mCONFIG_TCG_NSC=mCONFIG_NCPFS_NFS_NS=yCONFIG_NCPFS_OS2_NS=y
rishi:~ # uname -a
Linux rishi 2.6.27.7-4-pae #1 SMP 2008-11-25 00:02:37 +0100 i686 i686 i386 GNU/Linux
rishi:~ #
- Rishi
A message that is not in the archive (sent off-list or not yet received): 1228378478.4234.35.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/[email protected]
Hi Rishi,
Quoted 21 lines · Rishikesh K. Rajak
Hi All,
Recently i have started using tool (lxc-0.4.1.tar.gz) for container creation released by Daniel. I am not sure if inside container, cgroup support is there or not. If it is not supported till now then here is
the point where we can start to look into it.
Steps executed:
- create a container : lxc-create -f
/etc/lxc-no-netns.conf-n xray rishi :~ # cat/etc/lxc-no-netns.conf
# Container with non-virtualized network
lxc.utsname = delta
- Execute container
:~ # lxc-execute -n xray/bin/bash
delta:~ #
- Execute the following command inside container delta:~ # mkdir /cpu
delta:~ # mount -t cgroup -ocpu cgroup /cpu
Quoted 6 lines
- delta:~ # cat /cpu/tasks
- You can see many zero's has attached with task file inside
container.
It is expected behaviour of container, as PIDs in other namespaces will always be shown as 0.
So here, these 0s are from system ns (probably, as you had only system ns and delta ns).
I have been trying to fix for "for_each_process" macro related stuff wrt container code, yet I ll check out
if I am right, as I am also curious now.
Quoted 3 lines
As i can understand cgroup has been mounted inside container so it should attach the task which is running inside container. Please correct
Yes. and it is doing already. Only problem is unwanted 0s. Loot at the bottom of list you get
while cat. you see numbers other than 0,which are container processes.
Quoted 37 lines
me if i am wrong here.
Additional info:
rishi:~ # cat
/boot/config-2.6.27.7-4-pae| grep CGROUPCONFIG_CGROUPS=y
#CONFIG_CGROUP_DEBUGis not setCONFIG_CGROUP_NS=yCONFIG_CGROUP_DEVICE=yCONFIG_CGROUP_FREEZER=yCONFIG_CGROUP_SCHED=yCONFIG_CGROUP_CPUACCT=yCONFIG_CGROUP_MEM_RES_CTLR=y
rishi:~ # cat/boot/config-2.6.27.7-4-pae| grep_NSCONFIG_CGROUP_NS=yCONFIG_UTS_NS=yCONFIG_IPC_NS=yCONFIG_USER_NS=yCONFIG_PID_NS=yCONFIG_NF_CONNTRACK_NETBIOS_NS=mCONFIG_NSC_FIR=mCONFIG_BLK_DEV_NS87415=mCONFIG_SCSI_NSP32=mCONFIG_PATA_NS87410=mCONFIG_PATA_NS87415=mCONFIG_NS83820=mCONFIG_GAMEPORT_NS558=mCONFIG_NSC_GPIO=mCONFIG_TCG_NSC=mCONFIG_NCPFS_NFS_NS=yCONFIG_NCPFS_OS2_NS=y
rishi:~ # uname -a
Linux rishi 2.6.27.7-4-pae #1 SMP 2008-11-25 00:02:37 +0100 i686 i686 i386 GNU/Linux
rishi:~ #
Quoted 7 lines
- Rishi
_______________________________________________
Containers mailing list Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Thanks for reporting.
--
Gowrishankar
A message that is not in the archive (sent off-list or not yet received): 4937DA54.8060801-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org
Quoted 36 lines · gowrishankar
Hi Rishi,
Quoted 21 lines · Rishikesh K. Rajak
Hi All,
Recently i have started using tool (lxc-0.4.1.tar.gz) for container creation released by Daniel. I am not sure if inside container, cgroup support is there or not. If it is not supported till now then here is
the point where we can start to look into it.
Steps executed:
- create a container : lxc-create -f
/etc/lxc-no-netns.conf-n xray rishi :~ # cat/etc/lxc-no-netns.conf
# Container with non-virtualized network
lxc.utsname = delta
- Execute container
:~ # lxc-execute -n xray/bin/bash
delta:~ #
- Execute the following command inside container delta:~ # mkdir /cpu
delta:~ # mount -t cgroup -ocpu cgroup /cpuQuoted 6 lines
- delta:~ # cat /cpu/tasks
- You can see many zero's has attached with task file inside
container.It is expected behaviour of container, as PIDs in other namespaces will always be shown as 0.
So here, these 0s are from system ns (probably, as you had only system ns and delta ns).
I have been trying to fix for "for_each_process" macro related stuff wrt container code, yet I ll check out
if I am right, as I am also curious now.
Quoted 4 lines
Quoted 3 lines
As i can understand cgroup has been mounted inside container so it should attach the task which is running inside container. Please correct
Yes. and it is doing already. Only problem is unwanted 0s. Loot at the
Hi Gowri,
Yes, the problem is right here i think. Many 0s should not appear, as inside container only container process should be read. Not the root's processes.
-Rishi
Quoted 53 lines
bottom of list you get
while cat. you see numbers other than 0,which are container processes.Quoted 37 lines
me if i am wrong here.
Additional info:
rishi:~ # cat
/boot/config-2.6.27.7-4-pae| grep CGROUPCONFIG_CGROUPS=y
#CONFIG_CGROUP_DEBUGis not setCONFIG_CGROUP_NS=yCONFIG_CGROUP_DEVICE=yCONFIG_CGROUP_FREEZER=yCONFIG_CGROUP_SCHED=yCONFIG_CGROUP_CPUACCT=yCONFIG_CGROUP_MEM_RES_CTLR=y
rishi:~ # cat/boot/config-2.6.27.7-4-pae| grep_NSCONFIG_CGROUP_NS=yCONFIG_UTS_NS=yCONFIG_IPC_NS=yCONFIG_USER_NS=yCONFIG_PID_NS=yCONFIG_NF_CONNTRACK_NETBIOS_NS=mCONFIG_NSC_FIR=mCONFIG_BLK_DEV_NS87415=mCONFIG_SCSI_NSP32=mCONFIG_PATA_NS87410=mCONFIG_PATA_NS87415=mCONFIG_NS83820=mCONFIG_GAMEPORT_NS558=mCONFIG_NSC_GPIO=mCONFIG_TCG_NSC=mCONFIG_NCPFS_NFS_NS=yCONFIG_NCPFS_OS2_NS=y
rishi:~ # uname -a
Linux rishi 2.6.27.7-4-pae #1 SMP 2008-11-25 00:02:37 +0100 i686 i686 i386 GNU/Linux
rishi:~ #Quoted 7 lines
- Rishi
_______________________________________________
Containers mailing list Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
https://lists.linux-foundation.org/mailman/listinfo/containersThanks for reporting.
--
Gowrishankar
_______________________________________________
Containers mailing list Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Quoted 4 lines · gowrishankar
It is expected behaviour of container, as PIDs in other namespaces will always be shown as 0.
So here, these 0s are from system ns (probably, as you had only system ns and delta ns).
I think it is pretty bogus to be showing the 0's. It is "expected" only when we got access to a task which we were not supposed to receive.
Rishi, is this any different in behavior if you do the cgroup mount after creating the container?
-- Dave
Dave Hansen <[email protected]> wrote on 12/04/2008 07:04:23 PM:
Quoted 7 lines · gowrishankar
Quoted 5 lines
It is expected behaviour of container, as PIDs in other namespaces will
always be shown as 0.
So here, these 0s are from system ns (probably, as you had only system ns and delta ns).
Quoted 5 lines
I think it is pretty bogus to be showing the 0's. It is "expected" only when we got access to a task which we were not supposed to receive.
Rishi, is this any different in behavior if you do the cgroup mount after creating the container?
Actually i reported the problem when i am doing cgroup mount after creating container only.
But one thing is very interesting here, if i do this:
mount cgroup on root -> then create container -> cat /cpu/tasks inside container -> again you can see many zero's which is highly undesirable.
-Rishi
Quoted 3 lines
-- Dave