Re: [Lxc-users] Broken pipe when ssh from host to container

2011-12-18 Thread Serge Hallyn
Quoting Verdi March (cincaipat...@gmx.net):

...
> ifconfig br0 198.55.32.143 promisc up
...

That all looks fine...  The fact that it works fine when logging in 
from another machine but fails from the host itself must be relevant,
but how...

So your LAN is 198.55.32.X, and your containers are on 198.55.37.X...

What does netstat -nr show you?

-serge

--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] lxc-destroy does not destroy cgroup

2011-12-18 Thread Jérôme Petazzoni

On 12/18/2011 11:56 AM, C Anthony Risinger wrote:


On Dec 18, 2011 1:09 PM, "Jérôme Petazzoni" 
mailto:jerome.petazz...@dotcloud.com>> 
wrote:

>
> If that happens, just try to terminate the other processes running 
in the cgroup, rename it ("mv /cgroup/mylittlecontainer 
/cgroup/broken") and restart it.

> This saved me a few reboots already :-)

You should be able to remove an empty cgroup with `rmdir`.



Sorry, I forgot to mention:
- if you can't remove the cgroup because it's not empty,
- if the process remaining in the cgroup cannot be killed (for instance, 
because it's in "uninterruptible sleep" state),
- if you can't move the said process in a different cgroup (with e.g. 
"echo $PID > /cgroup/othercgroup/tasks"),

- ... then you can still rename the old cgroup.


--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] lxc-destroy does not destroy cgroup

2011-12-18 Thread C Anthony Risinger
On Dec 18, 2011 1:09 PM, "Jérôme Petazzoni" 
wrote:
>
> If that happens, just try to terminate the other processes running in the
cgroup, rename it ("mv /cgroup/mylittlecontainer /cgroup/broken") and
restart it.
> This saved me a few reboots already :-)

You should be able to remove an empty cgroup with `rmdir`.

--

C Anthony
--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] lxc-destroy does not destroy cgroup

2011-12-18 Thread Jérôme Petazzoni

Hi Arie,

Glad to hear that you could fix this!
Otherwise, it can happen sometimes that a cgroup is stuck with 
unkillable processes.
It can be annoying because you can't remove the cgroup, so if you want 
to start a new one with the same name, you might think you have to reboot.
If that happens, just try to terminate the other processes running in 
the cgroup, rename it ("mv /cgroup/mylittlecontainer /cgroup/broken") 
and restart it.

This saved me a few reboots already :-)

Cheers,

On 12/18/2011 10:24 AM, Arie Skliarouk wrote:
I am sorry, the problem was on my side - did a syntax mistake in the 
lxc.conf.

Disregard my previous message and continue the good job you are doing! :)

--
Arie



On Sun, Dec 18, 2011 at 18:19, Arie Skliarouk > wrote:


What could be worse than a cgroup is not deleted by lxc-destroy?
Why, inability to create a cgroup using lxc-create!

Seriously, the host machine can not start vservers anymore. This
is after one of the cgroups got stuck in the unremovable state.

With these issues it becomes harder and harder for me to justify
LXC to my boss...

--
Arie


On Tue, Dec 13, 2011 at 00:01, Serge Hallyn
mailto:serge.hal...@canonical.com>>
wrote:

Quoting Gordon Henderson (gor...@drogon.net
):
> On Thu, 8 Dec 2011, Arie Skliarouk wrote:
>
> > When I tried to restart the vserver, it did not came up.
Long story short,
> > I found that lxc-destroy did not destroy the cgroup of the
same name as the
> > server. The cgroup remains visible in the
/sys/fs/cgroup/cpu/master
> > directory. The tasks file is empty though.
>
> And just now, I've had the same thing happen - a container
failed to
> start and it left it's body in /cgroup - with empy tasks.

The patch I sent out on Friday should help handle that more
gracefully -
it moves the cgroup out of the way so a new container can
start.  You'll
need to clean the old one up by hand if you care to, though
lxc could
easily provide a tool to clean it up (and move and analyze any
tasks left
running in the cgroup, though I suspect in most cases there
are none).

-serge


--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training
event for
developers. It will provide a great way to learn Windows Azure
and what it
provides. You can attend the event by watching it streamed
LIVE online.
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/lxc-users





--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for
developers. It will provide a great way to learn Windows Azure and what it
provides. You can attend the event by watching it streamed LIVE online.
Learn more at http://p.sf.net/sfu/ms-windowsazure


___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] lxc-destroy does not destroy cgroup

2011-12-18 Thread Arie Skliarouk
I am sorry, the problem was on my side - did a syntax mistake in the
lxc.conf.
Disregard my previous message and continue the good job you are doing! :)

--
Arie



On Sun, Dec 18, 2011 at 18:19, Arie Skliarouk  wrote:

> What could be worse than a cgroup is not deleted by lxc-destroy? Why,
> inability to create a cgroup using lxc-create!
>
> Seriously, the host machine can not start vservers anymore. This is after
> one of the cgroups got stuck in the unremovable state.
>
> With these issues it becomes harder and harder for me to justify LXC to my
> boss...
>
> --
> Arie
>
>
> On Tue, Dec 13, 2011 at 00:01, Serge Hallyn wrote:
>
>> Quoting Gordon Henderson (gor...@drogon.net):
>> > On Thu, 8 Dec 2011, Arie Skliarouk wrote:
>> >
>> > > When I tried to restart the vserver, it did not came up. Long story
>> short,
>> > > I found that lxc-destroy did not destroy the cgroup of the same name
>> as the
>> > > server. The cgroup remains visible in the /sys/fs/cgroup/cpu/master
>> > > directory. The tasks file is empty though.
>> >
>> > And just now, I've had the same thing happen - a container failed to
>> > start and it left it's body in /cgroup - with empy tasks.
>>
>> The patch I sent out on Friday should help handle that more gracefully -
>> it moves the cgroup out of the way so a new container can start.  You'll
>> need to clean the old one up by hand if you care to, though lxc could
>> easily provide a tool to clean it up (and move and analyze any tasks left
>> running in the cgroup, though I suspect in most cases there are none).
>>
>> -serge
>>
>>
>> --
>> Learn Windows Azure Live!  Tuesday, Dec 13, 2011
>> Microsoft is holding a special Learn Windows Azure training event for
>> developers. It will provide a great way to learn Windows Azure and what it
>> provides. You can attend the event by watching it streamed LIVE online.
>> Learn more at http://p.sf.net/sfu/ms-windowsazure
>> ___
>> Lxc-users mailing list
>> Lxc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/lxc-users
>>
>
>
--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] lxc-destroy does not destroy cgroup

2011-12-18 Thread Arie Skliarouk
What could be worse than a cgroup is not deleted by lxc-destroy? Why,
inability to create a cgroup using lxc-create!

Seriously, the host machine can not start vservers anymore. This is after
one of the cgroups got stuck in the unremovable state.

With these issues it becomes harder and harder for me to justify LXC to my
boss...

--
Arie

On Tue, Dec 13, 2011 at 00:01, Serge Hallyn wrote:

> Quoting Gordon Henderson (gor...@drogon.net):
> > On Thu, 8 Dec 2011, Arie Skliarouk wrote:
> >
> > > When I tried to restart the vserver, it did not came up. Long story
> short,
> > > I found that lxc-destroy did not destroy the cgroup of the same name
> as the
> > > server. The cgroup remains visible in the /sys/fs/cgroup/cpu/master
> > > directory. The tasks file is empty though.
> >
> > And just now, I've had the same thing happen - a container failed to
> > start and it left it's body in /cgroup - with empy tasks.
>
> The patch I sent out on Friday should help handle that more gracefully -
> it moves the cgroup out of the way so a new container can start.  You'll
> need to clean the old one up by hand if you care to, though lxc could
> easily provide a tool to clean it up (and move and analyze any tasks left
> running in the cgroup, though I suspect in most cases there are none).
>
> -serge
>
>
> --
> Learn Windows Azure Live!  Tuesday, Dec 13, 2011
> Microsoft is holding a special Learn Windows Azure training event for
> developers. It will provide a great way to learn Windows Azure and what it
> provides. You can attend the event by watching it streamed LIVE online.
> Learn more at http://p.sf.net/sfu/ms-windowsazure
> ___
> Lxc-users mailing list
> Lxc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users
>
--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] reading hwclock from container

2011-12-18 Thread Zhu Yanhai
2011/12/18 DTK :
> I am trying to avoid having to install NTP in every container, so I
> came up with following idea.
>
> Main server cron job
>
>        * 0 *  * * /sbin/hwclock -w
>
> Each container has following cron job
>
>        10 0 *  * * /sbin/hwclock -s
>
> However, the container can't access /dev/rtc and I am guessing that
> has something to do with my cgroup config line:
>
>       lxc.cgroup.devices.allow = c 254:0 rwm # rtc
>
> Anyway I can fix this? Or get the same result some other way?
>
> --
> Learn Windows Azure Live!  Tuesday, Dec 13, 2011
> Microsoft is holding a special Learn Windows Azure training event for
> developers. It will provide a great way to learn Windows Azure and what it
> provides. You can attend the event by watching it streamed LIVE online.
> Learn more at http://p.sf.net/sfu/ms-windowsazure
> ___
> Lxc-users mailing list
> Lxc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users

IMHO if you just want to keep reading the same time on all the guests,
then you need to do nothing to achieve this, it's already there. Since
you are using one single setup of kernel and hardware. Running ntpd on
the guests is unnecessary.

--
Thanks,
Zhu Yanhai

--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] reading hwclock from container

2011-12-18 Thread Ulli Horlacher
On Sat 2011-12-17 (14:38), DTK wrote:
> I am trying to avoid having to install NTP in every container, so I
> came up with following idea.
> 
> Main server cron job
> 
> * 0 *  * * /sbin/hwclock -w
> 
> Each container has following cron job
> 
> 10 0 *  * * /sbin/hwclock -s
> 
> However, the container can't access /dev/rtc and I am guessing that
> has something to do with my cgroup config line:
> 
>lxc.cgroup.devices.allow = c 254:0 rwm # rtc
> 
> Anyway I can fix this? Or get the same result some other way?

Run ntpd on the server host.
time is a kernel issue and you have only one kernel running.

-- 
Ullrich Horlacher  Server- und Arbeitsplatzsysteme
Rechenzentrum  E-Mail: horlac...@rus.uni-stuttgart.de
Universitaet Stuttgart Tel:++49-711-685-65868
Allmandring 30 Fax:++49-711-682357
70550 Stuttgart (Germany)  WWW:http://www.rus.uni-stuttgart.de/
REF: 

--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users