[Bug 981955] Re: lxc-execute does not seem to work in precise

2012-04-20 Thread Serge Hallyn
How did you create this container?

If I do:

sudo lxc-create -t ubuntu -n e1
sudo chroot /var/lib/lxc/e1/rootfs apt-get update
sudo chroot /var/lib/lxc/e1/rootfs apt-get install lxc
sudo lxc-execute -n e1 /bin/echo hi

I get

lxc-init: failed to mount /dev/shm : No such file or directory
hi

If you don't install lxc in the container, you should get an error about
not being able to execute lxc-init, but the error about not executing
(null) is simply odd.

Your host is precise?

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/981955

Title:
  lxc-execute does not seem to work in precise

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/981955/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


Re: [Bug 981955] Re: lxc-execute does not seem to work in precise

2012-04-20 Thread Robert Collins
Hi, the wiki page I was following had no container, it was using an
implicit one or something - that gave me the impression it could just
act as an isolation layer around / , isolating only the things
configured (e.g. dev access, or networking).

That said, lxc-execute with an ephemeral mode looks like it would do
exactly what LP needs for test running :)

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/981955

Title:
  lxc-execute does not seem to work in precise

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/981955/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 981955] Re: lxc-execute does not seem to work in precise

2012-04-20 Thread B Clausius
Sorry for the incomplete info

I am using a container without rootfs.
Just type for a not existing container test:
$ sudo lxc-execute -n test /bin/echo hi
lxc-execute: Invalid argument - failed to get real path for '(null)'
lxc-execute: failed to pin the container's rootfs
lxc-execute: failed to spawn 'test'
lxc-execute: No such file or directory - failed to remove cgroup 
'/sys/fs/cgroup//lxc/test'

or use a container ceated with:
$ sudo lxc-create -n test
No config file specified, using the default config
'test' created

I used different configs and it seams it is caused by the missing
rootfs.

Such simple things worked in the past at least under Natty, but not in
precise.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/981955

Title:
  lxc-execute does not seem to work in precise

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/981955/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 981955] Re: lxc-execute does not seem to work in precise

2012-04-20 Thread Serge Hallyn
Ah.  I see now.  Thanks, guys.

There are actually two things you need to add to a configuration file to
make this work.  If I do:

cat  test.conf  EOF
lxc.aa_profile = unconfined
lxc.rootfs = /
EOF

lxc-execute -n test -f test.conf -- /bin/echo hi

That works for me.

Skipping the pinning of rootfs when lxc.rootfs = NULL would seem
sensible.  I'm not sure what we should do about the apparmor profile for
this case.

** Changed in: lxc (Ubuntu)
   Status: Incomplete = Confirmed

** Summary changed:

- lxc-execute does not seem to work in precise
+ lxc-execute without config does not seem to work in precise

** Changed in: lxc (Ubuntu)
   Importance: High = Low

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/981955

Title:
  lxc-execute without config does not seem to work in precise

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/981955/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


Re: [Bug 981955] Re: lxc-execute does not seem to work in precise

2012-04-20 Thread Robert Collins
Thanks Serge!

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/981955

Title:
  lxc-execute without config does not seem to work in precise

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/981955/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 981955] Re: lxc-execute does not seem to work in precise

2012-04-19 Thread B Clausius
** Attachment added: debug.out
   
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/981955/+attachment/3092780/+files/debug.out

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/981955

Title:
  lxc-execute does not seem to work in precise

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/981955/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 981955] Re: lxc-execute does not seem to work in precise

2012-04-16 Thread Serge Hallyn
Thanks for reporting this bug.

The output (in particular '(null)' looks strange.

Is lxc installed in the container?  In particular, does it have
/usr/lib/lxc/lxc-init and all its dependencies installed?

Can you give the contents of debug.out after running:

   lxc-execute -l DEBUG -o debug.out -n test /bin/bash


** Changed in: lxc (Ubuntu)
   Importance: Undecided = High

** Changed in: lxc (Ubuntu)
   Status: New = Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/981955

Title:
  lxc-execute does not seem to work in precise

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/981955/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs