On Sat, Dec 28, 2013 at 3:18 PM, Doug Goldstein wrote:
> On Tue, Dec 24, 2013 at 12:02 AM, Eric Blake wrote:
>> On 12/20/2013 11:36 AM, Jim Fehlig wrote:
>>> Dario Faggioli wrote:
by, in libxlDomainGetNumaParameters(), calling libxl_bitmap_init() as soon
as
possible, which avoids
On Tue, Dec 24, 2013 at 12:02 AM, Eric Blake wrote:
> On 12/20/2013 11:36 AM, Jim Fehlig wrote:
>> Dario Faggioli wrote:
>>> by, in libxlDomainGetNumaParameters(), calling libxl_bitmap_init() as soon
>>> as
>>> possible, which avoids getting to 'cleanup:', where libxl_bitmap_dispose()
>>> happens
Similar to commit 52dbeac, we should indent code snippets in
other places to ensure they appear correctly in html. See
http://libvirt.org/html/libvirt-libvirt.html#virNodeGetCPUStats
for an example improved by this patch. Also fix some missing
semicolons in the samples.
* src/libvirt.c: Indent c
On 12/06/2013 01:33 AM, Michal Privoznik wrote:
> On 06.12.2013 00:52, Eric Blake wrote:
>> A couple of fixes for bootstrap issues reported on IRC:
>> - on some older glibc systems, ./configure could deadlock due to
>> a glibc malloc bug
>> - on FreeBSD systems, a broken autom4te coupled with gette
On 12/19/2013 09:32 PM, Eric Blake wrote:
> I noticed that the virDomainQemuMonitorCommand debug output wasn't
> telling me the name of the domain it was working on. While it was
> easy enough to determine which pointer matches the domain based on
> other log messages, it is nicer to be consistent
When checking for a valid network, we weren't consistent on
whether we reported an invalid network or a connection. Similar
to previous patches, use a common macro to make it nicer.
* src/datatypes.h (virCheckNetworkReturn, virCheckNetworkGoto): New
macros.
(VIR_IS_NETWORK, VIR_IS_CONNECTED_NETWO
Cleanup after the previous patch.
* src/datatypes.h (VIR_IS_CONNECT): Delete, and inline into all
callers, since no other file uses it any more.
Signed-off-by: Eric Blake
---
src/datatypes.h | 24 +++-
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/src/datat
While all errors related to invalid node device appeared to be
consistent, we might as well continue the trend of using a
common macro. For now, we don't need virCheckNodeDeviceGoto().
* src/datatypes.h (virCheckNodeDeviceReturn): New macro.
(VIR_IS_NODE_DEVICE, VIR_IS_CONNECTED_NODE_DEVICE): Dro
Cleanup after the previous patch. In particular, note that
xenDomainUsedCpus can only be reached from
xenUnifiedDomainGetXMLDesc, which in turn is only reached from
public API that already validated the domain.
* src/xen/xen_driver.c (xenDomainUsedCpus): Drop redundant check.
* src/datatypes.h (V
For streams validation, we weren't consistent on whether to
use VIR_FROM_NONE or VIR_FROM_STREAMS. Furthermore, in
many API, we want to ensure that a stream is tied to the
same connection as the other object we are operating on;
while other API failed to validate the stream at all.
Similar to prev
When checking for a valid interface, we weren't consistent on
whether ew reported as VIR_FROM_NONE or VIR_FROM_INTERFACE.
Similar to previous patches, use a common macro to make it nicer.
For now, we don't need virCheckInterfaceGoto().
* src/datatypes.h (virCheckInterfaceReturn): New macro.
(VIR_I
virStoragePoolBuild reported an invalid pool as if it were an
invalid network. Likewise, we weren't consistent on whether to
use VIR_FROM_NONE or VIR_FROM_STORAGE. Similar to previous
patches, use a common macro to make it nicer. For now, we
don't need virCheckStoragePoolGoto().
* src/datatypes
While auditing the error reporting, I noticed that migration
had some issues. Some of the static helper functions tried
to call virDispatchError(), even though their caller will also
report the error. Also, if a migration is cancelled early
because a uri was not set, we did not guarantee that the
While all errors related to invalid nwfilters appeared to be
consistent, we might as well continue the trend of using a
common macro. For now, we don't need virCheckNWFilterGoto().
* src/datatypes.h (virCheckNWFilterReturn): New macro.
(VIR_IS_NWFILTER, VIR_IS_CONNECTED_NWFILTER): Drop unused mac
For storage volume validation, we weren't consistent on
whether to use VIR_FROM_NONE or VIR_FROM_STORAGE. Similar
to previous patches, use a common macro to make it nicer.
virStorageVolCreateXMLFrom allows cross-connection cloning,
where the error is reported against the connection of the
destina
The existing check of domain snapshots validated that they
point to a domain, but did not validate that the domain
points to a connection, even though any errors blindly assume
the connection is valid. For consistency with previous
patches, continue the trend of using a common macro. For
now, we
Finish the cleanup; all uses of virLib*Error have now been
converted to more canonical conventions.
* src/libvirt.c: Use virReportError in remaining errors.
(virLibConnError, virLibDomainError): Delete unused macros.
* cfg.mk (msg_gen_function): Drop unused names.
Signed-off-by: Eric Blake
---
While auditing error messages in libvirt.c, I found a couple
instances that had not been converted to modern error styles,
and a few places that failed to dispatch the error through
the known-good connection.
* src/libvirt.c (virDomainPinEmulator, virDomainGetDiskErrors)
(virDomainSendKey, virDoma
Several APIs clear out a user input buffer before attempting to
populate it; but in a few cases we missed this memset if we
detect a reason for an early exit.
* src/libvirt.c (virDomainGetInfo, virDomainGetBlockInfo)
(virStoragePoolGetInfo, virStorageVolGetInfo)
(virDomainGetJobInfo, virDomainGetB
Having one API call into another is generally not good; among
other issues, it gives confusing logs, and is not quite as
efficient.
This fixes several instances, but not all: we still have instances
in both libvirt.c and in backend hypervisors (lxc and qemu) calling
the public virTypedParamsGetStr
Most of our public APIs emit a debug log on entry, prior to anything
else. There were a few exceptions where obvious failures were not
logged, so fix those. Many of the fixes are made more careful to
avoid a NULL deref if the user passes NULL for the object.
* src/libvirt.c (virConnectOpen, virC
While all errors related to invalid secrets appeared to be
consistent, we might as well continue the trend of using a
common macro. For now, we don't need virCheckSecretGoto().
* src/datatypes.h (virCheckSecretReturn): New macro.
(VIR_IS_SECRET, VIR_IS_CONNECTED_SECRET): Drop unused macros.
* src
We document that calling any public API wipes out all prior
libvirt errors in the same thread; but weren't obeying this
style in a few functions.
* src/libvirt.c (virGetVersion, virConnectRef, virDomainRef)
(virDomainGetSecurityLabel, virDomainGetSecurityLabelList)
(virDomainSetMetadata, virDomain
I noticed that the virDomainQemuMonitorCommand debug output wasn't
telling me the name of the domain it was working on. While it was
easy enough to determine which pointer matches the domain based on
other log messages, it is nicer to be consistent.
* src/util/viruuid.h (VIR_UUID_DEBUG): Moved he
This series is in response to:
https://www.redhat.com/archives/libvir-list/2013-December/msg01101.html
It turned into a much bigger cleanup project, where I ended up
with a lot of changes; hopefully the division into multiple
patches makes review easier, and the end result diffstat shows
that the
25 matches
Mail list logo