On 1/9/19 12:51 PM, Kevin Wolf wrote: >> Indeed, and libvirt IS using 'savevm' via HMP via QMP's >> human-monitor-command, since there is no QMP counterpart for internal >> snapshot. Even though lately we consistently tell people that internal >> snapshots are underdeveloped and you should use external snapshots, it >> does not get away from the fact that libvirt has been using 'savevm' to >> drive internal snapshots for years now, and that we MUST consider >> back-compat and/or add an introspectible QMP interface before making >> changes that would break libvirt. > > Okay, so what does libvirt do when you request a snapshot with a > numerical name? Without having looked at the code, the best case I would > expect that it forbids them, and more realistically I suspect that we > may actually fix a bug for libvirt by changing the semantics. > > Or does libvirt really use snapshot IDs rather than names?
At the moment, libvirt does not place any restriction on internal snapshot names, but passes the user's name through without thought of whether it is an id or a name. So yes, arguably tightening the semantics fixes a libvirt bug for libvirt having allowed internal snapshots to get into an inconsistent state. But again, it falls in the category of "properly fixing this requires a lot of auditing, time, mental power, and unit tests", which makes it a rather daunting task to state for certain. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature