]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
16 years agoRemote protocol / RPC API for sVirt support (James Morris & Dan Walsh)
Daniel P. Berrange [Tue, 3 Mar 2009 09:27:02 +0000 (09:27 +0000)]
Remote protocol / RPC API for sVirt support (James Morris & Dan Walsh)

16 years agoInternal driver API for sVirt support (James Morris & Dan Walsh)
Daniel P. Berrange [Tue, 3 Mar 2009 09:14:28 +0000 (09:14 +0000)]
Internal driver API for sVirt support (James Morris & Dan Walsh)

16 years agoPublic API for sVirt support (James Morris & Dan Walsh)
Daniel P. Berrange [Tue, 3 Mar 2009 09:09:00 +0000 (09:09 +0000)]
Public API for sVirt support (James Morris & Dan Walsh)

16 years agoDon't try to detach & reset PCI devices while running test suite for XML-> ARGV conve...
Daniel P. Berrange [Tue, 3 Mar 2009 08:59:45 +0000 (08:59 +0000)]
Don't try to detach & reset PCI devices while running test suite for XML-> ARGV conversion.

16 years ago* qemud/qemud.c: fix qemu+tls handshake negotiation, patch by
Daniel Veillard [Tue, 3 Mar 2009 08:25:50 +0000 (08:25 +0000)]
* qemud/qemud.c: fix qemu+tls handshake negotiation, patch by
  Chris Lalancette
Daniel

16 years agoIgnore some generated autotools files in example app
Daniel P. Berrange [Mon, 2 Mar 2009 20:24:46 +0000 (20:24 +0000)]
Ignore some generated autotools files in example app

16 years agoAlways reset PCI devices
Daniel P. Berrange [Mon, 2 Mar 2009 20:22:35 +0000 (20:22 +0000)]
Always reset PCI devices

16 years agoExport virUnrefConnect & virCapabilitiesGenerateMac to driver code
Daniel P. Berrange [Mon, 2 Mar 2009 20:19:13 +0000 (20:19 +0000)]
Export virUnrefConnect & virCapabilitiesGenerateMac to driver code

16 years agotests: further isolate a test that runs libvirtd
Jim Meyering [Mon, 2 Mar 2009 20:01:26 +0000 (20:01 +0000)]
tests: further isolate a test that runs libvirtd

* tests/daemon-conf: Specify a non-default socket directory.
Specify test-specific log directory and pid file, too.

16 years agoadd two tests
Jim Meyering [Mon, 2 Mar 2009 20:01:05 +0000 (20:01 +0000)]
add two tests

* tests/libvirtd-pool: New file.
Exercise the new unix_sock_dir option
* tests/libvirtd-fail: New file.
* tests/Makefile.am (test_scripts): Add libvirtd-fail and libvirtd-pool.

16 years agotests: fix an error that made us skip the daemon-conf test
Jim Meyering [Mon, 2 Mar 2009 19:03:49 +0000 (19:03 +0000)]
tests: fix an error that made us skip the daemon-conf test

* tests/Makefile.am (CONFIG_HEADER): Correct definition.

16 years agotests: test for a recent fix
Jim Meyering [Mon, 2 Mar 2009 18:41:00 +0000 (18:41 +0000)]
tests: test for a recent fix

* tests/libvirtd-net-persist: New file.  Test for today's
"Mark 'defined' networks as persistent" fix.
* tests/Makefile.am (test_scripts): Add it.

16 years agovirsh: tweak a format string to avoid emitting trailing space
Jim Meyering [Mon, 2 Mar 2009 18:39:36 +0000 (18:39 +0000)]
virsh: tweak a format string to avoid emitting trailing space

* src/virsh.c (cmdNetworkList): Change format not to right-pad
with spaces, as that would have required a trailing blank in
an expected output file.

16 years agoFix bridge generation loop counter (spotted by Jim Meyering)
Cole Robinson [Mon, 2 Mar 2009 17:56:50 +0000 (17:56 +0000)]
Fix bridge generation loop counter (spotted by Jim Meyering)

16 years agoRecognize ejectable media in hostdev hal driver.
Cole Robinson [Mon, 2 Mar 2009 17:41:13 +0000 (17:41 +0000)]
Recognize ejectable media in hostdev hal driver.

16 years agoBetter error reporting from qemu AttachDevice
Cole Robinson [Mon, 2 Mar 2009 17:39:43 +0000 (17:39 +0000)]
Better error reporting from qemu AttachDevice

16 years agoGenerate network bridge names if none passed at define/create time.
Cole Robinson [Mon, 2 Mar 2009 17:37:03 +0000 (17:37 +0000)]
Generate network bridge names if none passed at define/create time.

16 years agoRemove redundant monitor watch variable (s/monitor_watch/monitorWatch/)
Cole Robinson [Mon, 2 Mar 2009 17:33:39 +0000 (17:33 +0000)]
Remove redundant monitor watch variable (s/monitor_watch/monitorWatch/)

16 years agoMark 'defined' networks as persistent.
Cole Robinson [Mon, 2 Mar 2009 17:29:44 +0000 (17:29 +0000)]
Mark 'defined' networks as persistent.

16 years agoadds a new <hostdev managed='(yes|no)'> property to host devices in domains
Daniel Veillard [Mon, 2 Mar 2009 16:40:30 +0000 (16:40 +0000)]
adds a new <hostdev managed='(yes|no)'> property to host devices in domains
* docs/schemas/domain.rng src/domain_conf.c src/domain_conf.h
  src/qemu_conf.c
  tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
  tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
  tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.xml:
  adds a new <hostdev managed='(yes|no)'> property
  to host devices indicating whether or not we should
  automatically dettach/reset, patch by Mark McLoughlin
daniel

16 years ago* src/qemu_driver.c: add qemu dettach/reattach/reset implementation
Daniel Veillard [Mon, 2 Mar 2009 16:32:52 +0000 (16:32 +0000)]
* src/qemu_driver.c: add qemu dettach/reattach/reset implementation
  patch by Mark McLoughlin.
Daniel

16 years agoImplement node attach/reattach/reset in the remote driver
Daniel Veillard [Mon, 2 Mar 2009 16:30:59 +0000 (16:30 +0000)]
Implement node attach/reattach/reset in the remote driver
* qemud/remote.c qemud/remote_dispatch_args.h
  qemud/remote_dispatch_prototypes.h qemud/remote_dispatch_table.h
  qemud/remote_protocol.c qemud/remote_protocol.h
  qemud/remote_protocol.x src/remote_internal.c: Implement
  attach/reattach/reset in the remote driver, patch by Mark
  McLoughlin.
Daniel

16 years ago* src/virsh.c: add 3 new commands for node device detach, reattach and reset,
Daniel Veillard [Mon, 2 Mar 2009 16:28:17 +0000 (16:28 +0000)]
* src/virsh.c: add 3 new commands for node device detach, reattach and reset,
  patch by Mark McLoughlin.
Daniel

16 years agoAdds the APIs for virNodeDeviceDettach , ReAttach and Reset
Daniel Veillard [Mon, 2 Mar 2009 16:25:13 +0000 (16:25 +0000)]
Adds the APIs for virNodeDeviceDettach , ReAttach and Reset
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in
  src/driver.h src/libvirt.c src/libvirt_public.syms
  src/lxc_driver.c src/openvz_driver.c src/qemu_driver.c
  src/test.c src/uml_driver.c: add the public APIs for
  virNodeDeviceDettach virNodeDeviceReAttach and virNodeDeviceReset
  and extends the driver structure accordingly.
Daniel

16 years agoimplements dettach, reattach and reset for PCI devices
Daniel Veillard [Mon, 2 Mar 2009 16:18:11 +0000 (16:18 +0000)]
implements dettach, reattach and reset for PCI devices
* configure.in po/POTFILES.in src/Makefile.am src/libvirt_private.syms
  src/pci.c src/pci.h: Add implementations of dettach, reattach and
  reset for PCI devices, patch by Mark McLoughlin
Daniel

16 years ago* qemud/qemud.c src/node_device_hal.c: activate DBus multithreading
Daniel Veillard [Mon, 2 Mar 2009 11:13:37 +0000 (11:13 +0000)]
* qemud/qemud.c src/node_device_hal.c: activate DBus multithreading
  to avoid random crashes in the daemon, patch by Daniel Berrange
Daniel

16 years agocorrect a typo in a diagnostic
Jim Meyering [Mon, 2 Mar 2009 10:27:20 +0000 (10:27 +0000)]
correct a typo in a diagnostic

* src/storage_conf.c (virStorageVolDefParsePerms): Correct a typo:
s/owner/group/.  Patch by Ryota Ozaki.

16 years agoplug two config-parsing leaks
Jim Meyering [Mon, 2 Mar 2009 10:26:37 +0000 (10:26 +0000)]
plug two config-parsing leaks

* src/storage_conf.c (virStoragePoolDefParsePerms): Free mode string.
(virStorageVolDefParsePerms): Likewise.
* AUTHORS: Update.
Patch by Ryota Ozaki.

16 years agodon't dereference uninitialized pointer
Jim Meyering [Mon, 2 Mar 2009 10:07:55 +0000 (10:07 +0000)]
don't dereference uninitialized pointer

* src/storage_conf.c (virStoragePoolDefParsePerms): Initialize
"ptr" to NULL.

16 years agoIf there is a failure during Qemu offline migrate, make sure to resume the
Chris Lalancette [Fri, 27 Feb 2009 16:18:50 +0000 (16:18 +0000)]
If there is a failure during Qemu offline migrate, make sure to resume the
guest.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
16 years ago* docs/libvirt-api.xml docs/libvirt-refs.xml
Daniel Veillard [Fri, 27 Feb 2009 14:30:51 +0000 (14:30 +0000)]
* docs/libvirt-api.xml docs/libvirt-refs.xml
  docs/devhelp/libvirt-virterror.html docs/html/libvirt-virterror.html:
  regenerated the APIs and documentation.
* po/*: updated the polish translation, regenerated.
daniel

16 years agoAdd support for a exec callback in virExecWithHook
Daniel P. Berrange [Thu, 26 Feb 2009 16:27:51 +0000 (16:27 +0000)]
Add support for a exec callback in virExecWithHook

16 years agoNew example program
Daniel Veillard [Thu, 26 Feb 2009 16:14:50 +0000 (16:14 +0000)]
New example program
* Makefile.am configure.in examples/hellolibvirt/Makefile.am
  examples/hellolibvirt/hellolibvirt.c: new trivial example program
  by David Allan
Daniel

16 years ago* src/remote_internal.c: fix autostart of session daemon, patch
Daniel Veillard [Thu, 26 Feb 2009 15:06:06 +0000 (15:06 +0000)]
* src/remote_internal.c: fix autostart of session daemon, patch
  by Dan Berrange
Daniel

16 years ago* src/storage_backend_fs.c: fix compile-error when configured without qemu-img
Daniel Veillard [Thu, 26 Feb 2009 14:36:30 +0000 (14:36 +0000)]
* src/storage_backend_fs.c: fix compile-error when configured without qemu-img
daniel

16 years ago* python/Makefile.am: avoid a parallel make issue #472702
Daniel Veillard [Thu, 26 Feb 2009 13:58:35 +0000 (13:58 +0000)]
* python/Makefile.am: avoid a parallel make issue #472702
  provided by Michael Marineau
Daniel

16 years agodocumenting static host IP assignments
Daniel Veillard [Wed, 25 Feb 2009 20:02:14 +0000 (20:02 +0000)]
documenting static host IP assignments
* docs/formatnetwork.html docs/formatnetwork.html.in: patch from
  Charles Duffy documenting static host IP assignments.
daniel

16 years agoAdd forgotten file
Mark McLoughlin [Tue, 24 Feb 2009 15:53:31 +0000 (15:53 +0000)]
Add forgotten file

16 years agoAdd nodedevxml2xml test
Mark McLoughlin [Tue, 24 Feb 2009 14:58:32 +0000 (14:58 +0000)]
Add nodedevxml2xml test

Add a test to check node device XML parsing by first parsing
the XML, then re-formatting as XML and finally comparing the
resulting XML to the original XML.

16 years agoAdd virNodeDeviceDefParseString()
Mark McLoughlin [Tue, 24 Feb 2009 14:55:45 +0000 (14:55 +0000)]
Add virNodeDeviceDefParseString()

Add support for parsing node device XML descriptions.

This will be used by PCI passthrough related functions to
obtain the PCI device address for a given node device.

16 years agoAdd virXPathULongLong()
Mark McLoughlin [Tue, 24 Feb 2009 14:54:30 +0000 (14:54 +0000)]
Add virXPathULongLong()

Add a variant of virXPathULong() which can handle long longs.

Needed for parsing storage device capacities.

16 years agoAdd virXPathLongHex() and virXPathULongHex()
Mark McLoughlin [Tue, 24 Feb 2009 14:53:30 +0000 (14:53 +0000)]
Add virXPathLongHex() and virXPathULongHex()

Add new functions to allow parsing integers with base 16

This will be used to e.g. parse PCI vendor IDs.

16 years agoFix a typo in hostdev docs
Mark McLoughlin [Tue, 24 Feb 2009 14:52:33 +0000 (14:52 +0000)]
Fix a typo in hostdev docs

It's:

 <address bus='0x06' slot='0x02' function='0x0'/>

not:

 <address>bus='0x06' slot='0x02' function='0x0'</address>

16 years agonetworkEnableIpForwarding() now returns zero for success
Mark McLoughlin [Sun, 22 Feb 2009 11:19:54 +0000 (11:19 +0000)]
networkEnableIpForwarding() now returns zero for success

16 years agodocs: commit auto-generated change
Mark McLoughlin [Sun, 22 Feb 2009 11:17:38 +0000 (11:17 +0000)]
docs: commit auto-generated change

Commit auto-generated change as a result of earlier s/clock sync/clock offset/

16 years ago(s)size_t type cleanup
Guido Günther [Thu, 19 Feb 2009 08:18:31 +0000 (08:18 +0000)]
(s)size_t type cleanup

16 years agoRemove the _actually_ incorrect ATTRIBUTE_UNUSED (Patch by Maximilian Wilhelm)
Cole Robinson [Wed, 18 Feb 2009 01:37:47 +0000 (01:37 +0000)]
Remove the _actually_ incorrect ATTRIBUTE_UNUSED (Patch by Maximilian Wilhelm)

16 years agofix build failure due to invalid generated Makefile
Jim Meyering [Tue, 17 Feb 2009 14:46:21 +0000 (14:46 +0000)]
fix build failure due to invalid generated Makefile

* qemud/Makefile.am (libvirtd_LDADD): Unindent "if HAVE_*" directives.
Reported by Daniel Schwager.

16 years agoFix daemon TCP listen cleanup
Cole Robinson [Tue, 17 Feb 2009 14:40:24 +0000 (14:40 +0000)]
Fix daemon TCP listen cleanup

16 years agoRemove incorrect ATTRIBUTE_UNUSED usage.
Cole Robinson [Tue, 17 Feb 2009 14:38:22 +0000 (14:38 +0000)]
Remove incorrect ATTRIBUTE_UNUSED usage.

16 years agoBuild fix for 'driver.c' when building with loadable modules
Jim Meyering [Tue, 17 Feb 2009 10:43:26 +0000 (10:43 +0000)]
Build fix for 'driver.c' when building with loadable modules

The 'asprintf' -> 'virAsprintf' transition made in
[043d702f] "use virAsprintf instead of asprintf" introducted
a build error for 'driver.c' as 'util.h' has to be included.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
16 years agoAvoid link failure when configured --with-driver-modules
Jim Meyering [Tue, 17 Feb 2009 10:34:30 +0000 (10:34 +0000)]
Avoid link failure when configured --with-driver-modules

* qemud/Makefile.am (WITH_DRIVER_MODULES): Link with libvirt_driver.la
and libvirt_util.la.  Indent for readability.

16 years agoWork around 'virGetVersion' build problem
Jim Meyering [Tue, 17 Feb 2009 10:33:41 +0000 (10:33 +0000)]
Work around 'virGetVersion' build problem

The 'getVer' fix introducted in d88d459d [Allow remote://hostname/
style URIs for automatic driver probe...] breaks compiling libvirt
with loadable module support.  Work around this to get it building again.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
16 years agoavoid compiler warning about unused parameter
Jim Meyering [Tue, 17 Feb 2009 10:26:43 +0000 (10:26 +0000)]
avoid compiler warning about unused parameter

* src/bridge.c (brProbeVnetHdr)
[IFF_VNET_HDR && TUNGETFEATURES && TUNGETIFF]: Use a "(void)" case
to mark the parameter as unused.  Reported by Maximilian Wilhelm in
http://thread.gmane.org/gmane.comp.emulators.libvirt/11918/focus=11917

16 years agodon't fail daemon-conf test when configured --without-qemu
Jim Meyering [Tue, 17 Feb 2009 10:23:48 +0000 (10:23 +0000)]
don't fail daemon-conf test when configured --without-qemu

* tests/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
* tests/daemon-conf: Use test-lib.sh.
Skip this test when configured --without-qemu.

16 years agoaccommodate configuring --without-lxc --without-qemu
Jim Meyering [Tue, 17 Feb 2009 10:23:19 +0000 (10:23 +0000)]
accommodate configuring --without-lxc --without-qemu

* configure.in: Enable internal WITH_BRIDGE support not just for LXC or
QEMU, but also for --with-network.  Russell Haering reported that
compilation failed when configured with --without-lxc --without-qemu.
Details: http://thread.gmane.org/gmane.comp.emulators.libvirt/11928
* src/bridge.h: Use #if WITH_BRIDGE, rather than currently-equivalent
"#if defined(WITH_QEMU) || defined(WITH_LXC)"

16 years agodoc: fix typo in formatdomain's clock offset specification
Jim Meyering [Tue, 17 Feb 2009 10:19:40 +0000 (10:19 +0000)]
doc: fix typo in formatdomain's clock offset specification

* docs/formatdomain.html.in: s/clock sync/clock offset/
Patch by Jesse Lauren Farinacci <jieryn@gmail.com>.

16 years agoFix I/O errors in libvirtd daemon, and hang/crash in remote client upon I/O error
Daniel P. Berrange [Tue, 17 Feb 2009 09:44:18 +0000 (09:44 +0000)]
Fix I/O errors in libvirtd daemon, and hang/crash in remote client upon I/O error

16 years agoUnbreak virsh *-edit commands: Don't pass unexpected flags to DumpXML
Cole Robinson [Mon, 16 Feb 2009 22:51:31 +0000 (22:51 +0000)]
Unbreak virsh *-edit commands: Don't pass unexpected flags to DumpXML

16 years agoRemove erroneous lvm volume format check for backing store.
Cole Robinson [Mon, 16 Feb 2009 22:47:19 +0000 (22:47 +0000)]
Remove erroneous lvm volume format check for backing store.

16 years agoFix building python bindings: Skip bindings for virSaveLastError and
Cole Robinson [Mon, 16 Feb 2009 22:44:49 +0000 (22:44 +0000)]
Fix building python bindings: Skip bindings for virSaveLastError and
virFreeError

16 years agoAdd virFileWriteStr()
Mark McLoughlin [Fri, 13 Feb 2009 19:13:06 +0000 (19:13 +0000)]
Add virFileWriteStr()

Re-factor the code from networkEnableIpForwarding() into a
utility function in preparation for code which writes to
sysfs files.

16 years agoFix some error strings in xml.c
Mark McLoughlin [Fri, 13 Feb 2009 19:12:45 +0000 (19:12 +0000)]
Fix some error strings in xml.c

Just some copy-and-paste mixups.

16 years agovirXPathInt() and virXPathUInt() don't exist
Mark McLoughlin [Fri, 13 Feb 2009 19:12:20 +0000 (19:12 +0000)]
virXPathInt() and virXPathUInt() don't exist

It looks like these functions have never existed.

16 years agoFix bugzilla link in virsh man page
Mark McLoughlin [Fri, 13 Feb 2009 19:11:59 +0000 (19:11 +0000)]
Fix bugzilla link in virsh man page

Note, I haven't generated a new virsh.1 because Pod::Man 2.16
gives a bunch of warnings even with the existing version.

16 years ago Fix libvirt_proxy.c warnings from gcc-4.4
Mark McLoughlin [Fri, 13 Feb 2009 19:11:37 +0000 (19:11 +0000)]
 Fix libvirt_proxy.c warnings from gcc-4.4

 libvirt_proxy.c: In function 'proxyReadClientSocket':
 libvirt_proxy.c:659: error: dereferencing pointer 'req' does break strict-aliasing rules
 libvirt_proxy.c:657: error: dereferencing pointer 'req' does break strict-aliasing rules
 libvirt_proxy.c:655: error: dereferencing pointer 'req' does break strict-aliasing rules
 ...

16 years agoFix bridge.c warnings with gcc-4.4
Mark McLoughlin [Fri, 13 Feb 2009 19:10:55 +0000 (19:10 +0000)]
Fix bridge.c warnings with gcc-4.4

 bridge.c: In function 'brSetInetAddr':
 bridge.c:665: error: dereferencing pointer '({anonymous})' does break strict-aliasing rules
 bridge.c:665: note: initialized from here
 bridge.c:666: error: dereferencing pointer '({anonymous})' does break strict-aliasing rules
 bridge.c:666: note: initialized from here

Fix qemud.c warnings with gcc-4.4

 qemud.c: In function ‘remoteListenTCP’:
 qemud.c:675: error: dereferencing pointer ‘sa.72’ does break strict-aliasing rules
 qemud.c:675: note: initialized from here
 qemud.c:678: error: dereferencing pointer ‘sa.73’ does break strict-aliasing rules
 qemud.c:678: note: initialized from here

16 years agoFix migrate for Xen 3.3
John Levon [Fri, 13 Feb 2009 18:23:23 +0000 (18:23 +0000)]
Fix migrate for Xen 3.3

16 years agotest:///default driver: don't dereference NULL "def"
Jim Meyering [Fri, 13 Feb 2009 18:11:03 +0000 (18:11 +0000)]
test:///default driver: don't dereference NULL "def"

* src/test.c (testNetworkCreate, testNetworkDefine): Since "def" is
set to NULL immediately after any vir*AssignDef call (to indicate we
no longer own it and to ensure no clean-up path mistakenly frees it),
dereference via net->def->, not def->.

16 years agousleep to wait for domain logfile to fill up
Guido Günther [Fri, 13 Feb 2009 11:35:16 +0000 (11:35 +0000)]
usleep to wait for domain logfile to fill up

16 years agofix return status when domain didn't show up
Guido Günther [Wed, 11 Feb 2009 20:33:11 +0000 (20:33 +0000)]
fix return status when domain didn't show up

16 years agolibvirtd: new config-file option: unix_sock_dir
Jim Meyering [Mon, 9 Feb 2009 17:52:38 +0000 (17:52 +0000)]
libvirtd: new config-file option: unix_sock_dir

Before this change, the unix socket directory was hard-coded
to be e.g., /var/run/libvirt for euid==0 and ~/.libvirt otherwise.
With this change, you may now specify that directory in libvirtd's
config file via a line like this: unix_sock_dir = "/var/run/libvirt".
This is essential for running tests that do not impinge on any
existing libvirtd process, and in running tests in parallel.
* qemud/libvirtd.conf (unix_sock_dir): Add comment and example.
* qemud/qemud.h (struct qemud_server) [logDir]: Change type
from char[PATH_MAX] to char*.
* qemud/qemud.c (unix_sock_dir): New global
(remoteReadConfigFile): Set the global.
(qemudInitPaths): Use the global, unix_sock_dir, if non-NULL.
One minor improvement: unlink both sockets or none, never
just one of them.
(qemudCleanup): Free logDir.
(main): Use the new global rather than hard-coding "/run/libvirt".
* qemud/libvirtd.aug (sock_acl_entry): Add "unix_sock_dir".

16 years agodon't print uninitialized in debug diagnostic
Jim Meyering [Mon, 9 Feb 2009 15:38:06 +0000 (15:38 +0000)]
don't print uninitialized in debug diagnostic

* qemud/mdns.c (libvirtd_mdns_timeout_new): Don't use local, t,
uninitialized.

16 years agoavoid two test failures induced by today's error-reporting changes
Jim Meyering [Mon, 9 Feb 2009 15:31:34 +0000 (15:31 +0000)]
avoid two test failures induced by today's error-reporting changes

* tests/cpuset: Adjust expected diagnostic to match new behavior.
* tests/undefine: Likewise.

16 years agoImprove error reporting in virsh
John Levon [Mon, 9 Feb 2009 14:24:06 +0000 (14:24 +0000)]
Improve error reporting in virsh

16 years agointroduce virSaveLastError(), virFreeError()
John Levon [Mon, 9 Feb 2009 14:16:23 +0000 (14:16 +0000)]
introduce virSaveLastError(), virFreeError()

16 years agoLimit virsh history entries to 500 (Jim Paris)
Daniel P. Berrange [Mon, 9 Feb 2009 10:24:27 +0000 (10:24 +0000)]
Limit virsh history entries to 500 (Jim Paris)

16 years agoDon't ignore errors to save domain status
Guido Günther [Sat, 7 Feb 2009 21:36:06 +0000 (21:36 +0000)]
Don't ignore errors to save domain status

16 years agoFix 100% libvirt CPU usage when --timeout is set
Daniel P. Berrange [Fri, 6 Feb 2009 14:43:52 +0000 (14:43 +0000)]
Fix 100% libvirt CPU usage when --timeout is set

16 years agosrc/domain_conf.c: Check the last error, not the last
John Levon [Thu, 5 Feb 2009 19:29:37 +0000 (19:29 +0000)]
src/domain_conf.c: Check the last error, not the last
        connection error, which may not have been set.

16 years agoxenstore: Use virMacAddrCompare() for case-insensitive comparison
John Levon [Thu, 5 Feb 2009 18:14:00 +0000 (18:14 +0000)]
xenstore: Use virMacAddrCompare() for case-insensitive comparison

16 years agoreport error for some xend operations on shutdown domain
John Levon [Thu, 5 Feb 2009 17:24:51 +0000 (17:24 +0000)]
report error for some xend operations on shutdown domain

16 years agorobustify sexpr parser for NICs
John Levon [Thu, 5 Feb 2009 17:17:33 +0000 (17:17 +0000)]
robustify sexpr parser for NICs

16 years agosyntax-check: enable prohibit_nonreentrant
Jim Meyering [Thu, 5 Feb 2009 16:28:41 +0000 (16:28 +0000)]
syntax-check: enable prohibit_nonreentrant

* .x-sc_prohibit_nonreentrant: Add src/console.c and virterror.c.
* Makefile.cfg (local-checks-to-skip): Don't exempt
sc_prohibit_nonreentrant.
* Makefile.nonreentrant: Don't exempt strerror.

16 years agoremove remainder of offending strerror uses
Jim Meyering [Thu, 5 Feb 2009 16:28:30 +0000 (16:28 +0000)]
remove remainder of offending strerror uses

* qemud/qemud.c (GET_CONF_STR): Use virStrerror, not strerror.
* qemud/remote.c (remoteDispatchDomainBlockPeek): Likewise.
(remoteDispatchDomainMemoryPeek, remoteDispatchAuthSaslInit): Likewise.
(remoteDispatchAuthPolkit): Likewise.
* src/lxc_container.c (lxcContainerAvailable): Likewise.
* src/network_driver.c (networkStartNetworkDaemon): Likewise.
(networkShutdownNetworkDaemon): Likewise.
* src/qemu_conf.c (qemudExtractVersion, qemudNetworkIfaceConnect):
* src/storage_conf.c (virStoragePoolLoadAllConfigs): Likewise.
* src/storage_driver.c (storagePoolUndefine): Likewise.
* src/uml_driver.c (umlStartup, umlStartVMDaemon): Likewise.
* src/util.c (virFileReadAll): Likewise.
* src/uuid.c (virUUIDGenerate): Likewise.
* src/xen_internal.c (get_cpu_flags): Likewise.

16 years agodon't include raw errno in diagnostics
Jim Meyering [Thu, 5 Feb 2009 16:28:15 +0000 (16:28 +0000)]
don't include raw errno in diagnostics

* src/uml_driver.c (umlStartVMDaemon): Don't print raw errno value.
* qemud/remote.c (remoteDispatchAuthSaslInit): Likewise.

16 years agoqemud.c: use virStrerror, not strerror
Jim Meyering [Thu, 5 Feb 2009 16:28:03 +0000 (16:28 +0000)]
qemud.c: use virStrerror, not strerror

16 years agoiptables.c: Use virStrerror, not strerror.
Jim Meyering [Thu, 5 Feb 2009 16:27:51 +0000 (16:27 +0000)]
iptables.c: Use virStrerror, not strerror.

* src/iptables.c: Include "virterror_internal.h".
Use virStrerror, not strerror.
* src/iptables.c (notifyRulesUpdated): Use %s rather than
string-concatenation that made sc_unmarked_diagnostics report
a false-positive.

16 years agouse virReportOOMError rather than more verbose equivalent
Jim Meyering [Thu, 5 Feb 2009 16:27:40 +0000 (16:27 +0000)]
use virReportOOMError rather than more verbose equivalent

* src/qemu_driver.c (qemudDomainSave, qemudDomainRestore)
(qemudDomainAttachPciDiskDevice)
(qemudDomainAttachUsbMassstorageDevice):

16 years agoqemu_driver.c: s/strerror/virStrerror.../
Jim Meyering [Thu, 5 Feb 2009 16:27:28 +0000 (16:27 +0000)]
qemu_driver.c: s/strerror/virStrerror.../

Perform most changs automatically, with this:
perl -pi -e 's/\bstrerror *\((.+?)\)/virStrerror($1, ebuf, sizeof ebuf)/'
Then, declare ebuf, as needed

16 years agoremove duplicate *SetCloseExec and *SetNonBlock functions
Jim Meyering [Thu, 5 Feb 2009 16:27:17 +0000 (16:27 +0000)]
remove duplicate *SetCloseExec and *SetNonBlock functions

* src/qemu_driver.c: Use virSetCloseExec and virSetNonBlock,
rather than qemuSet* functions.  Suggested by Daniel P. Berrange.
* src/util.c (virSetCloseExec): Publicize.
* src/util.h (virSetCloseExec): Declare
* src/libvirt_private.syms: Add virSetCloseExec.

16 years agoChangeLog: correct date formats one last time
Jim Meyering [Thu, 5 Feb 2009 16:25:32 +0000 (16:25 +0000)]
ChangeLog: correct date formats one last time

16 years agoqemu_driver.c: use virReportSystemError in place of some qemudLog uses
Jim Meyering [Thu, 5 Feb 2009 16:11:25 +0000 (16:11 +0000)]
qemu_driver.c: use virReportSystemError in place of some qemudLog uses

...thus eliminating many uses of strerror.
(kvmGetMaxVCPUs): Rather than merely warning, diagnose an error
and return -1 upon failure to open KVM_DEVICE.  Suggested by
Daniel P. Berrange.

16 years agopublicize virStrerror
Jim Meyering [Thu, 5 Feb 2009 16:10:07 +0000 (16:10 +0000)]
publicize virStrerror

* src/virterror.c (virStrerror): Remove "static".
* src/virterror_internal.h (virStrerror): Declare it.
* src/libvirt_private.syms: Add virStrerror;

16 years agoremove useless code
Jim Meyering [Thu, 5 Feb 2009 16:03:11 +0000 (16:03 +0000)]
remove useless code

* src/bridge.c (brAddTap): Remove redundant errno=ENOMEM assignment
after failed strdup.
* src/cgroup.c (virCgroupFree): Remove redundant *group=NULL assignment
after VIR_FREE(*group).
* src/lxc_driver.c (lxcShutdown): Likewise.
* src/xen_unified.c (xenUnifiedClose): Likewise.
* src/xm_internal.c (xenXMDomainConfigFormat): Rewrite disk-
and net-config-setting code to be clearer.

16 years agolxc_container: Don't dereference NULL upon failure
Jim Meyering [Thu, 5 Feb 2009 15:28:19 +0000 (15:28 +0000)]
lxc_container: Don't dereference NULL upon failure

* src/lxc_container.c (lxcContainerPivotRoot): Free and zero
oldroot *after* printing the diagnostic, both for virFileMakePath
and pivot_root failure.

16 years agoChangeLog: reformat recent date/name/email lines
Jim Meyering [Tue, 3 Feb 2009 21:12:22 +0000 (21:12 +0000)]
ChangeLog: reformat recent date/name/email lines

16 years agoavoid a format-related warning
Jim Meyering [Tue, 3 Feb 2009 13:09:18 +0000 (13:09 +0000)]
avoid a format-related warning

* src/qemu_driver.c (qemudStartVMDaemon): Use "%s".

16 years agobuild: enable redundant-const check
Jim Meyering [Tue, 3 Feb 2009 13:08:59 +0000 (13:08 +0000)]
build: enable redundant-const check

* Makefile.cfg (local-checks-to-skip): Remove sc_redundant_const.
* src/lxc_controller.c: Remove redundant "const"(s).
* src/storage_backend_fs.c: Likewise.
* src/util.h: Likewise.
* src/xen_internal.c: Likewise.
* tests/qparamtest.c: Likewise.

16 years agosyntax-check: enable more checks
Jim Meyering [Tue, 3 Feb 2009 13:08:36 +0000 (13:08 +0000)]
syntax-check: enable more checks

* Makefile.cfg (local-checks-to-skip): Don't skip sc_m4_quote_check.
Don't skip sc_prohibit_nonreentrant.
* Makefile.nonreentrant (NON_REENTRANT): Comment out until we've
remove all remaining uses of strerror.