Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 519690 - app-emulation/lxc-1.0.4 – lxc-start: No such file or directory - failed to mount '…' on '/usr/lib/lxc/rootfs/usr/portage/distfiles'
Summary: app-emulation/lxc-1.0.4 – lxc-start: No such file or directory - failed to mo...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-12 08:07 UTC by Dennis Schridde
Modified: 2014-10-18 16:59 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info app-emulation/lxc (emerge-lxc.info,5.02 KB, text/plain)
2014-08-12 08:11 UTC, Dennis Schridde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2014-08-12 08:07:36 UTC
With app-emulation/lxc-1.0.4, I would assume that lxc-create creates a working container, but it does no. Instead I get an error about certain paths not existing.

This is probably because the Gentoo LXC template / create script makes a wrong assumption about the behaviour of relative paths within the LXC container configuration, which results in: "lxc-start: No such file or directory – …"

```
# lxc-create -t gentoo -n test
### set_default_arch: default arch/variant autodetect...
 => Got: arch=amd64 variant=amd64
Attempting to obtain an exclusive lock (timeout: 60 sec) named "cache-amd64-amd64"...
 => done.
 => Executing "do_all"
##### container_setup(): starting container setup
### container_precheck(): doing some pre-start checks ...
#### container_rootfs(): copying rootfs /etc/lxc/test/rootfs from cache /var/cache/lxc/gentoo/rootfs-amd64-amd64 ...
chroot test... OK
 => done
#### container_consoles(): setting container consoles ...
 => main console + 1 ttys
 => done
#### container_tz(): setting container timezone ...
 => host localtime copyed to container
#### container_portage(): setting container portage...
Warnings are normal here, don't worry
!!! Section 'x-portage' in repos.conf has location attribute set to nonexistent directory: '/usr/portage'
!!! Section 'gentoo' in repos.conf has location attribute set to nonexistent directory: '/usr/portage'
!!! Invalid Repository Location (not a dir): '/usr/portage'
!!! Section 'x-portage' in repos.conf has location attribute set to nonexistent directory: '/usr/portage'
!!! Section 'gentoo' in repos.conf has location attribute set to nonexistent directory: '/usr/portage'
!!! Invalid Repository Location (not a dir): '/usr/portage'
trying to guess portage_dir from host...
 => portage stuff done, see /etc/portage/make.conf for additionnal tricks
container_net(): setting container network conf...
 * service net.eth0 added to runlevel default
 => network conf done.
#### container_hostname(): setting hostname...
 => done.
#### container_auth(): setting authentification...
 setting password for root ...
BAD PASSWORD: it is too short
BAD PASSWORD: is too simple
  => done. if you didn't specify , default is 'toor'
 => done.
#### container_sshd(): enabling sshd...
 * service sshd added to runlevel sysinit
 => done.
container_configuration(): making lxc configuration file...
 => done.
###### container_setup(): container should be ready to start!


You could now use you container with: lxc-start -n test
little things you should know about your container:
=> rootfs of container is : /etc/lxc/test/rootfs
=> config of container is : /etc/lxc/test/config
=> timezone was staticly copyed from host
=> container has a shared portage from host's /var/cache/portage/gentoo to usr/portage
=> Warning, these veth NIC don't have fixed hwaddr :
 eth0

see http://lists.linuxcontainers.org/pipermail/lxc-devel/2013-December/006736.html
and man lxc.conf
=> Connection user is root
=> root has the default password 'toor', please change it ASAP
(reverse-i-search)`nan': ^Cno /usr/share/lxc/config/gentoo.moresecure.conf
# lxc-start -n test
lxc-start: No such file or directory - failed to mount '/var/cache/portage/gentoo/distfiles' on '/usr/lib/lxc/rootfs/usr/portage/distfiles'
lxc-start: failed to setup the mount entries for 'test'
lxc-start: failed to setup the container
lxc-start: invalid sequence number 1. expected 2
lxc-start: failed to spawn 'test'
lxc-start: The container failed to start.
lxc-start: Additional information can be obtained by setting the --logfile and --log-priority options.
```
Comment 1 Dennis Schridde 2014-08-12 08:11:25 UTC
Created attachment 382714 [details]
emerge --info app-emulation/lxc
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2014-10-18 16:59:19 UTC
Hi,

bugs for the gentoo templates should be filed upstream

https://github.com/lxc/lxc/issues