[libvirt] [PATCH/RFC]: don't ignore errors to save the domain status file

Guido Günther agx at sigxcpu.org
Sat Jan 31 13:32:09 UTC 2009


Hi,
we currently don't report errors to save qemu's domain status file back
to the caller. That was o.k. as long as the code was there for testing
but now that the XML is being picked up on daemon restart we must
handle these.
The attached patch does that, although I'm not confident that it's
enough. While we return error on device attach/unattach the device
actually got attached/unattached already. Same is true for
suspend/resume.
A better solution would be to write out the new domain status into a
temp file and simply call rename(2) on it when the attach/unattach
succeeds and discard it if it fails. This would minimize the possible
error conditions like disk full, missing permissions to write into that
directory etc. Does this sound reasonable?
O.k. to apply the attached version for now?
Cheers,
 -- Guido

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-don-t-ignore-errors-to-save-the-domain-status.patch
Type: text/x-diff
Size: 2991 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090131/24a905c5/attachment-0001.bin>


More information about the libvir-list mailing list