-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qemuimg: log warning on cmd error #356
Conversation
9a0e00f
to
1155b01
Compare
This was correct for the initial implementation, but now we don't change only the log level but log different log for this case.
Warning looks good! Except the |
1155b01
to
528c87b
Compare
Add flag warn_stderr to Command class to log to WARNING level instead of DEBUG level if the command execution has data in the stderr output, even if the command finished succesfully. Also, the logged message changes if the new warn_stderr flag is set, printing the command that originated the error output. Legacy debug logging remains unchanged. ProgressCommand in qemuimg will enable the flag so that qemuimg commands show warning on errors. Example: 09:49:34,851 WARNING (MainThread) [storage.operation] Command ['/usr/bin/qemu-img', 'commit', '-p', '-t', 'none', '-b'...] succeeded with warnings: bytearray(b"qcow2_free_clusters failed: No space left on device\nqemu-img: Lost persistent bitmaps during inactivation of node \'#block365\': Failed to write bitmap \'stale-bitmap5\' to file: No space left on device\nqemu-img: Failed to flush the refcount block cache: No space left on device\n") (operation:159)'] Signed-off-by: Albert Esteve <aesteve@redhat.com>
528c87b
to
8c3f3f8
Compare
/ost |
Add flag warn_stderr to Command class to
log to WARNING level instead of DEBUG
level if the command execution has data
in the stderr output, even if the command
finished succesfully.
Also, the logged message changes if the
new warn_stderr flag is set, printing
the command that originated the error
output.
Legacy debug logging remains unchanged.
ProgressCommand in qemuimg will enable
the flag so that qemuimg commands show
warning on errors.
Example:
Signed-off-by: Albert Esteve aesteve@redhat.com