On full cgroup v2 systems, LXD raises the following warning:
WARNING: cgroup v2 is not fully supported yet
Add logic to run.py to ignore this warning. A non-zero return
code or other strings in stderr should still cause a RunError
exception to be raised.
Signed-off-by: Tom Hromatka <[email protected]>
---
ftests/run.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/ftests/run.py b/ftests/run.py
index ad8f07d2a6f2..7ab4e512086f 100644
--- a/ftests/run.py
+++ b/ftests/run.py
@@ -53,9 +53,16 @@ class Run(object):
"run:\n\tcommand = {}\n\tret = {}\n\tstdout = {}\n\tstderr =
{}".format(
' '.join(command), ret, out, err))
- if ret != 0 or len(err) > 0:
+ if ret != 0:
raise RunError("Command '{}' failed".format(''.join(command)),
command, ret, out, err)
+ if ret != 0 or len(err) > 0:
+ if err.find("WARNING: cgroup v2 is not fully supported yet") == -1:
+ # LXD throws the above warning on systems that are fully
+ # running cgroup v2. Ignore this warning, but fail if any
+ # other warnings/errors are raised
+ raise RunError("Command '{}' failed".format(''.join(command)),
+ command, ret, out, err)
return out
--
2.26.3
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel