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

Guido Günther agx at sigxcpu.org
Sat Feb 7 21:40:38 UTC 2009


On Thu, Feb 05, 2009 at 06:49:52PM +0100, Jim Meyering wrote:
> Guido Günther <agx at sigxcpu.org> wrote:
> > 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?
> 
> Yes.
> 
> > O.k. to apply the attached version for now?
> 
> Looks good to me.
> Minor formatting nits:
I've applied it with your indentation suggestions fixed.
 -- Guido




More information about the libvir-list mailing list