Hello,

> -----Original Message-----
> From: [email protected] [mailto:lxc-users-
> [email protected]] On Behalf Of Kevin Wilson
> Sent: Friday, January 03, 2014 11:42 AM
> To: LXC users mailing-list
> Subject: [lxc-users] Cannot stop busybox container
> 
> Hello, lxc-users,
> 
> I work with latest lxc from git.
> I created a busybox container (with -t busybox).
> 
> I create a bridge on the host (virbr0).
> When I start the busybox container, I see:
> 
> udhcpc (v1.19.4) started
> Sending discover...
> Sending discover...
> Sending discover...
> ...
> and many more "Sending discover..." messages.
> 
> There is no DHCP server in the LAN.
> I have two questions:
> 1) Is it possible to configure the busybox container so that it will not
>     start that udhcpc daemon and/or that it will not try to send these
> DHCP discover messages ? \

You will have to disable the udhcpc process in 
$(container_rootfs)/etc/init.d/rcS:

#!/bin/sh
/bin/syslogd
/bin/mount -a
#/bin/udhcpc

You can do this several ways:
- in the git you need to comment / edit the line in 
$(git_repo)/templates/lxc-busybox.in - then compile and install the package
- if you installed lxc, but haven't created the container, you may edit the 
template file - $(install_prefix)/share/lxc/templates/lxc-busybox - and comment 
the line
- if you already created the container, edit the file in the rootfs - 
$(container_rootfs)/etc/init.d/rcS

> 2) I try to stop the busybox container (which is called busyboxCT) with
> lxc-stop -n busyboxCT
> and I wait over 10 minutes and it was not stopped, and the DHCP
> messages were still sent out from it.
> Is there a way to stop that container in such a case?

You may try to kill the container, instead of asking it to stop nicely, using 
"lxc-stop -n busyboxCT -k".

I've had this issue with busybox as well - the reason was that lxc-stop sends 
SIGPWR to the container init - which is busybox-init - and there was no handler 
implemented for this signal. You might have this issue with your busybox 
version as well. I've sent a patch for this [1] and it was included in the 
latest release.

Regards,
Bogdan P.

[1] 
http://git.busybox.net/busybox/commit/?id=760fc6debcba8cb5ca8d8e2252fac3757c453e11

> 
> regards,
> Kevin
> _______________________________________________
> lxc-users mailing list
> [email protected]
> http://lists.linuxcontainers.org/listinfo/lxc-users
> 

_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to