storage/lvm: filter out warning about intended over-provisioning

Over-provisioning on LVM is intended. Since LVM do not have any option
to disable it (see [1] and discussion linked from there), filter the
warning in post-processing.

[1] https://bugzilla.redhat.com/1347008

Fixes QubesOS/qubes-issues#3744
This commit is contained in:
Marek Marczykowski-Górecki 2018-04-14 21:36:03 +02:00
parent 4794232745
commit bb40d61af9
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -575,6 +575,11 @@ def qubes_lvm(cmd, log=logging.getLogger('qubes.storage.lvm')):
close_fds=True, env=environ)
out, err = p.communicate()
err = err.decode()
# Filter out warning about intended over-provisioning.
# Upstream discussion about missing option to silence it:
# https://bugzilla.redhat.com/1347008
err = '\n'.join(line for line in err.splitlines()
if 'exceeds the size of thin pool' not in line)
return_code = p.returncode
if out:
log.debug(out)