Re: [lxc-devel] [PATCH 0/7] Last minute signal stuff (now in separate mails)

2010-06-07 Thread Daniel Lezcano
On 06/06/2010 11:07 PM, Ferenc Wagner wrote:
 Hi,

 The first part is some tinkering to make lxc compile under Debian Lenny.

 The dangerous part is the signal forwarding and the process group
 business I was playing with recently.  It contains Greg's idea about
 setting the foreground process group and also inverts the signal
 selection logic.

 Which means it's only slightly tested in its present form, but I
 wanted to get this out of the door ASAP, so you can get an idea what
 I'm up to.  I'll continue testing it tomorrow and will followup with
 the results.

 Regards,
 Feri.


 Ferenc Wagner (7):
conditional use of new capabilities
uint32_t is defined in stdint.h
.gitignore new components
start child in its own process group, and put it into the foreground
lxc-start isn't in the foreground anymore, so TTY signals don't reach it
forward signals to the container init
generalize the name of the signal handler

   .gitignore  |3 ++
   src/lxc/conf.c  |4 +++
   src/lxc/start.c |   59 
 ++
   src/lxc/utils.h |   27 -
   4 files changed, 44 insertions(+), 49 deletions(-)


Hi Ferenc,

I will  takes the fixes not related to the signal forwarding:

  - [PATCH 1/7] conditional use of new capabilities
  - [PATCH 2/7] uint32_t is defined in stdint.h
  - [PATCH 3/7] .gitignore new components

Thanks a lot.
   -- Daniel

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel


[lxc-devel] patch to fix up utmp handling in utmp.c

2010-06-07 Thread atp
Hello,

  This patch changes the way utmp is handled to be far more robust. It
allows shutdown for fedora core 12, by instigating a timer once the
shutdown is noticed in utmp to check the number of tasks remaining, as
well as allowing the /var/run/utmp file to be deleted and remade (for
example during boot). Depending on whats in the run levels it will
enable container shutdown and reboot on a wider range of container 
operating systems. 

  Theres a one line fix to lxc.spec.in as well, as a recent patch to 
move lxc-init out of libexec broke make rpm.
 
Signed-off-by: Andy Phillips a...@lmax.com

Andrew Phillips
Head of Systems

www.lmax.com 

Office: +44 203 1922509
Mobile: +44 (0)7595 242 900

LMAX | Level 2, Yellow Building | 1 Nicholas Road | London | W11 4AN




The information in this e-mail and any attachment is confidential and is 
intended only for the named recipient(s). The e-mail may not be disclosed or 
used by any person other than the addressee, nor may it be copied in any way. 
If you are not a named recipient please notify the sender immediately and 
delete any copies of this message. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden. Any view or 
opinions presented are solely those of the author and do not necessarily 
represent those of the company.diff --git a/src/lxc/utmp.c b/src/lxc/utmp.c
index 319a5ce..166b24d 100644
--- a/src/lxc/utmp.c
+++ b/src/lxc/utmp.c
@@ -28,6 +28,8 @@
 #include stdlib.h
 #include fcntl.h
 #include sys/inotify.h
+#include sys/ioctl.h
+#include sys/timerfd.h
 
 #include conf.h
 #include cgroup.h
@@ -41,21 +43,128 @@
 
 lxc_log_define(lxc_utmp, lxc);
 
+typedef void (*lxc_mainloop_timer_t) (void *data);
+
+static int utmp_get_runlevel(struct lxc_conf *conf);
+static int utmp_get_ntasks(struct lxc_handler *handler);
+static int utmp_shutdown_handler(int fd, void *data,
+ struct lxc_epoll_descr *descr);
+static int lxc_utmp_add_timer(struct lxc_epoll_descr *descr,
+			  lxc_mainloop_callback_t callback, void *data);
+static int lxc_utmp_del_timer(struct lxc_epoll_descr *descr);
+
+static char container_prev_runlevel = 'N', container_curr_runlevel = 'N';
+
+#define CONTAINER_STARTING  0
+#define CONTAINER_REBOOTING 1
+#define CONTAINER_HALTING   2
+#define CONTAINER_RUNNING   4
+
+static char container_state = CONTAINER_STARTING;
+
+/* Not wild about timer_fd. However we want to test and call _del_timer from
+ * utmp_handler, and I can't see a neat way of accessing the timer_fd, as
+ * opposed to utmp_handler's inotify fd, short of searching the list 
+ * of lxc_handlers, but then without the fd, we can't even search in the way
+ * lxc_mainloop_del_handler does. 
+ * 
+ * This limits us to only one timer so its not as generic a solution as 
+ * I'd have liked. 
+ * 
+ * timercreate_fd file descriptor for utmp_shutdown_handler
+ */
+static int timer_fd = -1;
+
 static int utmp_handler(int fd, void *data, struct lxc_epoll_descr *descr)
 {
-	struct inotify_event ie;
-	struct utmpx *utmpx;
+	struct inotify_event *ie;
+	int size, ret, length;
+
 	struct lxc_handler *handler = (struct lxc_handler *)data;
 	struct lxc_conf *conf = handler-conf;
-	char prevrun_level = 'N', currun_level = 'N';
-	int ntasks, ret;
-	char path[MAXPATHLEN];
 
-	if (read(fd, ie, sizeof(ie))  0) {
-		SYSERROR(failed to read utmp notification);
+	/* we're monitoring a directory. ie-name is not included in sizeof(struct inotify_event)
+	 * if we don't read it all at once, read gives us EINVAL, so we read and cast to struct ie
+	 */
+	char buffer[MAXPATHLEN];
+
+	if (ioctl(fd, FIONREAD, size)  0) {
+		SYSERROR(cannot determine the size of this notification);
+		return -1;
+	}
+
+	if (read(fd, buffer, size)  0) {
+		SYSERROR(failed to read notification);
 		return -1;
 	}
 
+	ie = (struct inotify_event *)buffer;
+
+	if (ie-len = 0) {
+		SYSERROR(inotify event with no name);
+		return -1;
+	}
+
+	ret = 0;
+
+	DEBUG(got inotify event %d for %s, ie-mask, ie-name);
+
+	length = (4  ie-len) ? 4 : ie-len;
+
+	/* only care about utmp */
+
+	if (!strncmp(ie-name, utmp, length)) {
+
+		if (ie-mask  IN_CREATE)
+			ret = utmp_get_runlevel(conf);
+
+		if (ie-mask  IN_MODIFY)
+			ret = utmp_get_runlevel(conf);
+
+		if (ret  0)
+			goto out;
+
+		/* container halting, from running or starting state */
+		if (container_curr_runlevel == '0'
+		 ((container_state == CONTAINER_RUNNING)
+			|| (container_state == CONTAINER_STARTING))) {
+			container_state = CONTAINER_HALTING;
+			if (timer_fd == -1)
+lxc_utmp_add_timer(descr, utmp_shutdown_handler,
+		   data);
+			DEBUG(Container halting);
+		}
+
+		/* container rebooting, from running or starting state */
+		if (container_curr_runlevel == '6'
+		 ((container_state == CONTAINER_RUNNING)
+			|| (container_state == CONTAINER_STARTING))) {
+			container_state = CONTAINER_REBOOTING;
+			if (timer_fd == -1)
+lxc_utmp_add_timer(descr, utmp_shutdown_handler,
+		   data);
+			

[lxc-devel] [GIT] lxc branch, master, updated. dd04402dd9c26127973dc5836d2befa28496f125

2010-06-07 Thread Daniel Lezcano
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project lxc.

The branch, master has been updated
   via  dd04402dd9c26127973dc5836d2befa28496f125 (commit)
   via  09d1bd237e75e4b3d915b8ae5f979eb883833563 (commit)
   via  9527e566fcb52d851533d41b549e2cf523dfd95b (commit)
   via  91e7929dc4a4f826094751348ce730bc33a3e962 (commit)
   via  b6e91b67178aa06eeae82bb09bd5eee2869689de (commit)
   via  f1fa1a0866f2dc4ff0fc48f58d8a261b21b7d888 (commit)
   via  5bad66ba56376dcf9804e72b70bba16a2462c2fe (commit)
   via  bc24fe4d8ae55d6b9af5c86a6eafd9ff674507cc (commit)
   via  c01d62f21b21ba6c2b8b78ab3c2b37cc8f8fd265 (commit)
   via  d6b1784e1e76426fa0e10c1f3e3f2705d0b62f86 (commit)
   via  a7405925092586b4a16841f2418fab3620a548df (commit)
  from  5b406adb506fff621e03be524b1529f31846b0f7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit dd04402dd9c26127973dc5836d2befa28496f125
Author: Daniel Lezcano dlezc...@fr.ibm.com
Date:   Mon Jun 7 11:33:56 2010 +0200

update .gitignore with new location

Signed-off-by: Daniel Lezcano dlezc...@fr.ibm.com

commit 09d1bd237e75e4b3d915b8ae5f979eb883833563
Author: Ferenc Wagner wf...@niif.hu
Date:   Mon Jun 7 11:33:56 2010 +0200

uint32_t is defined in stdint.h

Signed-off-by: Ferenc Wagner wf...@niif.hu
Signed-off-by: Daniel Lezcano dlezc...@fr.ibm.com

commit 9527e566fcb52d851533d41b549e2cf523dfd95b
Author: Ferenc Wagner wf...@niif.hu
Date:   Mon Jun 7 11:33:56 2010 +0200

conditional use of new capabilities

Signed-off-by: Ferenc Wagner wf...@niif.hu
Signed-off-by: Daniel Lezcano dlezc...@fr.ibm.com

commit 91e7929dc4a4f826094751348ce730bc33a3e962
Author: Ferenc Wagner wf...@niif.hu
Date:   Mon Jun 7 11:33:56 2010 +0200

.gitignore new components

Signed-off-by: Ferenc Wagner wf...@niif.hu
Signed-off-by: Daniel Lezcano dlezc...@fr.ibm.com

commit b6e91b67178aa06eeae82bb09bd5eee2869689de
Author: Daniel Lezcano daniel.lezc...@free.fr
Date:   Mon Jun 7 11:33:55 2010 +0200

update the fedora template

Update the fedora template in order to call it from the lxc-create
script.

Signed-off-by: Daniel Lezcano dlezc...@fr.ibm.com

commit f1fa1a0866f2dc4ff0fc48f58d8a261b21b7d888
Author: Daniel Lezcano daniel.lezc...@free.fr
Date:   Mon Jun 7 11:33:55 2010 +0200

generate locales on debian

Let's do like the ubuntu template and generate locales automatically.

Signed-off-by: Daniel Lezcano dlezc...@fr.ibm.com

commit 5bad66ba56376dcf9804e72b70bba16a2462c2fe
Author: Daniel Lezcano daniel.lezc...@free.fr
Date:   Mon Jun 7 11:33:55 2010 +0200

ubunutu - fix ssh runlevel stop condition

The default ssh upstart configuration makes the daemon to respawn
either if we are shutdowning.

Signed-off-by: Daniel Lezcano dlezc...@fr.ibm.com

commit bc24fe4d8ae55d6b9af5c86a6eafd9ff674507cc
Author: Wilhelm Meier wilhelm.me...@fh-kl.de
Date:   Mon Jun 7 11:33:55 2010 +0200

few enhancement on the ubuntu template

Improved and cleanup the ubuntu template.

Signed-off-by: Daniel Lezcano dlezc...@fr.ibm.com
Signed-off-by: Wilhelm Meier wilhelm.me...@fh-kl.de

commit c01d62f21b21ba6c2b8b78ab3c2b37cc8f8fd265
Author: Daniel Lezcano dlezc...@fr.ibm.com
Date:   Mon Jun 7 11:33:55 2010 +0200

move script templates to an adequate place

At present the lxc-{template} scripts are installed in the $bindir.
This is not the right place as specified by the FHS, so they go to
$libdir/lxc/templates.

Signed-off-by: Daniel Lezcano dlezc...@fr.ibm.com

commit d6b1784e1e76426fa0e10c1f3e3f2705d0b62f86
Author: Daniel Lezcano daniel.lezc...@free.fr
Date:   Mon Jun 7 11:33:55 2010 +0200

add console login in ubuntu

Added console login

Signed-off-by: Daniel Lezcano dlezc...@fr.ibm.com

commit a7405925092586b4a16841f2418fab3620a548df
Author: Andrew Phillips andrew.phill...@lmax.com
Date:   Mon Jun 7 11:33:55 2010 +0200

Fix spec file

After I resynced to git head I noticed that this commit;

http://lxc.git.sourceforge.net/git/gitweb.cgi?p=lxc/lxc;a=commit;h=d674be08d4b282bb4717c51440811e39d3c2431e

 broke the rpm build.

This patch fixes this.

Signed-off-by: Daniel Lezcano dlezc...@fr.ibm.com
Signed-off-by: Andrew Phillips andrew.phill...@lmax.com

---

Summary of changes:
 .gitignore   |   11 +-
 Makefile.am  |4 +-
 configure.ac |   13 +-
 lxc.spec.in 

Re: [lxc-devel] [PATCH 0/7] Last minute signal stuff (now in separate mails)

2010-06-07 Thread Ferenc Wagner
Daniel Lezcano daniel.lezc...@free.fr writes:

 On 06/06/2010 11:07 PM, Ferenc Wagner wrote:

 The first part is some tinkering to make lxc compile under Debian Lenny.

 The dangerous part is the signal forwarding and the process group
 business I was playing with recently.  It contains Greg's idea about
 setting the foreground process group and also inverts the signal
 selection logic.

 Which means it's only slightly tested in its present form, but I
 wanted to get this out of the door ASAP, so you can get an idea what
 I'm up to.  I'll continue testing it tomorrow and will followup with
 the results.

 Ferenc Wagner (7):
conditional use of new capabilities
uint32_t is defined in stdint.h
.gitignore new components
start child in its own process group, and put it into the foreground
lxc-start isn't in the foreground anymore, so TTY signals don't reach it
forward signals to the container init
generalize the name of the signal handler

 I will take the fixes not related to the signal forwarding:

  - [PATCH 1/7] conditional use of new capabilities
  - [PATCH 2/7] uint32_t is defined in stdint.h
  - [PATCH 3/7] .gitignore new components

Ok, that's the uncontroversial part.  Patch 4 has a whitespace error,
and patch 5 lost an #endif, so I'll resend them anyway.  I wonder how
the latter didn't surface on my home machine...  But there's another
failure I get on my work machine (with my original patchset with the
above errors corrected):

gcc -I../../src -g -O2 -g -Wall -O2 -Wall -Wl,-E -Wl,-rpath -Wl,/usr/lib/lxc  
-o lxc-attach lxc_attach.o liblxc.so 
liblxc.so: undefined reference to `lxc_sync_init'
liblxc.so: undefined reference to `lxc_sync_fini_parent'
liblxc.so: undefined reference to `lxc_sync_barrier_parent'
liblxc.so: undefined reference to `lxc_sync_fini_child'
liblxc.so: undefined reference to `lxc_sync_wake_parent'
liblxc.so: undefined reference to `lxc_sync_wait_child'
liblxc.so: undefined reference to `lxc_sync_fini'
liblxc.so: undefined reference to `lxc_sync_barrier_child'
collect2: ld returned 1 exit status

Have you got an idea what may be wrong here?  I'll continue
investigation after lunch.
-- 
Thanks,
Feri.

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel


Re: [lxc-devel] [PATCH 0/7] Last minute signal stuff (now in separate mails)

2010-06-07 Thread Daniel Lezcano
On 06/07/2010 12:37 PM, Ferenc Wagner wrote:
 Daniel Lezcanodaniel.lezc...@free.fr  writes:


 On 06/06/2010 11:07 PM, Ferenc Wagner wrote:

  
 The first part is some tinkering to make lxc compile under Debian Lenny.

 The dangerous part is the signal forwarding and the process group
 business I was playing with recently.  It contains Greg's idea about
 setting the foreground process group and also inverts the signal
 selection logic.

 Which means it's only slightly tested in its present form, but I
 wanted to get this out of the door ASAP, so you can get an idea what
 I'm up to.  I'll continue testing it tomorrow and will followup with
 the results.

 Ferenc Wagner (7):
 conditional use of new capabilities
 uint32_t is defined in stdint.h
 .gitignore new components
 start child in its own process group, and put it into the foreground
 lxc-start isn't in the foreground anymore, so TTY signals don't reach it
 forward signals to the container init
 generalize the name of the signal handler

 I will take the fixes not related to the signal forwarding:

   - [PATCH 1/7] conditional use of new capabilities
   - [PATCH 2/7] uint32_t is defined in stdint.h
   - [PATCH 3/7] .gitignore new components
  
 Ok, that's the uncontroversial part.  Patch 4 has a whitespace error,
 and patch 5 lost an #endif, so I'll resend them anyway.  I wonder how
 the latter didn't surface on my home machine...  But there's another
 failure I get on my work machine (with my original patchset with the
 above errors corrected):

 gcc -I../../src -g -O2 -g -Wall -O2 -Wall -Wl,-E -Wl,-rpath -Wl,/usr/lib/lxc  
 -o lxc-attach lxc_attach.o liblxc.so
 liblxc.so: undefined reference to `lxc_sync_init'
 liblxc.so: undefined reference to `lxc_sync_fini_parent'
 liblxc.so: undefined reference to `lxc_sync_barrier_parent'
 liblxc.so: undefined reference to `lxc_sync_fini_child'
 liblxc.so: undefined reference to `lxc_sync_wake_parent'
 liblxc.so: undefined reference to `lxc_sync_wait_child'
 liblxc.so: undefined reference to `lxc_sync_fini'
 liblxc.so: undefined reference to `lxc_sync_barrier_child'
 collect2: ld returned 1 exit status

 Have you got an idea what may be wrong here?  I'll continue
 investigation after lunch.


Do you have a compilation warning ?

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel


[lxc-devel] [GIT] lxc branch, master, updated. 79881dc61f912321f3004531711071a051f80220

2010-06-07 Thread Daniel Lezcano
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project lxc.

The branch, master has been updated
   via  79881dc61f912321f3004531711071a051f80220 (commit)
  from  dd04402dd9c26127973dc5836d2befa28496f125 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit 79881dc61f912321f3004531711071a051f80220
Author: Daniel Lezcano dlezc...@fr.ibm.com
Date:   Mon Jun 7 13:25:30 2010 +0200

fix ipv6 acast / mcast restriction

Pointer comparison is buggy as they are never null.
For an ipv6 address configuration, we always zeroed the structure,
hence the bcast and acast structure are equal to in6addr_any.

Any change of this value means the user specified something different
in the configuration file, so we fail gracefully.

Signed-off-by: Daniel Lezcano dlezc...@fr.ibm.com

---

Summary of changes:
 src/lxc/network.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
lxc

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel


[lxc-devel] [GIT] lxc branch, master, updated. 89875e177f53385b556c5e33ec32bf4de4ae5a89

2010-06-07 Thread Daniel Lezcano
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project lxc.

The branch, master has been updated
   via  89875e177f53385b556c5e33ec32bf4de4ae5a89 (commit)
   via  7ddc8f2451f714659aa9d1ba720a34a525926be5 (commit)
  from  79881dc61f912321f3004531711071a051f80220 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit 89875e177f53385b556c5e33ec32bf4de4ae5a89
Author: Daniel Lezcano dlezc...@fr.ibm.com
Date:   Mon Jun 7 14:31:56 2010 +0200

update .gitignore

Signed-off-by: Daniel Lezcano dlezc...@fr.ibm.com

commit 7ddc8f2451f714659aa9d1ba720a34a525926be5
Author: Daniel Lezcano dlezc...@fr.ibm.com
Date:   Mon Jun 7 14:31:56 2010 +0200

fix return code

Return a negative instead of a positive value.

Signed-off-by: Daniel Lezcano dlezc...@fr.ibm.com

---

Summary of changes:
 .gitignore|   20 +++-
 src/lxc/network.c |2 +-
 2 files changed, 4 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
lxc

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel


Re: [lxc-devel] [PATCH 0/7] Last minute signal stuff (now in separate mails)

2010-06-07 Thread Daniel Lezcano
On 06/07/2010 03:27 PM, Ferenc Wagner wrote:
 Daniel Lezcanodaniel.lezc...@free.fr  writes:

 On 06/07/2010 12:37 PM, Ferenc Wagner wrote:

 there's another failure I get on my work machine (with my original
 patchset with the above errors corrected):

 gcc -I../../src -g -O2 -g -Wall -O2 -Wall -Wl,-E -Wl,-rpath 
 -Wl,/usr/lib/lxc  -o lxc-attach lxc_attach.o liblxc.so
 liblxc.so: undefined reference to `lxc_sync_init'
 liblxc.so: undefined reference to `lxc_sync_fini_parent'
 liblxc.so: undefined reference to `lxc_sync_barrier_parent'
 liblxc.so: undefined reference to `lxc_sync_fini_child'
 liblxc.so: undefined reference to `lxc_sync_wake_parent'
 liblxc.so: undefined reference to `lxc_sync_wait_child'
 liblxc.so: undefined reference to `lxc_sync_fini'
 liblxc.so: undefined reference to `lxc_sync_barrier_child'
 collect2: ld returned 1 exit status

 Have you got an idea what may be wrong here?  I'll continue
 investigation after lunch.

 Do you have a compilation warning ?

 No real compilation warning, only this:

 make[2]: Entering directory 
 `/build/wferi-lxc_0.6.6~gitf814275a-1-i386-T7QsnO/lxc-0.6.6~gitf814275a/src'
 cd ..  /bin/sh 
 /build/wferi-lxc_0.6.6~gitf814275a-1-i386-T7QsnO/lxc-0.6.6~gitf814275a/config/missing
  --run autoheader
 /build/wferi-lxc_0.6.6~gitf814275a-1-i386-T7QsnO/lxc-0.6.6~gitf814275a/config/missing:
  line 54: autoheader: command not found
 WARNING: `autoheader' is missing on your system.  You should only need it if
   you modified `acconfig.h' or `configure.ac'.  You might want
   to install the `Autoconf' and `GNU m4' packages.  Grab them
   from any GNU archive site.
 touch: cannot touch `[src/config.h].in': No such file or directory
 rm -f stamp-h1
 touch config.h.in

 It's probably some unfortunate interaction with the Debian build system.
 If I rerun autogen.sh on the build system (the source is prepared on
 another system with a different automake version), the build succeeds.

 This didn't cause problems before.  Now I switched to treating the git
 checkout as the original source, and the problem disappeared.  Looks
 like it's nothing to worry about, after all.

ok.

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel


[lxc-devel] devpts instances

2010-06-07 Thread Ferenc Wagner
Hi,

Reading the kernel documentation of devpts, I got the impression that if
the host uses the legacy devpts mode, root in a container can always
mount its devpts instance.  Is this really so?  If yes, it might be
worth noting somewhere near the lxc.pts option.  And a kernel option to
disable legacy devpts mounts...

(Unrelated note: lxc.console is totally undocumented.)

A related note: if access to /dev/ptmx (c 5:2) is denied by cgroup, my
application container can't even start with a rather puzzling error:

lxc-start: File exists - failed to symlink '/dev/pts/ptmx'-'/dev/ptmx'

The symlink goes the other way, and the recommended setup is
/dev/ptmx - pts/ptmx (a relative link, but it probably doesn't matter).
Anyway, I'd rather lxc not modify my rootfs, and especially not without
telling me about it.  I don't understand why devpts.txt favors symlinks
to bind mounts, that would be good to know.

And yes, /dev/ptmx is present in my (read-only) root filesystem, and
access(/dev/ptmx, F_OK) seems to fail if cgroup denies access.  Using
access() is usually frowned upon because it's racy, anyway...  To
conclude this incoherent babbling: does setup_pts() in conf.c do
anything which couldn't be easily done by mount entries and/or modifying
the rootfs beforehand?  If this complexity is really needed, we really
should document it to some extent.

One last point: the out: label in setup_pts() should precede the INFO()
call, shouldn't it?
-- 
Cheers,
Feri.

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel