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

2011-01-13 Thread Arie Skliarouk
Yes, the following command helped:
initctl emit -n net-device-up IFACE=lo LOGICAL=lo ADDRFAM=inet
METHOD=loopback

Thank you for the hint!
--
Arie
--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
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] ubuntu / lucid container not starting / mountall not sending events

2011-01-12 Thread Trent W. Buck
"Serge E. Hallyn" 
writes:

> 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.

Hmph; I mentioned this weeks ago (26 Nov 2010, according to git):

# cat /etc/init/lxc.conf
description "LXC vs. Upstart workarounds"
start on startup
task
console output
script
 # As lxc 0.7's halt/reboot detection hack needs /var/run to NOT be a
 # tmpfs, we need to manually clean it -- esp. the ifstate file that
 # tells falsely tells ifupdown "lo is up".
 #
 # To debug, add -printf "Deleting stale file %p\n" before -delete.
 find /var/run/ -xdev -not -path /var/run/ -delete
 initctl emit -n stopped JOB=udevtrigger
 initctl emit -n started JOB=udev
 # This one is needed for broken ifupdown NMU 0.6.8ubuntu29.1
 initctl emit -n net-device-up IFACE=lo LOGICAL=lo ADDRFAM=inet 
METHOD=loopback
end script


--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
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] ubuntu / lucid container not starting / mountall not sending events

2011-01-12 Thread Serge E. Hallyn
Quoting Daniel Lezcano (daniel.lezc...@free.fr):
> On 01/12/2011 10:02 PM, Serge E. Hallyn wrote:
> >But in a container, we never get net-device-up events, so
> 
> Why do we never get this event ?

Sorry, I meant we never get net-device-added events.

Those events come only from upstart-udev-bridge, which in turn
forwards them from a udev add event.

-serge

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
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] ubuntu / lucid container not starting / mountall not sending events

2011-01-12 Thread Daniel Lezcano
On 01/12/2011 10:02 PM, Serge E. Hallyn wrote:
> Quoting Daniel Lezcano (daniel.lezc...@free.fr):
>> On 01/12/2011 06:51 PM, Serge E. Hallyn wrote:
>>> Quoting Arie Skliarouk (sklia...@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
>


--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
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] ubuntu / lucid container not starting / mountall not sending events

2011-01-12 Thread Serge E. Hallyn
Quoting Daniel Lezcano (daniel.lezc...@free.fr):
> On 01/12/2011 06:51 PM, Serge E. Hallyn wrote:
> > Quoting Arie Skliarouk (sklia...@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
/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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
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] ubuntu / lucid container not starting / mountall not sending events

2011-01-12 Thread Daniel Lezcano
On 01/12/2011 06:51 PM, Serge E. Hallyn wrote:
> Quoting Arie Skliarouk (sklia...@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 ?




--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
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] ubuntu / lucid container not starting / mountall not sending events

2011-01-12 Thread Serge E. Hallyn
Quoting Arie Skliarouk (sklia...@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.

-serge

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
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] ubuntu / lucid container not starting / mountall not sending events

2011-01-12 Thread Arie Skliarouk
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.
BTW, my system does not hang, it starts ssh properly.

Could it be related to duplicate mounts reported by df? :
*r...@master2:~# df
Filesystem   1K-blocks  Used Available Use% Mounted on
rootfs   909177556 871911312  37266244  96% /
/dev/mapper/pl-srv   909177556 871911312  37266244  96% /
none   3057772   272   3057500   1% /dev/console
none   3057772   272   3057500   1% /dev/tty1
none   3057772   272   3057500   1% /dev/tty2
none   3057772   272   3057500   1% /dev/tty3
none   3057772   272   3057500   1% /dev/tty4
none   3057772   272   3057500   1% /dev
none   3062604 0   3062604   0% /dev/shm
none   306260420   3062584   1% /var/run
none   3062604 0   3062604   0% /var/lock
none   3062604 0   3062604   0% /lib/init/rw*

Neither /etc/fstab of the container, nor lxc.conf file specify mounting of
the /var/run filesystem (which I heard to be problematic for LXC
containers).

--
Arie



On Wed, Jan 12, 2011 at 16:49, Serge E. Hallyn
wrote:

> Quoting Arie Skliarouk (sklia...@gmail.com):
> > I have the same problem as the original poster. A lucid container boots
> and
> > ssh is started, but nothing else:
> >
> > *r...@master2:~# ps awx
> >   PID TTY  STAT   TIME COMMAND
> > 1 ?Ss 0:00 /sbin/init
> >34 ?S  0:00 upstart-udev-bridge --daemon
> >50 ?S >94 ?Ss 0:00 /usr/sbin/sshd
> >   111 ?Ss 0:00 sshd: r...@pts/134
> >   125 pts/134  Ss 0:00 -bash
> >   137 pts/134  R+ 0:00 ps awx*
> >
> > How can I make upstart to start other services, especially the
> > /etc/init/rc.conf one?
>
> If you look at the /usr/lib/lxc/templates/lxc-ubuntu that ships
> with lxc, it installs a /etc/init/lxc.conf which kicks the boot
> along.  It sends two upstart events, but in some testing last
> night my boot continued fine without those - what was absolutely
> essential was the
>
>rm -rf /var/run/*.pid
>rm -rf /var/run/network/*
>
> Without those, my boot hung.
>
> So you should be able to create any /etc/init/kickme.conf, just
> make sure it has:
>
> description "kick upstart"
> start on startup
> script
>rm -rf /var/run/*.pid
>rm -rf /var/run/network/*
> end script
>
> -serge
>
--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
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] ubuntu / lucid container not starting / mountall not sending events

2011-01-12 Thread Serge E. Hallyn
Quoting Arie Skliarouk (sklia...@gmail.com):
> I have the same problem as the original poster. A lucid container boots and
> ssh is started, but nothing else:
> 
> *r...@master2:~# ps awx
>   PID TTY  STAT   TIME COMMAND
> 1 ?Ss 0:00 /sbin/init
>34 ?S  0:00 upstart-udev-bridge --daemon
>50 ?S94 ?Ss 0:00 /usr/sbin/sshd
>   111 ?Ss 0:00 sshd: r...@pts/134
>   125 pts/134  Ss 0:00 -bash
>   137 pts/134  R+ 0:00 ps awx*
> 
> How can I make upstart to start other services, especially the
> /etc/init/rc.conf one?

If you look at the /usr/lib/lxc/templates/lxc-ubuntu that ships
with lxc, it installs a /etc/init/lxc.conf which kicks the boot
along.  It sends two upstart events, but in some testing last
night my boot continued fine without those - what was absolutely
essential was the

rm -rf /var/run/*.pid
rm -rf /var/run/network/*

Without those, my boot hung.

So you should be able to create any /etc/init/kickme.conf, just
make sure it has:

description "kick upstart"
start on startup
script
rm -rf /var/run/*.pid
rm -rf /var/run/network/*
end script

-serge

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
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] ubuntu / lucid container not starting / mountall not sending events

2011-01-12 Thread Arie Skliarouk
I have the same problem as the original poster. A lucid container boots and
ssh is started, but nothing else:

*r...@master2:~# ps awx
  PID TTY  STAT   TIME COMMAND
1 ?Ss 0:00 /sbin/init
   34 ?S  0:00 upstart-udev-bridge --daemon
   50 ?S--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
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] ubuntu / lucid container not starting / mountall not sending events

2010-10-28 Thread Daniel Lezcano
On 10/28/2010 09:08 AM, Wilhelm wrote:
> Hi all,
>
> just installed a fresh lucid container (using lxc-ubuntu template) and
> noticed, that the container does not start fully functional, because
> mountall does not send any events! So the other upstart-jobs are not
> triggered.
>
> When I start mountall --debug it says that it has mounted all
> filesystems - therefore the event "filesystem" should have been sent to
> init. So I used init --debug and it says for the mountall process that
> it ignores one event: well, I don't know exactly what that meens.
>
> Has anyone experienced these problems with a lucid container?
>
> Btw, a maverick container works (after modification of the lxc-ubuntu
> template, and yes, I will send an update of the template!
>

Hi Wilhem,

at present I am at the Ubuntu Developer Summit and hopefully I can ask 
to the upstart maintainer about this problem :)

   -- Daniel

--
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users