Re: [lxc-users] Attach a lxc container to an existing cgroup ?

2014-03-19 Thread Serge Hallyn
Quoting Sébastien Kurtzemann (fai...@kurtzemann.fr): > Hi all, > > My idea is to create a "parent" cgroup which defined customer's > ressources like cpu, mem, ... > For example I've a cgroup called "customer1" on the subsystem "cpuset" > on which I pin the first cpu (cpuset.cpus = 1) > > In this

[lxc-users] Attach a lxc container to an existing cgroup ?

2014-03-19 Thread Sébastien Kurtzemann
Hi all, My idea is to create a "parent" cgroup which defined customer's ressources like cpu, mem, ... For example I've a cgroup called "customer1" on the subsystem "cpuset" on which I pin the first cpu (cpuset.cpus = 1) In this "parent" cgroup I wanted 3 containers which represent customer enviro

Re: [lxc-users] Ubuntu container upstart and graceful shutdown

2014-03-19 Thread Serge Hallyn
Quoting Michael H. Warfield (m...@wittsend.com): > On Wed, 2014-03-19 at 18:21 +0100, Robin Monjo wrote: > > Hello, > > > > > > I'm using LXC 0.7.5 with the stock ubuntu template. My containers are > > running ruby processes that are managed by upstart (launched by > > upstart scripts). > > > >

Re: [lxc-users] Ubuntu container upstart and graceful shutdown

2014-03-19 Thread Tamas Papp
On 03/19/2014 06:21 PM, Robin Monjo wrote: > Hello, > > I'm using LXC 0.7.5 with the stock ubuntu template. My containers are > running ruby processes that are managed by upstart (launched by > upstart scripts). > > I need these processes to be gracefully stopped when shutting down a > container,

Re: [lxc-users] Ubuntu container upstart and graceful shutdown

2014-03-19 Thread Michael H. Warfield
On Wed, 2014-03-19 at 18:21 +0100, Robin Monjo wrote: > Hello, > > > I'm using LXC 0.7.5 with the stock ubuntu template. My containers are > running ruby processes that are managed by upstart (launched by > upstart scripts). > > > I need these processes to be gracefully stopped when shutting d

Re: [lxc-users] Ubuntu container upstart and graceful shutdown

2014-03-19 Thread Robin Monjo
Thank you for your answer, I made a little experiment to show my point: I made a simple script: --- #!/bin/bash function cleanup () { while true do sleep 0.1; echo "sigint received" >> /home/ubuntu/shutdown.txt;

[lxc-users] Ubuntu container upstart and graceful shutdown

2014-03-19 Thread Robin Monjo
Hello, I'm using LXC 0.7.5 with the stock ubuntu template. My containers are running ruby processes that are managed by upstart (launched by upstart scripts). I need these processes to be gracefully stopped when shutting down a container, i.e send the SIGTERM signal and wait for it to be done bef