Re: [Lxc-users] /proc/stat

2011-01-06 Thread C Anthony Risinger
On Wed, Jan 5, 2011 at 9:33 PM, Sergio Daniel Troiano
sergio.troi...@elserver.com wrote:

 Anthony,

 I need to know the state (waiting i/o ,running or runnable) of every porcess 
 within each container.
 what you told me only shows PID's created within the container .
 May be i haven't   explained clearly.

or maybe i just glazed it too quickly :-)

 I know i can see that watching the file /proc/stat but it is a global state.
 I need to watch the field called procs_running separated for each container.

i'm not sure off-hand as i haven't actually used LXC in some time, but
everything useful will be in the cgroup hierarchy; /proc is not
containerized, AFAIK... indefinitely.  if the cgroup you've mounted
includes all of the `modules` (i forget the actual term), you will
have many pseudo files to use, and one or a combination of them likely
has the information you seek.

sorry i can't be more specific, but everything you can use will be in
cgroup; you'll have to forget about /proc :-( though you may also
consider putting each process into it's own cgroup... just depends of
whether that makes sense in you're use case.

C Anthony

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] rootfs backup

2011-01-06 Thread C Anthony Risinger
On Thu, Jan 6, 2011 at 12:02 PM, Noah Campbell noahcampb...@gmail.com wrote:

 With my limited knowledge of lxc, I would recommend looking at a filesystem 
 that supports snapshots.

yes, in the past i've used btrfs for this (.32 kernel).  some will say
that it's not suitable for use (and in some situations it may not be),
but imo, it's stable enough for my uses; i've had a server running
since .32 was released (2 yrs?) hosting several btrfs-based containers
without any issue... and btrfs was only considered ready for early
adopters at that point.

using a couple of template subvolumes, i was able to snapshot them
into usable domains in  1 second, and create backups just as fast,
while at the same time reusing blocks and saving enormous amounts of
disk space.

works like a treat :-) i plan on using it extensively very soon for an
updated KVM+LXC server using libvirt.

C Anthony

psdepending on how... bold... you are, there are LZO compression
patches queued for .38:

http://www.spinics.net/lists/linux-btrfs/msg07748.html

and some dedup work is basic but workable:

http://www.spinics.net/lists/linux-btrfs/msg07819.html
http://www.spinics.net/lists/linux-btrfs/msg07820.html

both will be very useful for containerized environments.

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] poor performance between host and container

2011-01-06 Thread Papp Tamas

On 01/05/2011 10:45 AM, Daniel Lezcano wrote:

 AFAIR, the mtu should fit the mtu of the bridge.

 Let us know if 
 http://comments.gmane.org/gmane.linux.kernel.containers.lxc.general/663 fixed 
 your problem.

MTU was fine but this helped:

/usr/sbin/ethtool -K br0 sg off
/usr/sbin/ethtool -K br0 tso off


Thank you,

tamas

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


[Lxc-users] lxc-execute: Input/output error - failed to read

2011-01-06 Thread Mike Ivanov
Hi there,

This is what happens on a freshly installed Ubuntu 10.10 Maverick 
Meerkat (2.6.35):

# lxc-version
lxc version: 0.7.2

# mkdir /lxc
# /usr/lib/lxc/templates/lxc-ubuntu -p /lxc
.
I: Retrieving tar
I: Validating tar
I: Retrieving tzdata
I: Validating tzdata
I: Retrieving udev
.
Please change root-password !

# ls
config  fstab  rootfs

# cat config
lxc.utsname = xxx

lxc.tty = 4
lxc.pts = 1024
lxc.rootfs = /lxc/rootfs
lxc.mount  = /lxc/fstab

lxc.cgroup.devices.deny = a
# /dev/null and zero
lxc.cgroup.devices.allow = c 1:3 rwm
lxc.cgroup.devices.allow = c 1:5 rwm
# consoles
lxc.cgroup.devices.allow = c 5:1 rwm
lxc.cgroup.devices.allow = c 5:0 rwm
lxc.cgroup.devices.allow = c 4:0 rwm
lxc.cgroup.devices.allow = c 4:1 rwm
# /dev/{,u}random
lxc.cgroup.devices.allow = c 1:9 rwm
lxc.cgroup.devices.allow = c 1:8 rwm
lxc.cgroup.devices.allow = c 136:* rwm
lxc.cgroup.devices.allow = c 5:2 rwm
# rtc
lxc.cgroup.devices.allow = c 254:0 rwm

# cat fstab
proc/lxc/rootfs/proc procnodev,noexec,nosuid 0 0
devpts  /lxc/rootfs/dev/pts  devpts defaults 0 0
sysfs   /lxc/rootfs/sys  sysfs defaults  0 0


All was perfect so far.
Now, this is the place where things become less beautiful:

# lxc-execute -n xxx -f config /bin/bash
r...@xxx:/# lxc-execute: Input/output error - failed to read
r...@xxx:/# r...@xxx:/# exit

[2]+  Stopped lxc-execute -n xxx -f config /bin/bash

# fg
lxc-execute -n xxx -f config /bin/bash
#

Note it somehow manages to send itself to background.

lxc-start simply hangs. When /sbin/init is started with --verbose it 
says somewhere in the middle:

init: mountall main process (3) executable changed
init: hostname main process (4) terminated with status 1
init: hostname goal changed from start to stop


Now, what's interesting, if I comment out the lxc.rootfs line in config, 
it gives me perfectly functional bash:

# lxc-execute -n xxx -f config /bin/bash
r...@xxx:/lxc# pwd
/lxc
r...@xxx:/lxc# ps ax
   PID TTY  STAT   TIME COMMAND
 1 ?S  0:00 /usr/lib/lxc/lxc-init -- /bin/bash
 2 ?S  0:00 /bin/bash
12 ?R+ 0:00 ps ax
r...@xxx:/lxc#


Even more interesting: if I add a line like lxc.rootfs = / to the 
config file (/ is the default value, right?) it breaks again:

# lxc-execute -n xxx -f config /bin/bash
r...@xxx:/# lxc-execute: Input/output error - failed to read


So my question is what I'm doing wrong? If that's not me, is it 
something fixed in 0.7.3?

Thanks,
Mike




--
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] lxc-execute: Input/output error - failed to read

2011-01-06 Thread Mike Ivanov
On 11-01-06 6:02 PM, Mike Ivanov wrote:
 # lxc-execute -n xxx -f config /bin/bash
 r...@xxx:/# lxc-execute: Input/output error - failed to read

BTW, exactly the same happens to containers created with the lxc-sshd 
template.

Mike


--
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users