On 04/24/2013 09:50 AM, Luiz Capitulino wrote: >> This raises an interesting question about introspection - how will >> management apps (such as libvirt) be able to determine whether the >> paging command is supported for a given architecture? Do we need to >> expand the 'MachineInfo' QMP datatype so that 'query-machines' can tell >> us whether a given machine will support or reject attempts to set >> 'paging':true during 'dump-guest-memory'? > > Is libvirt going to query this for the automatic dump feature?
Probably. Right now, libvirt has already exposed the paging option to users, and uses the try-and-fail approach of reporting back any error message from QMP if the dump command fails. But we've had error reports in the past against libvirt that the error reported by qemu isn't always the sanest, and that sometimes it is much nicer to have libvirt detect in advance that a qemu command cannot succeed than it is to do a try-and-fail approach. There's also a matter of clean rollbacks; libvirt has to set up some state when starting a dump command, and has to undo that state if try-and-fail reported an error; whereas a capability detection can avoid having to set up any state in the first place. > > I'm asking this because if the fact that an arch doesn't support memory > dump is only visible to human users, then try & fail doesn't seem bad. Introspection can't hurt, even if libvirt doesn't use it right away. It may be the sort of thing where we commit the initial capability with try-and-fail handling, then down the road, decide whether the error quality is good enough; it also seems like introspection is the sort of thing that is easy to backport, even if the introspection does not go in at the same time as the original feature, where improved error messages becomes a quality-of-implementation value-added by distro packagers. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature