Bug#1024805: bullseye-pu: package libvirt/7.0.0-3+deb11u1

2023-02-06 Thread Guido Günther
Hi Adam,
On Sat, Feb 04, 2023 at 06:00:49PM +, Adam D. Barratt wrote:
> Hi Guido,
> 
> On Wed, 2022-12-14 at 20:00 +0100, Guido Günther wrote:
> > Hi,
> > On Mon, Dec 12, 2022 at 06:39:42PM +, Adam D. Barratt wrote:
> > > On Sun, 2022-12-11 at 16:24 +0100, Guido Günther wrote:
> > > > Hi Adam,
> > > > On Wed, Dec 07, 2022 at 08:22:41PM +, Adam D. Barratt wrote:
> > > > > Control: tags -1 + confirmed
> > > > > 
> > > > > On Fri, 2022-11-25 at 15:19 +0100, Guido Günther wrote:
> > > > > > Fix lxc container reboots and shutdown (#983871, #991773).
> > > > > > 
> > > > > 
> > > > > Please go ahead.
> > > > 
> > > > Uploaded now, thanks!
> > > 
> > > Unfortunately the build fails on both arm64 and armhf while running
> > > the
> > > test suite. Each has been tried a couple of times, for a total of
> > > four
> > > different buildds across three hosters between them.
> > 
> > Thanks for letting me know! I'll have a look (I assume that the
> > current
> > version in stable will fail the same way).
> > 
> 
> Did you have any luck with this?

I think so. I'll open a bug with the debdiff against release.debian.org.
Cheers,
 -- Guido

> 
> Regards,
> 
> Adam
> 



Bug#1024805: bullseye-pu: package libvirt/7.0.0-3+deb11u1

2023-02-04 Thread Adam D. Barratt
Hi Guido,

On Wed, 2022-12-14 at 20:00 +0100, Guido Günther wrote:
> Hi,
> On Mon, Dec 12, 2022 at 06:39:42PM +, Adam D. Barratt wrote:
> > On Sun, 2022-12-11 at 16:24 +0100, Guido Günther wrote:
> > > Hi Adam,
> > > On Wed, Dec 07, 2022 at 08:22:41PM +, Adam D. Barratt wrote:
> > > > Control: tags -1 + confirmed
> > > > 
> > > > On Fri, 2022-11-25 at 15:19 +0100, Guido Günther wrote:
> > > > > Fix lxc container reboots and shutdown (#983871, #991773).
> > > > > 
> > > > 
> > > > Please go ahead.
> > > 
> > > Uploaded now, thanks!
> > 
> > Unfortunately the build fails on both arm64 and armhf while running
> > the
> > test suite. Each has been tried a couple of times, for a total of
> > four
> > different buildds across three hosters between them.
> 
> Thanks for letting me know! I'll have a look (I assume that the
> current
> version in stable will fail the same way).
> 

Did you have any luck with this?

Regards,

Adam



Bug#1024805: bullseye-pu: package libvirt/7.0.0-3+deb11u1

2022-12-14 Thread Guido Günther
Hi,
On Mon, Dec 12, 2022 at 06:39:42PM +, Adam D. Barratt wrote:
> On Sun, 2022-12-11 at 16:24 +0100, Guido Günther wrote:
> > Hi Adam,
> > On Wed, Dec 07, 2022 at 08:22:41PM +, Adam D. Barratt wrote:
> > > Control: tags -1 + confirmed
> > > 
> > > On Fri, 2022-11-25 at 15:19 +0100, Guido Günther wrote:
> > > > Fix lxc container reboots and shutdown (#983871, #991773).
> > > > 
> > > 
> > > Please go ahead.
> > 
> > Uploaded now, thanks!
> 
> Unfortunately the build fails on both arm64 and armhf while running the
> test suite. Each has been tried a couple of times, for a total of four
> different buildds across three hosters between them.

Thanks for letting me know! I'll have a look (I assume that the current
version in stable will fail the same way).

Cheers,
 -- Guido

> 
> In each case the failure looks the same:
> 
> 
>  94/167 libxlxml2domconfigtest  FAIL   0.17s (exit
> status 1)
> 
> --- command ---
> 21:04:12 abs_top_srcdir='/<>' LC_ALL='C'
> abs_srcdir='/<>/tests' LIBVIRT_AUTOSTART='0'
> G_DEBUG='fatal-warnings'
> abs_top_builddir='/<>/debian/build'
> abs_builddir='/<>/debian/build/tests'
> VIR_TEST_EXPENSIVE='1'
> /<>/debian/build/tests/libxlxml2domconfigtest
> --- stderr ---
> TEST: libxlxml2domconfigtest
>  1) LibXL XML-2-JSON basic-
> pv ... 
> Offset 349
> Expect [8192]
> Actual [6144]
>   .
> .. FAILED
>  2) LibXL XML-2-JSON basic-
> hvm... 
> Offset 382
> Expect [12288]
> Actual [8192]
>   .
> .. FAILED
>  3) LibXL XML-2-JSON basic-
> pvh... 
> Offset 351
> Expect [8192]
> Actual [6144]
>   .
> .. FAILED
>  4) LibXL XML-2-JSON cpu-shares-
> hvm   ... 
> Offset 382
> Expect [12288]
> Actual [8192]
>   .
> .. FAILED
>  5) LibXL XML-2-JSON variable-clock-
> hvm   ... 
> Offset 382
> Expect [12288]
> Actual [8192]
>   .
> .. FAILED
>  6) LibXL XML-2-JSON moredevs-
> hvm ... 
> Offset 435
> Expect [12288]
> Actual [8192]
>   .
> .. FAILED
>  7) LibXL XML-2-JSON multiple-
> ip  ... 
> Offset 349
> Expect [8192]
> Actual [6144]
>   .
> .. FAILED
>  8) LibXL XML-2-JSON vnuma-
> hvm... 
> Offset 413
> Expect [4336]
> Actual [0240]
>   .
> .. FAILED
>  9) LibXL XML-2-JSON fullvirt-
> cpuid   ... 
> Offset 307
> Expect [5656]
> Actual [3340]
>   .
> .. FAILED
> 10) LibXL XML-2-JSON fullvirt-acpi-
> slic   ... 
> Offset 307
> Expect [5656]
> Actual [3340]
>   .
> .. FAILED
> 11) LibXL XML-2-JSON max-gntframes-
> hvm... 
> Offset 382
> Expect [12288]
> Actual [8192]
>   .
> .. FAILED
> 12) LibXL XML-2-JSON max-eventchannels-
> hvm... 
> Offset 382
> Expect [12288]
> Actual [8192]
>   .
> .. FAILED
> Some tests failed. Run them using:
> VIR_TEST_DEBUG=1 VIR_TEST_RANGE=1-12
> /<>/debian/build/tests/libxlxml2domconfigtest
> ---
> 
> Regards,
> 
> Adam
> 



Bug#1024805: bullseye-pu: package libvirt/7.0.0-3+deb11u1

2022-12-12 Thread Adam D. Barratt
On Sun, 2022-12-11 at 16:24 +0100, Guido Günther wrote:
> Hi Adam,
> On Wed, Dec 07, 2022 at 08:22:41PM +, Adam D. Barratt wrote:
> > Control: tags -1 + confirmed
> > 
> > On Fri, 2022-11-25 at 15:19 +0100, Guido Günther wrote:
> > > Fix lxc container reboots and shutdown (#983871, #991773).
> > > 
> > 
> > Please go ahead.
> 
> Uploaded now, thanks!

Unfortunately the build fails on both arm64 and armhf while running the
test suite. Each has been tried a couple of times, for a total of four
different buildds across three hosters between them.

In each case the failure looks the same:


 94/167 libxlxml2domconfigtest  FAIL   0.17s (exit
status 1)

--- command ---
21:04:12 abs_top_srcdir='/<>' LC_ALL='C'
abs_srcdir='/<>/tests' LIBVIRT_AUTOSTART='0'
G_DEBUG='fatal-warnings'
abs_top_builddir='/<>/debian/build'
abs_builddir='/<>/debian/build/tests'
VIR_TEST_EXPENSIVE='1'
/<>/debian/build/tests/libxlxml2domconfigtest
--- stderr ---
TEST: libxlxml2domconfigtest
 1) LibXL XML-2-JSON basic-
pv ... 
Offset 349
Expect [8192]
Actual [6144]
  .
.. FAILED
 2) LibXL XML-2-JSON basic-
hvm... 
Offset 382
Expect [12288]
Actual [8192]
  .
.. FAILED
 3) LibXL XML-2-JSON basic-
pvh... 
Offset 351
Expect [8192]
Actual [6144]
  .
.. FAILED
 4) LibXL XML-2-JSON cpu-shares-
hvm   ... 
Offset 382
Expect [12288]
Actual [8192]
  .
.. FAILED
 5) LibXL XML-2-JSON variable-clock-
hvm   ... 
Offset 382
Expect [12288]
Actual [8192]
  .
.. FAILED
 6) LibXL XML-2-JSON moredevs-
hvm ... 
Offset 435
Expect [12288]
Actual [8192]
  .
.. FAILED
 7) LibXL XML-2-JSON multiple-
ip  ... 
Offset 349
Expect [8192]
Actual [6144]
  .
.. FAILED
 8) LibXL XML-2-JSON vnuma-
hvm... 
Offset 413
Expect [4336]
Actual [0240]
  .
.. FAILED
 9) LibXL XML-2-JSON fullvirt-
cpuid   ... 
Offset 307
Expect [5656]
Actual [3340]
  .
.. FAILED
10) LibXL XML-2-JSON fullvirt-acpi-
slic   ... 
Offset 307
Expect [5656]
Actual [3340]
  .
.. FAILED
11) LibXL XML-2-JSON max-gntframes-
hvm... 
Offset 382
Expect [12288]
Actual [8192]
  .
.. FAILED
12) LibXL XML-2-JSON max-eventchannels-
hvm... 
Offset 382
Expect [12288]
Actual [8192]
  .
.. FAILED
Some tests failed. Run them using:
VIR_TEST_DEBUG=1 VIR_TEST_RANGE=1-12
/<>/debian/build/tests/libxlxml2domconfigtest
---

Regards,

Adam



Bug#1024805: bullseye-pu: package libvirt/7.0.0-3+deb11u1

2022-12-11 Thread Guido Günther
Hi Adam,
On Wed, Dec 07, 2022 at 08:22:41PM +, Adam D. Barratt wrote:
> Control: tags -1 + confirmed
> 
> On Fri, 2022-11-25 at 15:19 +0100, Guido Günther wrote:
> > Fix lxc container reboots and shutdown (#983871, #991773).
> > 
> 
> Please go ahead.

Uploaded now, thanks!
 -- Guido

> 
> Regards,
> 
> Adam
> 



Bug#1024805: bullseye-pu: package libvirt/7.0.0-3+deb11u1

2022-12-07 Thread Adam D. Barratt
Control: tags -1 + confirmed

On Fri, 2022-11-25 at 15:19 +0100, Guido Günther wrote:
> Fix lxc container reboots and shutdown (#983871, #991773).
> 

Please go ahead.

Regards,

Adam



Bug#1024805: bullseye-pu: package libvirt/7.0.0-3+deb11u1

2022-11-25 Thread Guido Günther
Package: release.debian.org
Severity: normal
Tags: bullseye
User: release.debian@packages.debian.org
Usertags: pu

[ Reason ]
Fix lxc container reboots and shutdown (#983871, #991773).

[ Tests ]
On top of reports that the issues are fixed I tested that libvirt's main
use case qemu is still functional.

[ Risks ]
The cgroup code is used by other bits of libvirt as well (like qemu)
but see above. The change also introduces a intermittent (but harmless)
log message

  Nov 25 15:01:55 honk libvirtd[1761464]: unable to open 
'/sys/fs/cgroup/machine.slice/machine*scope/': No such file or directory

on shutdown. Given the risks of changing more code I'd consider
that the lesser evil.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
The code is a backport of upstream commits.

Cheers,
 -- Guido
diff --git a/debian/changelog b/debian/changelog
index 5b82057454..28579ccd7e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
+libvirt (7.0.0-3+deb11u1) bullseye; urgency=medium
+
+  [ Guido Günther ]
+  * [eb0956b] d/salsa-ci: Switch to bullseye
+  * [dfcaecc] d/gbp.conf: Switch to bullseye
+  * [7decb27] vircgroup: Fix virCgroupKillRecursive() wrt nested controllers.
+Thanks to Dio Putra (Closes: #983871)
+
+  [ Joachim Falk ]
+  * [fcfceec] lxc: Fix reboot command
+(Closes: #991773)
+
+ -- Guido Günther   Thu, 24 Nov 2022 21:59:50 +0100
+
 libvirt (7.0.0-3) unstable; urgency=medium
 
   * Team upload
diff --git a/debian/gbp.conf b/debian/gbp.conf
index 83b38b3bdb..b474d29e6f 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -1,6 +1,6 @@
 [DEFAULT]
 upstream-branch = upstream/latest
-debian-branch = debian/master
+debian-branch = debian/bullseye
 pristine-tar = True
 upstream-signatures = on
 
diff --git 
a/debian/patches/backport/Fix-reboot-command-for-LXC-containers.patch 
b/debian/patches/backport/Fix-reboot-command-for-LXC-containers.patch
new file mode 100644
index 00..82db391755
--- /dev/null
+++ b/debian/patches/backport/Fix-reboot-command-for-LXC-containers.patch
@@ -0,0 +1,92 @@
+From: Joachim Falk 
+Date: Thu, 2 Dec 2021 19:56:07 +0100
+Subject: Fix reboot command for LXC containers (Closes: #991773)
+
+The virNetDaemonQuit(dmn) command in virLXCControllerSignalChildIO triggers an
+early close of all clients of lxc_controller. Here, libvirtd itself is a client
+of this controller, and the client connection is used to notify libvirtd if a
+reboot of the container is required. However, the client connection was closed
+before such a status could be sent to libvirtd. To fix this bug, we will
+immediately send the reboot or shutdown status of the container to libvirtd, 
and
+only after client disconnect will we trigger virNetDaemonQuit (Closes: 
#991773).
+
+Fixes: https://gitlab.com/libvirt/libvirt/-/issues/237
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=991773
+Signed-off-by: Joachim Falk 
+Reviewed-by: Michal Privoznik 
+
+(cherry picked from commit 93c47e2c39521aba760486f0238458ef1a37490c)
+
+In order to cleanly apply to libvirt 7.0.0, this patch needed some minor
+adjustments, e.g., "virNetDaemon *dmn" vs "virNetDaemonPtr dmn" in libvirt 
7.0.0.
+---
+ src/lxc/lxc_controller.c | 18 +++---
+ 1 file changed, 11 insertions(+), 7 deletions(-)
+
+Index: libvirt/src/lxc/lxc_controller.c
+===
+--- libvirt.orig/src/lxc/lxc_controller.c
 libvirt/src/lxc/lxc_controller.c
+@@ -897,8 +897,10 @@ static void virLXCControllerClientCloseH
+ virLXCControllerPtr ctrl = virNetServerClientGetPrivateData(client);
+ 
+ VIR_DEBUG("Client %p has closed", client);
+-if (ctrl->client == client)
++if (ctrl->client == client) {
+ ctrl->client = NULL;
++VIR_DEBUG("Client has gone away");
++}
+ if (ctrl->inShutdown) {
+ VIR_DEBUG("Arm timer to quit event loop");
+ virEventUpdateTimeout(ctrl->timerShutdown, 0);
+@@ -1009,8 +1011,11 @@ static int lxcControllerClearCapabilitie
+ static bool wantReboot;
+ static virMutex lock = VIR_MUTEX_INITIALIZER;
+ 
++static int
++virLXCControllerEventSendExit(virLXCController *ctrl,
++  int exitstatus);
+ 
+-static void virLXCControllerSignalChildIO(virNetDaemonPtr dmn,
++static void virLXCControllerSignalChildIO(virNetDaemonPtr dmn G_GNUC_UNUSED,
+   siginfo_t *info G_GNUC_UNUSED,
+   void *opaque)
+ {
+@@ -1021,7 +1026,6 @@ static void virLXCControllerSignalChildI
+ ret = waitpid(-1, , WNOHANG);
+ VIR_DEBUG("Got sig child %d vs %lld", ret, (long long)ctrl->initpid);
+ if (ret == ctrl->initpid) {
+-virNetDaemonQuit(dmn);
+ virMutexLock();
+ if (WIFSIGNALED(status) &&
+