Hi Paul (2021.10.10_11:59:12_-0700)
> Shouldn't that bug be raised in severity, considering the request you
> are now asking from autopkgtest? I'm not really enthusiastic to add this
> kind of "work around" code for a bug that's already known for 2 years.
> Maybe there should be a warning in snapd to silence that warning?

Yeah, I'm with you on that. It's an annoying message.

Also, found another place I had to hack (my local hacks all got blown
away by the recent autopkgtest upload, so it was a good time to forward
them...)

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272
From 084996eb89aa99f2907ed24b5d4c83f5f7480610 Mon Sep 17 00:00:00 2001
From: Stefano Rivera <stefa...@debian.org>
Date: Sun, 10 Oct 2021 10:58:37 -0700
Subject: [PATCH] Ignore innoccuous warnings from snapped lxd

They don't mean that the command has failed
---
 lib/VirtSubproc.py | 4 ++++
 lib/adt_testbed.py | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/lib/VirtSubproc.py b/lib/VirtSubproc.py
index bf948e6..01acdaa 100644
--- a/lib/VirtSubproc.py
+++ b/lib/VirtSubproc.py
@@ -186,6 +186,10 @@ def check_exec(argv, downp=False, outp=False, timeout=0, fail_on_stderr=True):
     if status:
         bomb("%s%s failed (exit status %d, stderr %r)" %
              ((downp and "(down) " or ""), argv, status, err))
+    # Ignore innoccuous warnings from snapped lxd
+    if (err == 'WARNING: cgroup v2 is not fully supported yet, proceeding with '
+               'partial confinement\n'):
+        err = ''
     if fail_on_stderr and err:
         bomb("%s unexpectedly produced stderr output `%s'" %
              (argv, err))
diff --git a/lib/adt_testbed.py b/lib/adt_testbed.py
index 9965e5d..909213c 100644
--- a/lib/adt_testbed.py
+++ b/lib/adt_testbed.py
@@ -554,6 +554,11 @@ class Testbed:
             self.command('auxverb_debug_fail')
             self.bomb('testbed auxverb failed with exit code %i' % proc.returncode)
 
+        # Ignore innoccuous warnings from snapped lxd
+        if (err == 'WARNING: cgroup v2 is not fully supported yet, proceeding '
+                   'with partial confinement\n'):
+            err = ''
+
         return (proc.returncode, out, err)
 
     def check_exec(self, argv, stdout=False, kind='short'):
-- 
2.33.0

Attachment: signature.asc
Description: PGP signature

Reply via email to