[systemd-devel] Failed to register machine: Unit machine-test\x2dserver.scope already exists.

Peter Paule systemd-devel at fedux.org
Tue Mar 17 03:44:16 PDT 2015


Hi,

this seems to be reproducible.

Every time I run

   # systemd-nspawn -bxM test-server

And killing the container via

   test-server login: ^]^]
   Container test-server terminated by signal KILL.

And starting the container again afterwards I get the error:

   # systemd-nspawn -bxM test-server
   Spawning container test-server on  
/var/lib/machines/.#test-serverd200e7948d69f51e.
   Press ^] three times within 1s to kill container.
   Failed to register machine: Unit machine-test\x2dserver.scope  
already exists.

In some cases the error does not occure.

/pp

Quoting Peter Paule <systemd-devel at fedux.org>:

> Hi,
>
> after killing a container started via "systemd-nspawn" I get the  
> following error message:
>
>   Failed to register machine: Unit machine-test\x2dserver.scope  
> already exists.
>
> Using google I found the following bug report:
>
>   https://bugs.freedesktop.org/show_bug.cgi?id=68370
>
> I'm running Arch Linux
>
>   # uname -a
>   Linux test1.ib.vrnetze.de 3.18.6-1-ARCH #1 SMP PREEMPT Sat Feb 7  
> 08:44:05 CET 2015 x86_64 GNU/Linux
>
> And I've got systemd 219 installed from the [testing]-repository
>
>   $ pacman -Qi systemd
>   Name           : systemd
>   Version        : 219-1
>   Description    : system and service manager
>   Architecture   : x86_64
>
> I installed the dkr image by using "machinectl"
>
>   $ sudo machinectl pull-dkr feduxorg/test-server --dkr-index-url  
> https://index.docker.io --verify=no --force
>
> I ran the dkr image by using "systemd-nspawn"
>
>   # systemd-nspawn -xbM test-server
>
> And killed the machine with "^]^]^]".
>
> After that I am not able to start the machine again:
>
>   # systemd-nspawn -bxM test-server
>   Spawning container test-server on  
> /var/lib/machines/.#test-server4f0158116691c25f.
>   Press ^] three times within 1s to kill container.
>   Failed to register machine: Unit machine-test\x2dserver.scope  
> already exists.
>
> When listing all machines, there is no machine
>
>   # machinectl list
>   MACHINE CLASS SERVICE
>
>   0 machines listed.
>
> I found the scope which is given in the error message, when using  
> the "--all"-flag
>
>   # systemctl list-units --all
>   [...]
>   machine-test\x2dserver.scope                                        
>        loaded    inactive dead      Container test-server
>   [...]
>
> To get rid of that scope I needed to disable it
>
>   systemctl disable machine-test\x2dserver.scope
>
>
> Did I do something wrong or is it a bug in the kernel/systemd?
>
> Thanks a lot.
>
> /pp
>
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel





More information about the systemd-devel mailing list