
On 07/07/2011 12:09 AM, Matthias Bolte wrote:
2011/7/7 Eric Blake <eblake@redhat.com>:
On 07/06/2011 05:23 PM, Eric Blake wrote:
Inspired in part by Laine's recent cleanup of qemuDomainGetXMLDesc, in part by my desire to add a new flag to virDomainCoreDump and test that older clients reject that flag, and in part by an OCD desire for uniformity :), I'm proposing this giant patch series.
And yes, I'm working on a patch 21/20 to cfg.mk to enforce this style in the future, but ran out of time today.
I'm afraid that you're going to break stuff with this series. For example the patch for the ESX driver breaks opening a read-only connection as you made esxOpen reject VIR_CONNECT_RO.
Hmm, are we really passing VIR_CONNECT_RO as a flags argument to all the driver instantiations? If so, then I have quite a few patches to amend, since it would not be just ESX rejecting a read-only driver instantiation. I'll hold off on pushing anything that added a virCheckFlags(0, VIR_DRV_OPEN_ERROR) until after I've done some more debugging (which is the bulk of my series)...
Yes, the ESX driver has no means to support a truly read-only connection as you always need to provide credentials, so one can consider this a bugfix or a regression depending on the point-of-view.
I'm 50-50 on whether this really is a bug-fix, whether it means we should allow (and otherwise ignore) the flag, as in: virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR); Anyone else with an opinion? -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org