[Libguestfs] [libnbd PATCH] nbdsh: Hide nbd.Error from abrt-python3-handler

Eric Blake eblake at redhat.com
Fri Sep 18 15:37:22 UTC 2020


On 9/18/20 9:42 AM, Eric Blake wrote:
> When using nbdsh for scripting, it is convenient to let nbdsh fail
> with status 1 when encountering an API failure.  However, doing so by
> letting the nbd.Error exception leak all the way causes ABRT (on
> Fedora 32 at least) to assume the program crashed from a programming
> error, and needlessly complicates clients to have to add try: blocks.
> Better is if nbdsh itself prints the same stack trace that python
> would, but handles the error and exits python cleanly so that ABRT
> does not think that the exception was unhandled.
> 
> See https://github.com/libguestfs/nbdkit/commit/e13048fd9 for an
> example of client cleanup made more verbose if we don't patch libnbd.

I missed one: 'nbdsh -u garbage_uri' lets nbd.Error escape from a failed 
nbd_connect_uri.  We may want to treat that one differently than we do 
the concatenated -c arguments, but it's another one worth treating, once 
we figure out if this is the right thing to do from the ABRT perspective.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




More information about the Libguestfs mailing list