[Lxc-users] ubuntu / lucid container not starting / mountall not sending events

Daniel Lezcano daniel.lezcano at free.fr
Wed Jan 12 21:47:11 UTC 2011


On 01/12/2011 10:02 PM, Serge E. Hallyn wrote:
> Quoting Daniel Lezcano (daniel.lezcano at free.fr):
>> On 01/12/2011 06:51 PM, Serge E. Hallyn wrote:
>>> Quoting Arie Skliarouk (skliarie at gmail.com):
>>>> Hi,
>>>>
>>>> The script did not run on "start on startup", only on "start on filesystem"
>>>> setting. Still, the /etc/init/rc.conf was not processed.
>>> I'm seeing this too now in a natty container.  If you do
>>>
>>> cat<<   EOF>>   /etc/init/lxclo.conf
>>> description "fake lo coming up"
>>>
>>> start on startup
>>>
>>> task
>>>
>>> exec /sbin/initctl emit net-device-up IFACE=lo
>>> EOF
>>>
>>> that should kick rc-sysinit to start, or at least did on my
>>> natty and maverick tests using the template.
>> Do you know why that happens ? I mean there is a loopback device for the
>> container, so this event should be fired, no ?
>> Or is it related to udev ?
> No, I just finally found it a little while ago - it comes from a
> change in /etc/network/if-up.d/upstart, which now says:
>
> if [ "$IFACE" = lo ]; then
> 	exit 0 # emission handled by /etc/init/network-interface.conf
> fi
>
> and didn't use to.
>
> When you get net-device-added, then /etc/init/network-interface.conf
> runs, and for lo it manually emits a signal.
>
> But in a container, we never get net-device-up events, so

Why do we never get this event ?

> /etc/init/network-interface.conf doesn't run.  Instead our interfaces
> come up through /etc/init/networking.conf, which does 'ifup -a'.
>
> I'm playing with upstart scripts to fix this.  I'm hoping upstart
> will accept a patch letting me pass a "--emit lxc" argument to
> init.  Then we can have /etc/init/lxc.conf *always*installed*,
> which has
>
> 	start on lxc
>
> So if we run on bare metal, it wont' run, but if it runs in a
> container, it does, and it can emit events like
> 	net-device-added IFACE=lo
> which otherwise don't happen in a container.
>
> -serge
>





More information about the lxc-users mailing list