Re: [PATCHv2 3/6] virsh: optimize creation of default connection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/5/18 Eric Blake <eblake@xxxxxxxxxx>:
> Ramon de Carvalho Valle reported a problem with:
> virsh connect qemu:///system
> as a non-root user. ÂThe real root problem appears to be a regression
> in libvirtd being auto-started on the default qemu:///session URI;
> however, the symptom points to an independent flaw in virsh - we
> shouldn't be wasting efforts on making a connection if we aren't going
> to be using that connection. ÂFixing virsh avoids Ramon's issue, while
> I work in the meantime to fix the real libvirtd regression.
>
> This patch looks big, but that's because 'gcc -Wmissing-field-initializers'
> gets triggered by './autobuild.sh --enable-compile-warnings=error', so I
> had to add 0 initialization to everyone (rather than my preference of
> just adding the non-zero flags to virshCmds and to cmdConnect).
>
> Meanwhile, if you use 'virsh -c URI', the connection must succeed; this
> patch _only_ optimizes the default connection to be deferred to a later
> point where we know if a particular command to be run needs a connection.
>
> * tools/virsh.c (VSH_CMD_FLAG_NOCONNECT): New flag.
> (vshCmdDef): Add new flags field.
> (vshCommandRun): Honor new flag.
> (domManagementCmds, domMonitoringCmds, storagePoolCmds)
> (storageVolCmds, networkCmds, nodedevCmds, ifaceCmds)
> (nwfilterCmds, secretCmds, virshCmds, snapshotCmds)
> (hostAndHypervisorCmds): Populate new field.
> (vshReconnect): Don't warn on initial connection.
> ---
>
> v2: rebased to handle virsh commands added in meantime
> v1: https://www.redhat.com/archives/libvir-list/2011-March/msg00633.html
>
> Âtools/virsh.c | Â429 +++++++++++++++++++++++++++++++++------------------------
> Â1 fhttps://www.redhat.com/archives/libvir-list/2011-March/msg00iles changed, 250 insertions(+), 179 deletions(-)

I tested that virsh help doesn't open a connection.

ACK.

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]