[systemd-devel] systemd 225: cannot override nspawn service

crequill crequill at worldonline.fr
Wed Sep 9 02:48:47 PDT 2015


Hi,

All was running fine with systemd 218.
With nspawn systemd 225, always on archlinux, I've a lot of problems:

1/ I cannot login anymore on containers (/sbin/getatty exist in container):
Failed to get login PTY: No such file or directory

2/ override of nspwawn file seems not to be charged (see my first message):
I've discovered that directory used is now /var/lib/machines (before it was
/var/lib/container). I've corrected in override.conf. With systemd-analyze
dump, I've seen the override file is used but the private network is not up
(I didn't see on host a ve interface).

3/ if I boot one container with: systemd-nspawn -bD
/var/lib/machines/ci-container/ -n, the container boots, the ve interface
is up on host and I have a prompt but netctl cannot see the interface in
container!

[root at ci-container netctl]# systemctl status netctl at host0.service
* netctl at host0.service - Networking for netctl profile host0
   Loaded: loaded (/usr/lib/systemd/system/netctl at .service; static; vendor
preset: disabled)
   Active: failed (Result: exit-code) since Wed 2015-09-09 11:11:11 CEST;
7s ago
     Docs: man:netctl.profile(5)
  Process: 42 ExecStart=/usr/lib/network/network start %I (code=exited,
status=1/FAILURE)
 Main PID: 42 (code=exited, status=1/FAILURE)

Sep 09 11:11:11 ci-container systemd[1]: Starting Networking for netctl
profile host0...
Sep 09 11:11:11 ci-container network[42]: Starting network profile
'host0'...
Sep 09 11:11:11 ci-container systemd[1]: netctl at host0.service: Main process
exited, code=exited, status=1/FAILURE
Sep 09 11:11:11 ci-container systemd[1]: Failed to start Networking for
netctl profile host0.
Sep 09 11:11:11 ci-container systemd[1]: netctl at host0.service: Unit entered
failed state.
Sep 09 11:11:11 ci-container systemd[1]: netctl at host0.service: Failed with
result 'exit-code'.
Sep 09 11:11:11 ci-container network[42]: Interface 'host0' does not exist
Sep 09 11:11:11 ci-container network[42]: Failed to bring the network up
for profile 'host0'
[root at ci-container netctl]# ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode
DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: host0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT
group default qlen 1000
    link/ether 36:15:87:7b:9a:dd brd ff:ff:ff:ff:ff:ff ip:

iproute2 is working:
[root at ci-container netctl]# ip a add 192.186.66.10/24 dev host0
[root at ci-container netctl]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group
default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: host0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 1000
    link/ether 36:15:87:7b:9a:dd brd ff:ff:ff:ff:ff:ff
    inet 192.186.66.10/24 scope global host0
       valid_lft forever preferred_lft forever


Is this a configuration migration problem from systemd 218 to 225?

Best regards
Christophe

2015-09-08 19:42 GMT+02:00 <crequill at worldonline.fr>:

> Hi,
>
> With systemd 225 on an archlinux, I cannot override a nspawn service
> anymore.
> Example:
>
> One container named ci-container, declared as this :
> # ls -al /etc/systemd/system/machines.target.wants/
> total 8
> drwxr-xr-x 2 root root 4096  8 sept. 16:06 .
> drwxr-xr-x 8 root root 4096  8 sept. 16:06 ..
> lrwxrwxrwx 1 root root   47  8 sept. 16:06 systemd-nspawn at ci\x2dcontainer.service
> -> /usr/lib/systemd/system/systemd-nspawn at .service
>
> With an override in
> /etc/systemd/system/systemd-nspawn at ci-container.service.d/
> total 12
> drwxr-xr-x 2 root root 4096  8 sept. 16:12 .
> drwxr-xr-x 8 root root 4096  8 sept. 16:06 ..
> -rw-r--r-- 1 root root  156  8 sept. 16:12 override.conf
>
> Here is the file /etc/systemd/system/systemd-nspawn at ci-container.service.d/override.conf
> :
> [Service]
> ExecStart=
> ExecStart=/usr/bin/systemd-nspawn --quiet --keep-unit --boot
> --link-journal=try-guest --network-macvlan=enp3s1f0 --private-network
> --directory=/var/lib/container/%i
>
> But when the container boot, there is no macvlan interface in it.
> This was working well with systemd 218. Where is the problem ?
>
> Many thanks for your reply.
> Christophe
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150909/71f144e4/attachment-0001.html>


More information about the systemd-devel mailing list