"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