[Libguestfs] [PATCH] Improve cleanup of libguestfs handle with Sys::VirtV2V::GuestfsHandle

Matthew Booth mbooth at redhat.com
Thu Jun 17 16:07:44 UTC 2010


On 17/06/10 17:05, Matthew Booth wrote:
> This change replaces all direct usage of a Sys::Guestfs object in virt-v2v with
> a Sys::VirtV2V::GuestfsHandle proxy object. The proxy does 3 things:
>
> * Holds handle initialisation code
> * Adds the ability to explicitly close the handle
> * Adds the ability to register a callback to be executed before close
>
> The cleanup code in Sys::VirtV2V::Config is updated to use the new callback
> mechanism.
>
> Additionally, the initialisation code improves handling of failure while
> virt-v2v is running with uid:gid == 36:36. If cleanup handlers are called in
> this context they can fail due to insufficient permissions. If this code dies,
> permissions will be restored before the die is propagated. If this code receives
> a user signal it will be postponed until after the code has completed.

I should have mentioned here that this fixes RHBZ#596071 and 
RHBZ#596015. I've updated my local commit.

Matt
-- 
Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team

M:       +44 (0)7977 267231
GPG ID:  D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490




More information about the Libguestfs mailing list