Debian Bug report logs - #991773
libvirt-daemon-driver-lxc: container reboot done from inside or outside container shuts container down

version graph

Package: libvirt-daemon-driver-lxc; Maintainer for libvirt-daemon-driver-lxc is Debian Libvirt Maintainers <pkg-libvirt-maintainers@lists.alioth.debian.org>; Source for libvirt-daemon-driver-lxc is src:libvirt (PTS, buildd, popcon).

Reported by: Alexis Huxley <alexishuxley@gmail.com>

Date: Sun, 1 Aug 2021 14:39:01 UTC

Severity: normal

Found in version libvirt/7.0.0-3

Fixed in version libvirt/7.10.0-2

Done: Andrea Bolognani <eof@kiyuko.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Libvirt Maintainers <pkg-libvirt-maintainers@lists.alioth.debian.org>:
Bug#991773; Package libvirt-daemon-driver-lxc. (Sun, 01 Aug 2021 14:39:03 GMT) (full text, mbox, link).


Acknowledgement sent to Alexis Huxley <alexishuxley@gmail.com>:
New Bug report received and forwarded. Copy sent to Debian Libvirt Maintainers <pkg-libvirt-maintainers@lists.alioth.debian.org>. (Sun, 01 Aug 2021 14:39:03 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Alexis Huxley <alexishuxley@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libvirt-daemon-driver-lxc: container reboot done from inside or outside container shuts container down
Date: Sun, 01 Aug 2021 16:37:13 +0200
Package: libvirt-daemon-driver-lxc
Version: 7.0.0-3
Severity: normal

Dear Maintainer,

A Debian 11 RC2 container running on a Debian 11 RC2 hosts responds
to the reboot command by shutting down services and then powering
off, *not* by rebooting, which is what I would expect.

This applies regardless of whether I:

* run 'reboot' inside the container
* run 'virsh reboot' on the host
* run 'kill -SIGINT 1' inside the container

This is consistently reproducible.

Here's output from trying it with 'virsh reboot', as it's the
most copy-and-paste-able:

	pestaroli# export LIBVIRT_DEFAULT_URI=lxc:///
	pestaroli# virsh list --all
	 Id   Name      State
	--------------------------
	 -    mafalde   shut off
	
	pestaroli# virsh start mafalde
	Domain 'mafalde' started
	
	pestaroli# virsh list --all
	 Id       Name      State
	-----------------------------
	 467946   mafalde   running
	
	pestaroli# virsh reboot mafalde
	Domain 'mafalde' is being rebooted
	
	pestaroli# virsh list --all
	 Id   Name      State
	--------------------------
	 -    mafalde   shut off       <-------------- should be 'running'!
	
	pestaroli# 

I am submitting this bug report against the libvirt-daemon-driver-lxc
package because /usr/lib/libvirt/libvirt_lxc is the parent of the
container's init process:

	root      468678  0.0  0.4 355008 17096 ?        Sl   15:26   0:00 /usr/lib/libvirt/libvirt_lxc --name mafalde --console 30 --security=apparmor --handshake 34 --veth vnet77
	100000    468681  0.7  0.2  99948 10008 ?        Ss   15:26   0:00  \_ /sbin/init
	100000    468713  0.3  0.3  31932 13016 ?        Ss   15:26   0:00      \_ /lib/systemd/systemd-journald
	100105    468770  0.1  0.1   7952  4332 ?        Ss   15:26   0:00      \_ /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
	
but it might well be that the bug is in another package (I think
you are more qualified to judge that than I am), so please reassign
if you think appropriate.  In case it is relevant, here are the
lxc/libvirt/systemd packages installed on the host:

	pestaroli# dpkg -l | egrep '(lxc|libvirt|systemd)'
	ii  liblxc1:amd64                        1:4.0.6-2                      amd64        Linux Containers userspace tools (library)
	ii  libnss-systemd:amd64                 247.3-6                        amd64        nss module providing dynamic user and group name resolution
	ii  libpam-systemd:amd64                 247.3-6                        amd64        system and service manager - PAM module
	ii  libsystemd0:amd64                    247.3-6                        amd64        systemd utility library
	ii  libvirt-clients                      7.0.0-3                        amd64        Programs for the libvirt library
	ii  libvirt-daemon                       7.0.0-3                        amd64        Virtualization daemon
	ii  libvirt-daemon-config-network        7.0.0-3                        all          Libvirt daemon configuration files (default network)
	ii  libvirt-daemon-config-nwfilter       7.0.0-3                        all          Libvirt daemon configuration files (default network filters)
	ii  libvirt-daemon-driver-lxc            7.0.0-3                        amd64        Virtualization daemon LXC connection driver
	ii  libvirt-daemon-driver-qemu           7.0.0-3                        amd64        Virtualization daemon QEMU connection driver
	ii  libvirt-daemon-system                7.0.0-3                        amd64        Libvirt daemon configuration files
	ii  libvirt-daemon-system-systemd        7.0.0-3                        all          Libvirt daemon configuration files (systemd)
	ii  libvirt0:amd64                       7.0.0-3                        amd64        library for interfacing with different virtualization systems
	ii  lxc                                  1:4.0.6-2                      amd64        Linux Containers userspace tools
	ii  lxc-templates                        3.0.4-5                        amd64        Linux Containers userspace tools (templates)
	ii  lxcfs                                4.0.7-1                        amd64        FUSE based filesystem for LXC
	ii  systemd                              247.3-6                        amd64        system and service manager
	ii  systemd-container                    247.3-6                        amd64        systemd container/nspawn tools
	ii  systemd-sysv                         247.3-6                        amd64        system and service manager - SysV links
	pestaroli# 

and here is the container's XML:

	pestaroli# virsh dumpxml mafalde 
	<domain type='lxc'>
	  <name>mafalde</name>
	  <uuid>8489584a-c8f3-4dc7-a163-2b0e20eba7da</uuid>
	  <memory unit='KiB'>1048576</memory>
	  <currentMemory unit='KiB'>1048576</currentMemory>
	  <vcpu placement='static'>1</vcpu>
	  <resource>
	    <partition>/machine</partition>
	  </resource>
	  <os>
	    <type arch='x86_64'>exe</type>
	    <init>/sbin/init</init>
	  </os>
	  <idmap>
	    <uid start='0' target='100000' count='65536'/>
	    <gid start='0' target='100000' count='65536'/>
	  </idmap>
	  <features>
	    <privnet/>
	  </features>
	  <clock offset='utc'/>
	  <on_poweroff>destroy</on_poweroff>
	  <on_reboot>restart</on_reboot>
	  <on_crash>destroy</on_crash>
	  <devices>
	    <emulator>/usr/lib/libvirt/libvirt_lxc</emulator>
	    <filesystem type='mount' accessmode='mapped'>
	      <source dir='/var/lib/libvirt/mountpoints/mafalde/root'/>
	      <target dir='/'/>
	    </filesystem>
	    <interface type='bridge'>
	      <mac address='00:16:3e:c4:bc:69'/>
	      <source bridge='br0'/>
	    </interface>
	    <console type='pty'>
	      <target type='lxc' port='0'/>
	    </console>
	  </devices>
	</domain>
	
	pestaroli# 

For comparison:

A Debian 11 RC2 container running on a Debian 10.10 host responds
to the reboot command by shutting down services and then hangs
(I waited about 10 minutes) without turning off with the last message:

	[  OK  ] Reached target Reboot.

A Debian 10.10 container running on a Debian 10.10 hosts responds
to the reboot command by shutting down services and then hangs
(I waited about 10 minutes) without turning off with the last messages:

	[  OK  ] Reached target Reboot.
	logout

If you need more info or have packages you'd like me to test, then
just let me know. 

Thanks for your support,

Alexis

PS standard '-- System Information' section of this reportbug-based
   report deleted as it pertains to the host I am submitting the 
   report from, not the host on which the bug was seen.



Message sent on to Alexis Huxley <alexishuxley@gmail.com>:
Bug#991773. (Wed, 22 Dec 2021 23:42:02 GMT) (full text, mbox, link).


Message #8 received at 991773-submitter@bugs.debian.org (full text, mbox, reply):

From: Andrea Bolognani <noreply@salsa.debian.org>
To: 991773-submitter@bugs.debian.org
Subject: Bug#991773 marked as pending in libvirt
Date: Wed, 22 Dec 2021 23:39:28 +0000
Control: tag -1 pending

Hello,

Bug #991773 in libvirt reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/libvirt-team/libvirt/-/commit/9ae5f1419d8d57f573533582d928a78dcf367792

------------------------------------------------------------------------
Fix reboot command for LXC containers (Closes: #991773)
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/991773



Added tag(s) pending. Request was from Andrea Bolognani <noreply@salsa.debian.org> to 991773-submitter@bugs.debian.org. (Wed, 22 Dec 2021 23:42:02 GMT) (full text, mbox, link).


Reply sent to Andrea Bolognani <eof@kiyuko.org>:
You have taken responsibility. (Wed, 29 Dec 2021 11:21:14 GMT) (full text, mbox, link).


Notification sent to Alexis Huxley <alexishuxley@gmail.com>:
Bug acknowledged by developer. (Wed, 29 Dec 2021 11:21:14 GMT) (full text, mbox, link).


Message #15 received at 991773-close@bugs.debian.org (full text, mbox, reply):

From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
To: 991773-close@bugs.debian.org
Subject: Bug#991773: fixed in libvirt 7.10.0-2
Date: Wed, 29 Dec 2021 11:19:49 +0000
Source: libvirt
Source-Version: 7.10.0-2
Done: Andrea Bolognani <eof@kiyuko.org>

We believe that the bug you reported is fixed in the latest version of
libvirt, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 991773@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andrea Bolognani <eof@kiyuko.org> (supplier of updated libvirt package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 29 Dec 2021 10:37:15 +0100
Source: libvirt
Architecture: source
Version: 7.10.0-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Libvirt Maintainers <pkg-libvirt-maintainers@lists.alioth.debian.org>
Changed-By: Andrea Bolognani <eof@kiyuko.org>
Closes: 991773
Changes:
 libvirt (7.10.0-2) unstable; urgency=medium
 .
   * Team upload
 .
   [ Andrea Bolognani ]
   * [26f63eb] control: Build-Depend on python3:any to fix cross-building
   * [b14268f] patches: Backport fix for CVE-2021-4147
 .
   [ Joachim Falk ]
   * [9ae5f14] Fix reboot command for LXC containers (Closes: #991773)
Checksums-Sha1:
 9087d01c469d3581be37b7b10fe262cab4d6b5fa 5653 libvirt_7.10.0-2.dsc
 a0c4e9abf8c71c5b272fb17e4aefbaebbec3f1d7 84356 libvirt_7.10.0-2.debian.tar.xz
 49ec1b5a0e010b7ad70ee44239ff5e02ae937aa4 13975 libvirt_7.10.0-2_source.buildinfo
Checksums-Sha256:
 c7952e086d24360d4a1ad18e331224bdb53cbf93f4d5c079a53fcac869d1bc21 5653 libvirt_7.10.0-2.dsc
 bb0f88507a14cdfabc51ba74920ae3a676980f760e79a4ffae01967d0f7bd330 84356 libvirt_7.10.0-2.debian.tar.xz
 29dcef4d7e4cd30c6dd78840b6f4eccfae0297c5ddc8a1c2e898c4e8ddcd1f47 13975 libvirt_7.10.0-2_source.buildinfo
Files:
 4a9287653665307eead48ae05fcac7eb 5653 libs optional libvirt_7.10.0-2.dsc
 bd59e6296b5c5af2057a0f1011a2787e 84356 libs optional libvirt_7.10.0-2.debian.tar.xz
 0fc873e6224668aca264328a3040750b 13975 libs optional libvirt_7.10.0-2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJDBAEBCgAtFiEEO48t9niVypx3EjLf954fxUKFg6wFAmHMPxgPHGVvZkBraXl1
a28ub3JnAAoJEPeeH8VChYOs7GsP/i7BeMNV2SJSCMGFFFu4wwmYvCZVh7C9oc8P
T4rJ57CcjeuBKJQJoPGQTK9T59tbzS80YRIQI9yRj9sZTzm9yBjo3aCCbWdHqvJc
DoF/17pANRuIlFrDJy72bTJrIHh3tEXoxTV6/hf25nVDHj/toZWVMJbadJB41g8C
4yLVsDfn/moIucM2m288j5+MCzIcc/Bh8AahZ9n370Rv1UXB3E1dO4fJ/h5fKaFQ
o6OD0BqWg0xoKP8Z7UHGsmHYkxojmTNi49MpJ4xv/HmGmodfM8rwPp9h89I/J6eU
jc7kyQleoLEAmFcMntJEe3E5DiVl6kC3RirqiJ3N85Ipf6zzo/fmYYQNsq40NiJ6
DFC0r5/OLslU/mdXP1j9XxMxvhuJCmlCIhTaDKBOgKkVgfPoO7hxm5rd89t1xscD
8IAAqNqYp2QHnZIciVomGmudtugFY/UGC+8RjtbSAwCRkTGevKHwkC3lXnATWVCx
dduzNF/IYj2zKB33ObnY3fMd0Vxgwkn+ttgXXtcrlW5SVUvQlAtyNyCx16sQPcUU
2S3Y6XaZg60adFFe+8y6qtUWIjjl5c5CzduzcSLZO8qfnab8AO5Sz8rsg+w9TcYo
Fg0la2ISVqaAwsSCqqzhqg1jCk8xk3JSg3AwdN/OjQapRy5KGh20+ZCWWTpb3yB2
k/fI6hwU
=aBf7
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 27 Jan 2022 07:27:53 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Sep 19 16:57:30 2022; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.