Commit Graph

1800 Commits

Author SHA1 Message Date
Daniel P. Berrange
821b41f9f7 Fix driver ordering to make domain autostart work (Gerd von Egidy) 2008-12-02 11:37:55 +00:00
Daniel P. Berrange
a429e221df Fix recording of UML driver watch to make inotify work 2008-12-02 11:23:27 +00:00
Jim Meyering
fb23f4f4f4 tests: daemon-conf: accommodate numeric-valued config params
This test would hang when failing to perturb the soon-to-be-
added numeric (and non-boolean) valued parameters, max_clients,
max_workers, min_workers.
* tests/daemon-conf: Require that all commented-out settings
in libvirtd.conf have the same form.  Before, two parameters
were not being tested, since a space had snuck between the
leading "#" and the "param = value" parts.
Apply each RHS-value-perturbing transformation
separately, not in series.
Let VERBOSE=yes turn on debugging.
Be more verbose by default, since this is a relatively
long-running test.
* qemud/libvirtd.conf: Normalize the spacing around each setting
that is to be perturbed by tests/daemon-conf.
2008-12-01 15:04:28 +00:00
Jim Meyering
0e9349a28d uml: don't free an uninitialized variable
* src/uml_driver.c (umlDomainShutdown): Initialize "info".
Patch and bug report from Ron Yorston <rmy@tigress.co.uk>.
2008-12-01 11:08:16 +00:00
Daniel P. Berrange
937c1e9e92 Close directory handle when done 2008-11-30 18:37:35 +00:00
Guido Günther
5acdb5761d Prefer xenstore driver for listDomains, since xen HV reports ghost ids of
already shutdown domains in some xen versions
2008-11-28 15:25:04 +00:00
Daniel P. Berrange
d88d459d7b Allow remote://hostname/ style URIs for automatic driver probe. Fix virGetVersion impl 2008-11-28 12:03:20 +00:00
Daniel P. Berrange
319b83fc28 Fix XM driver handling of disk source paths 2008-11-28 11:23:34 +00:00
Daniel P. Berrange
c23ff311fc Fix libnuma use to build with v1 compatability code 2008-11-28 11:20:27 +00:00
Chris Lalancette
d20d6b1bb0 Currently libvirt can race with udev
creation of /dev/disk/by-{id,path}, so if we fail to open the directory, retry
up to 5 seconds.  This is only likely to happen on hosts that are:

1) diskless (so /dev/disk/by-{id,path} doesn't exist already), and
2) slow, and/or heavily loaded (meaning that udev can take some time to create
the /dev nodes).

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-11-28 07:42:21 +00:00
Daniel Veillard
431d40fa9c * src/xen_unified.c: use preferably xend method to update
the maximum memory of a xen guest (Jim Fehlig)
Daniel
2008-11-27 16:16:13 +00:00
Daniel Veillard
60c8b285a6 * libvirt.spec.in: cleanups and missing dep for hal
Daniel
2008-11-26 14:46:49 +00:00
Daniel Veillard
517ff04bec Release of 0.5.0
* configure.in docs/* NEWS: release of 0.5.0
* po/*: updated from the translators and merged
* docs/apibuild.py src/libvirt.c: avoid some warnings at doc
  generation time
daniel
2008-11-25 15:48:11 +00:00
Jim Meyering
c6796fc5d4 configure.in: avoid the following diagnostic when running ../configure ...
cp: cannot stat `COPYING.LIB': No such file or directory
2008-11-25 15:36:09 +00:00
Jim Meyering
d5ae2c8882 don't silently skip a test
* tests/Makefile.am (EXTRA_DIST): Distribute domainschemadata/.
* tests/domainschematest: Fail the test if find invocation fails.
2008-11-25 15:34:59 +00:00
Daniel P. Berrange
567989d0de Disable UML driver on mingw RPM build 2008-11-25 11:27:51 +00:00
Daniel P. Berrange
5a01629128 Add missing translations 2008-11-25 11:18:08 +00:00
Daniel P. Berrange
8f7e086f19 Implement autostart for XM driver 2008-11-25 11:04:34 +00:00
Daniel P. Berrange
1eeceaa649 Support domain lifecycle events for Xen (Ben Guthro & Daniel Berrange) 2008-11-25 10:44:52 +00:00
Daniel P. Berrange
b2dbfefcf3 Avoid symbol clash with win32 headers and node device APIs 2008-11-25 10:37:02 +00:00
Jim Meyering
9a7c05d995 * src/virterror.c (virReportErrorHelper): Sync doc to code. 2008-11-25 10:32:27 +00:00
Jim Meyering
335de2ba1f libvirt.c: document the virState* functions
* src/libvirt.c (virStateActive, virStateCleanup, virStateReload):
(virStateActive): Add per-function comments.
2008-11-25 10:31:52 +00:00
Daniel P. Berrange
1ad44362e3 Set default vCPUs to match pCPUs for OpenVZ containers (Evgeniy Sokolov ) 2008-11-24 19:34:21 +00:00
Daniel P. Berrange
c673689430 Fix python bindings events code (David Lively) 2008-11-24 19:28:12 +00:00
Daniel P. Berrange
cfb0dca6ec Fix test suite build when Xen driver is disabled 2008-11-24 19:23:39 +00:00
Daniel P. Berrange
6f5600c803 Disable UML build on mingw32 2008-11-24 16:50:18 +00:00
Guido Günther
4b4a6d9d56 * src/Makefile.am: look for libvirt_sym.version in builddir 2008-11-24 15:07:45 +00:00
Jim Meyering
62bcd5d32b tests: new test: virsh-synopsis
* tests/virsh-synopsis: new file
* tests/Makefile.am (test_scripts): Add virsh-synopsis.
* src/virsh.c: Correct help SYNOPSIS for each of seven commands.

When I first ran this script, "make check" failed like this:
  ...
  invalid help SYNOPSIS for net-create:
      create a network from an XML <file>
  invalid help SYNOPSIS for net-define:
      define a network from an XML <file>
  invalid help SYNOPSIS for net-start:
      start <network>
  invalid help SYNOPSIS for pool-create:
      create a pool from an XML <file>
  invalid help SYNOPSIS for pool-define:
      define a pool from an XML <file>
  invalid help SYNOPSIS for pool-start:
      start <pool>
  invalid help SYNOPSIS for vol-create:
      create <file>
  FAIL: virsh-synopsis
2008-11-24 07:13:29 +00:00
Jim Meyering
8275cc5eb0 tests: virsh-all: new script
* tests/virsh-all: New script.
* tests/Makefile.am (test_scripts): Add virsh-all.
2008-11-24 07:12:41 +00:00
Jim Meyering
5b5393f27a Move the expected output data from virshdata/*.txt into virshtest.c.
* tests/virshtest.c: Embed literal, expected output here, rather than
using virshdata/*.txt file names.
Factor out some common constructs.
(testCompareOutputLit): New function.
(testCompareOutput): #ifdef-out, not that it's unused.
* tests/Makefile.am (SUBDIRS): Remove virshdata/ and all files in it.
* docs/testnode.xml: Fix typo in a comment.
* configure.in (AC_OUTPUT): Remove tests/virshdata/Makefile.
2008-11-24 07:11:26 +00:00
Jim Meyering
4733f0a781 * gnulib/tests/test-EOVERFLOW: Remove.
* gnulib/tests/.cvsignore: Add test-EOVERFLOW, then...
Run "make sync-vcs-ignore-files" to Update .gitignore files.
2008-11-24 07:09:36 +00:00
Daniel P. Berrange
45b3259bf6 Re-generate website docs 2008-11-21 12:54:51 +00:00
Daniel P. Berrange
61c7ab56fd Regenerate API docs 2008-11-21 12:51:41 +00:00
Daniel P. Berrange
145bb1e821 Misc tweaks to node device impl 2008-11-21 12:46:39 +00:00
Daniel P. Berrange
83928c2074 Python binding for node device APIs (David Lively) 2008-11-21 12:41:15 +00:00
Daniel P. Berrange
1ee5367c19 Node device support in virsh (David Lively) 2008-11-21 12:39:48 +00:00
Daniel P. Berrange
8325fcf13d Remote protocol support for node devices (David Lively) 2008-11-21 12:31:04 +00:00
Daniel P. Berrange
620d4be7ae Node device driver for HAL and DeviceKit (David Lively) 2008-11-21 12:27:11 +00:00
Daniel P. Berrange
149322c530 Internal APIs for handling node device XML configuration (David Lively) 2008-11-21 12:20:45 +00:00
Daniel P. Berrange
0793e73c02 Public API for node device enumeration (David Lively) 2008-11-21 12:19:22 +00:00
Daniel P. Berrange
2c855c1c66 Optional dlopen support for drivers 2008-11-21 12:16:08 +00:00
Daniel P. Berrange
410fb96cbc Add export of virDomainEventCallbackListRemoveConn method 2008-11-21 11:44:03 +00:00
Daniel P. Berrange
c67700be8a Fix two memory leaks in domain conf and LXC code 2008-11-21 11:42:51 +00:00
Daniel P. Berrange
660418cff4 Misc fixes to event registration failure cases 2008-11-21 10:22:58 +00:00
Daniel P. Berrange
41f14d6ea5 Fix crash due to failure to unregister event callbacks in QEMU driver (David Lively) 2008-11-21 10:17:22 +00:00
Daniel P. Berrange
f6dacb21d2 Add Xen compiler flags for stats_linux.c build 2008-11-21 10:12:03 +00:00
Daniel P. Berrange
d7605585cd Allow UML build to be disabled in RPM 2008-11-21 10:09:08 +00:00
Daniel Veillard
4815221333 * po/POTFILES.in src/uml_conf.h src/uml_driver.c: fixes syntax
check errors, reported by Ben Guthro
daniel
2008-11-21 10:06:28 +00:00
Daniel P. Berrange
d378791480 Fix crash on NULL uri scheme 2008-11-20 14:33:59 +00:00
Daniel P. Berrange
714bef5b6a Add an initial User Mode Linux Driver 2008-11-19 16:58:23 +00:00
Daniel P. Berrange
6d04effac7 Add a virFreeCallback to event loop APIs 2008-11-19 16:24:01 +00:00
Daniel P. Berrange
6d41cb87d3 Change public API for virEventAddHandle to allow multiple registrations per FD 2008-11-19 16:19:36 +00:00
Daniel P. Berrange
3d41e86534 Add a virFreeCallback to virDomainEventRegister (from David Lively) 2008-11-19 15:25:24 +00:00
Daniel P. Berrange
8a1553e43a Fix windows build & build without QEMU driver 2008-11-18 12:46:13 +00:00
Daniel P. Berrange
a5e72f9177 Add QEMU driver events for defined/undefined config files 2008-11-17 16:52:32 +00:00
Daniel P. Berrange
d3d54d2fc9 Add domain events detail information 2008-11-17 16:43:00 +00:00
Daniel P. Berrange
89156f1985 Link QEMU, LXC, network and storage drivers directly into libvirtd 2008-11-17 12:18:18 +00:00
Daniel P. Berrange
618276de19 Push URI probing logic down into individual drivers 2008-11-17 11:44:51 +00:00
Daniel P. Berrange
c08a47b853 Refactor storage backends to avoid dependancy from config parser to implementation 2008-11-17 11:19:33 +00:00
Daniel P. Berrange
25047e7cf8 Use a versioned linker script 2008-11-17 11:03:25 +00:00
Daniel P. Berrange
41ebac421e Build drivers as libtool convenience libs 2008-11-17 10:43:30 +00:00
Daniel P. Berrange
48e9d7b726 Fix domain events python thread safety & incorrect enum generation 2008-11-17 10:26:09 +00:00
Daniel P. Berrange
4f956c040c Fix updating of openvz config file params 2008-11-17 09:55:59 +00:00
Cole Robinson
00e8a7a491 Use different separator for lvs command to unbreak parsing for encrypted devs. 2008-11-14 16:10:47 +00:00
Jim Meyering
94359e16d3 avoid format string warnings
* src/openvz_driver.c (ADD_ARG_LIT): Add "%s" arg before _(...).
* src/qemu_driver.c (PCI_ATTACH_OK_MSG): Likewise.
* src/util.c (virExec, virRun): Likewise.
2008-11-14 14:19:37 +00:00
Daniel Veillard
df285bdd8d KVM/QEmu migration support
* qemud/remote.c qemud/remote_dispatch_localvars.h
  qemud/remote_dispatch_proc_switch.h qemud/remote_dispatch_prototypes.h
  qemud/remote_protocol.c qemud/remote_protocol.h
  qemud/remote_protocol.x src/driver.h src/libvirt.c
  src/libvirt_internal.h src/libvirt_sym.version src/lxc_driver.c
  src/openvz_driver.c src/qemu_conf.h src/qemu_driver.c
  src/remote_internal.c src/test.c src/virsh.c: large patch to
  add migration support for KVM/QEmu, based on the work of Rich Jones
  and Chris Lalancette. This introduce a new version of the prepare
  and finish steps of the migration, so changes the driver API and
  a lot of code.
Daniel
2008-11-14 08:42:47 +00:00
Daniel P. Berrange
bfdac58c36 Add bridged network to openvz driver & add some openvz docs 2008-11-12 16:35:47 +00:00
Daniel P. Berrange
48f32d8033 Revert previous storage patch which broke test driver 2008-11-12 16:28:27 +00:00
Daniel P. Berrange
8a8826600c Re-arrange storage backend registration 2008-11-11 15:52:16 +00:00
Daniel P. Berrange
9b7fd9c4ae Support OpenVZ filesystem template config in XML dump 2008-11-10 12:08:19 +00:00
Jim Meyering
1dea5535b0 tweak lstat.c to avoid mingw link failure
* gnulib/lib/lstat.c: Include <sys/stat.h> *before* the use of stat in
orig_stat.  Otherwise, on mingw (which lacks lstat), any program using
the lstat module would not get the redefinition-to-stat provided by
gnulib's sys/stat.h.  Reported by Daniel P. Berrange.
2008-11-07 16:44:38 +00:00
Jim Meyering
0e7a565229 mark a few diagnostics for translation
* src/lxc_conf.c (lxcLoadDriverConfig): Mark a diagnostic.
* src/lxc_driver.c (lxcDomainStart): Likewise.
* po/POTFILES.in: Add src/lxc_conf.c.
* Makefile.maint (msg_gen_function): Add virReportErrorHelper
and lxcError.
2008-11-07 16:43:58 +00:00
Jim Meyering
0d4cdc0569 always compile iptables.c
Avoid a build error when configuring --without-xen --without-qemu.
* src/iptables.c [WITH_QEMU]: Don't #ifdef-out.
* src/iptables.h [WITH_QEMU]: Don't #ifdef-out.
* src/util.c (virRun) [__MINGW32__]: Define a stub that always fails.
2008-11-07 16:43:23 +00:00
Daniel Veillard
df93e1ee24 add new logging module, and move existing definitions there
* src/logging.c src/logging.h proxy/Makefile.am proxy/libvirt_proxy.c
  src/Makefile.am src/cgroup.c src/datatypes.c src/domain_event.c
  src/internal.h src/libvirt.c src/lxc_container.c src/lxc_controller.c
  src/lxc_driver.c src/proxy_internal.c src/qemu_driver.c
  src/remote_internal.c src/storage_backend_disk.c src/util.c
  src/veth.c src/xen_internal.c src/xen_unified.c src/xend_internal.c:
  add new logging module, and move existing definitions there
Daniel
2008-11-06 16:36:07 +00:00
Cole Robinson
3796e5802f Log stdout and stderr in virRun 2008-11-05 18:57:42 +00:00
Cole Robinson
a9a11b5393 Log the argv passed to virExec and virRun 2008-11-05 18:41:07 +00:00
Cole Robinson
f1ca068666 Move local argvToString to virArgvToString in util. 2008-11-05 18:22:10 +00:00
Jim Meyering
7271a92bec plug two leaks and fix a diagnostic
* src/qemu_conf.c (qemudLoadDriverConfig): Don't leak ->vncListen.
Fix an erroneous copy-and-pasted diagnostic.
* src/qemu_driver.c (qemudShutdown): Don't leak another ->vncListen.
2008-11-05 14:24:21 +00:00
Chris Lalancette
1ac47e34f2 Call vgscan before attempting to scan logical volumes. This makes sure we've
"touched" any logical volumes, so they appear in the subsequent "pvs" call.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-11-05 11:41:43 +00:00
Daniel P. Berrange
c9ff52fb8a Move WITH_XXX driver feature flags into config.h instead of direct compiler/linker args 2008-11-04 23:37:23 +00:00
Daniel P. Berrange
2ea1eceb75 Move domain events helpers into dedicated file 2008-11-04 23:33:57 +00:00
Daniel P. Berrange
6ace5a39c3 Move some API declarations out of internal.h & hash.c into dedicated files 2008-11-04 23:22:06 +00:00
Daniel P. Berrange
2f19b24a03 Remove unused internal virStateSigDispatcher() API 2008-11-04 22:55:51 +00:00
Daniel P. Berrange
d714b2afae Move internal error APIs into virterror_internal.h & drop leading __ prefix 2008-11-04 22:30:33 +00:00
Daniel P. Berrange
78439117bc Add support for -uuid and -domid args to QEMU 2008-11-04 22:15:30 +00:00
Daniel P. Berrange
cbb1dd0a9b Remove use of virStringList in favour of strongly typed APIs 2008-11-04 21:54:21 +00:00
Jim Meyering
b5bb5d950f don't print an uninitialized integer in a diagnostic
* src/virterror.c (__virErrorMsg) [VIR_ERR_XEN_CALL]:
Use a format with only one % directive.
2008-11-04 15:02:36 +00:00
Jim Meyering
c8dc7e8ce2 add a test for today's fix
* tests/cpuset: New script.  Test for today's fix.
* tests/Makefile.am (test_scripts): Add cpuset.
2008-11-04 14:55:30 +00:00
Daniel Veillard
acaa863576 * AUTHORS: added Guido Günther as new commiter, Dan Smith was missing too
daniel
2008-11-03 16:14:04 +00:00
Daniel Veillard
d9c75acde1 * src/qemu_conf.c: switch off cache if disk is shared and not read-only
patch by Charles Duffy
Daniel
2008-11-03 15:58:02 +00:00
Daniel Veillard
c1a9be4c1b * src/qemu_driver.c: oops trailing blanks
Daniel
2008-11-03 15:52:55 +00:00
Chris Lalancette
17a9e03cd1 Give iSCSI and disk storage backend drivers the
ability to resolve any kind of volume path to the pool target volume
path.  For instance, if the pool was defined with a
<target><path>/dev/disk/by-id</path></target> section, and one of the
volumes is /dev/disk/by-id/scsi-S_beaf11, then you would be able to
call virStorageVolLookupByPath("/dev/sdc"), and get the correct volume
back.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-11-03 11:37:11 +00:00
Daniel Veillard
7d3041aff3 * python/virConnect.py: needed for events from the python bindings
by Ben Guthro
daniel
2008-10-31 13:56:47 +00:00
Daniel Veillard
ba2dff372c * src/xm_internal.c: add minimum domain memory size check for Xen
patch by Shigeki Sakamoto
* AUTHORS: add Shigeki Sakamoto
Daniel
2008-10-31 13:06:17 +00:00
Daniel Veillard
7b716fce8e * python/Makefile.am python/generator.py python/libvir.c
python/libvir.py python/libvirt_wrap.h python/types.c:
  adds support for events from the python bindings, also
  improves the generator allowing to embbed per function
  definition files, patch by Ben Guthro
* examples/domain-events/events-python/event-test.py: also
  adds a programming example
Daniel
2008-10-31 10:13:45 +00:00
Cole Robinson
c5ee075dd9 Add a test storage driver. 2008-10-30 17:40:57 +00:00
Daniel Veillard
f22d0fcd8d * docs/relatedlinks.html docs/relatedlinks.html.in: add link
for AMQP/QPid bindings
daniel
2008-10-29 15:34:12 +00:00
Daniel Veillard
4780a00b14 * src/domain_conf.h src/qemu_driver.c: patch adding hor removal of
scsi/virtio disks for KVM, patch by Guido Günther
daniel
2008-10-29 14:32:40 +00:00
Jim Meyering
f79ebbd121 remove src/socketcompat.h; no longer needed
* src/socketcompat.h: Remove file.
* src/remote_internal.c: Don't include socketcompat.h.
* qemud/qemud.h: Likewise.
* qemud/remote_protocol.x: Likewise, but do include <arpa/inet.h>
for htonl.
* src/remote_internal.c: Likewise, but do include <errno.h>.
* qemud/remote_protocol.c: Regenererate.
* qemud/remote_protocol.h: Regenererate.
* src/Makefile.am (REMOTE_DRIVER_SOURCES): Remove socketcompat.h.
2008-10-28 19:09:04 +00:00
Jim Meyering
d6efc2ffd3 make generated qemud/*.[ch] files read-only
* qemud/Makefile.am (.x.c): Rewrite not to write directly to $@,
and to make generated files read-only.
(.x.h): Likewise.
2008-10-28 17:48:11 +00:00
Jim Meyering
487d57b341 avoid compiler warning when all storage backends are disabled
* src/storage_backend.c (backends): Add a NULL terminator.
(virStorageBackendForType): Use NULL terminator rather than
warning-provoking (possibly 0) array size.
2008-10-28 17:48:06 +00:00
Jim Meyering
a6c7f474eb avoid many mingw-specific warnings
* tests/virshtest.c (mymain): Use only one definition of this function.
[WIN32]: Call exit(77) to skip the test.
* tests/nodeinfotest.c: Likewise.
2008-10-28 17:48:01 +00:00
Jim Meyering
57d54689da cvsignore mingw build artifacts: *.exe 2008-10-28 17:47:54 +00:00
Jim Meyering
2bbf76ebeb include netinet etc #ifndef HAVE_WINSOCK2_H 2008-10-28 17:47:45 +00:00
Jim Meyering
78d4d969e2 * src/remote_internal.c (remoteFindDaemonPath) [!WIN32]: Don't compile. 2008-10-28 17:47:40 +00:00
Jim Meyering
c5f45efd06 use errno, not socket_errno()
* remote_internal.c: s/socket_errno()/errno/, now that gnulib's
socket module ensures errno is useful in those cases.
2008-10-28 17:47:33 +00:00
Jim Meyering
b80b3ce4b3 socketcompat.h: simplify, to match latest gnulib
Now, sys/socket.h is always available, and errno works.
2008-10-28 17:47:23 +00:00
Jim Meyering
75e69df956 updates from gnulib 2008-10-28 17:47:12 +00:00
Jim Meyering
c54eb963dd use more gnulib modules
* bootstrap: use more gnulib modules: close, connect, perror, recv,
send, socket setsockopt, gethostname.
2008-10-28 17:46:07 +00:00
Jim Meyering
cabb75c503 adapt to API change in gnulib
* qemud/qemud.c: Include <netdb.h>, not "getaddrinfo.h"
* src/remote_internal.c: Likewise.
2008-10-28 17:46:00 +00:00
Jim Meyering
9801d7c595 * src/network_conf.c: Include <string.h> for declaration of memcmp. 2008-10-28 17:45:41 +00:00
Jim Meyering
05589b72c4 use ARRAY_CARDINALITY more
* tests/nodeinfotest.c: Include "util.h".
* src/xen_internal.c: Likewise.
* src/qemu_conf.c (qemudCapsInit): Use ARRAY_CARDINALITY.
* src/storage_backend.c (virStorageBackendForType): Likewise.
* src/storage_backend_fs.c (virStorageBackendProbeFile): Likewise.
* src/xen_internal.c (xenHypervisorMakeCapabilitiesInternal): Likewise.
* src/xend_internal.c (xenDaemonParseSxpr): Likewise.
* tests/nodeinfotest.c (mymain): Likewise.
* tests/qparamtest.c (DO_TEST): Likewise.
2008-10-28 17:43:24 +00:00
Jim Meyering
b172c22997 exempt gnulib from write-avoidance syntax check 2008-10-28 17:42:41 +00:00
Jim Meyering
711c5d62d1 exempt gnulib from ctype-macros prohibition
Author: Jim Meyering <meyering@redhat.com>
2008-10-28 17:36:31 +00:00
Daniel P. Berrange
b38d045dea Remove use of sys/poll.h on mingw 2008-10-24 13:10:30 +00:00
Daniel P. Berrange
bfc86e8a74 Fix syntax check errors 2008-10-24 12:05:39 +00:00
Daniel P. Berrange
3091bdd31a Implement getVersion API for openvz driver 2008-10-24 11:32:48 +00:00
Daniel P. Berrange
6d35116e33 Fix mingw build due to missing icons in tar.gz 2008-10-24 11:31:15 +00:00
Daniel P. Berrange
bdd50bc7f3 Centralize domain mac address handling in domain_conf.c/util.c 2008-10-24 11:20:08 +00:00
Jim Meyering
327b2eea26 fix mingw compilation warning
* src/libvirt.c (winsock_init) [HAVE_WINSOCK2_H]: Always return a value.
2008-10-24 08:55:13 +00:00
Chris Lalancette
c402724354 Brown paper bag bug. I didn't preserve the
<sources> tags properly, and I didn't put the <source> tag into the
proper place, so I totally changed the output of the discovery XML.
Fix this up to do the right thing.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-10-23 13:21:01 +00:00
Daniel Veillard
1509b8027f Massive patch adding event APIs by Ben Guthro
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in
  src/libvirt.c src/libvirt_sym.version: new libvirt event entry
  points, big patch provided by Ben Guthro
* Makefile.am configure.in src/driver.h src/event.c src/event.h
  src/internal.h src/libvirt.c src/libvirt_sym.version src/lxc_driver.c
  src/openvz_driver.c src/qemu_conf.h src/qemu_driver.c
  src/remote_internal.c src/storage_backend_fs.c src/test.c
  qemud/event.c qemud/event.h qemud/mdns.c qemud/qemud.c
  qemud/qemud.h qemud/remote.c qemud/remote_dispatch_localvars.h
  qemud/remote_dispatch_proc_switch.h qemud/remote_dispatch_prototypes.h
  qemud/remote_protocol.c qemud/remote_protocol.h
  qemud/remote_protocol.x proxy/Makefile.am python/generator.py:
  Not much is left untouched by the patch adding the events support
* docs/libvirt-api.xml docs/libvirt-refs.xml
  docs/html/libvirt-libvirt.html: regenerated the docs
* examples/domain-events/events-c/Makefile.am
  examples/domain-events/events-c/event-test.c: a test example
* AUTHORS: added Ben Guthro
daniel
2008-10-23 13:18:18 +00:00
Daniel Veillard
e10b79947a * docs/apps.html docs/apps.html.in: update monitoring apps section
Daniel
2008-10-23 11:42:42 +00:00
Chris Lalancette
e3b792d6e3 An updated patch for adding <device> tags to logical
findPoolSources.  Given danpb's last feedback, I completely removed the XML
parsing and did it all with structures.  The result should (hopefully) be a lot
easier on the eyes, and is a little more generic.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-10-23 11:39:53 +00:00
Chris Lalancette
c0c0fb8eef As suggested by danpb, to fix up the regression caused by last week's VIR_ENUM
cleanup patch, add a ".defaultFormat" member to .poolOptions.  In
storage_conf.c, if virXPathString(/pool/source/format/@type) returns NULL, then
set the pool type to .defaultFormat; otherwise, lookup the type via
formatFromString.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-10-23 11:32:22 +00:00
Cole Robinson
6d035f67e0 Fix syntax error that was breaking RPM builds. 2008-10-22 13:55:15 +00:00
Chris Lalancette
c6f0a7b2db Currently, you can define a logical storage pool with something like:
<pool type='logical'>
	<source>
		<name>MyVG</name>
		<device name='/dev/sdb'/>
...

However, dumping out the XML for this same storage pool (with, say, virsh
pool-dumpxml), gives:

<pool type='logical'>
	<source>
		<name>MyVG</name>
		<device name='/dev/sdb'>
		</device>


To make this more idempotent, do the <device name='/dev/sdb'/> form by default,
and only do the <device>...</device> form if .nfreeExtent is defined for the
storage pool.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-10-21 17:23:38 +00:00
Chris Lalancette
46db2b2968 Because of my patch last week that converted the various virStorage*FromString
and virStorage*ToString implementations to the generic VIR_ENUM_IMPL, there were
a couple of places that didn't properly set errors when they failed.  This patch
fixes these places up.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-10-21 17:18:45 +00:00
Chris Lalancette
c83c3e9e5c While doing on this patch series, I mistakenly added a bogus piece of
storage XML to libvirtd, which was saved in /etc/libvirt/storage.  On subsequent
stop/start of libvirtd, because of another bug , an
error wasn't being set properly in an error path, so libvirtd was SEGV'ing in
storage_conf.c:virStoragePoolObjLoad when trying to dereference the NULL err
returned from virGetLastError().  Make this more robust against errors by always
doing "err ? err->message : NULL" in the printf.  I looked around the tree and
found a couple of other places that weren't guarded, so this patch fixes them as
well.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-10-21 17:15:53 +00:00
Dan Smith
e98d8d7997 Fix up cgroup initialization order and allow /dev/pts device access in LXC 2008-10-21 16:46:47 +00:00
Daniel Veillard
85432b0bd0 Document somme commit rules, and add application monitoring links to docs
* HACKING: update with some rules for commiters
* docs/apps.html docs/apps.html.in: add a section on monitoring
  support
daniel
2008-10-21 14:26:59 +00:00
Daniel Veillard
6d6fd6b305 * src/qemu_driver.c: cleanup patch for usb masstorage hotadd
by Guido Günther
daniel
2008-10-21 13:09:23 +00:00
Jim Meyering
6e2c770581 ALL_LINGUAS: set unconditionally, using $srcdir/po
* configure.in: Remove hard-coded list altogether.
2008-10-21 07:47:29 +00:00
Jim Meyering
bb371128dc ALL_LINGUAS: remove "no", now that it's superseded by np.po
* configure.in: Remove "no" from hard-coded list.
2008-10-19 09:56:47 +00:00
Daniel Veillard
7b9344686a * src/qemu_driver.c: add scsi/virtio hotplug support for KVM
patch by Guido Günther
daniel
2008-10-17 12:36:39 +00:00
Jim Meyering
444efaa4a7 Makefile.maint (sync-vcs-ignore-files): avoid risk of abuse
* Makefile.maint (sync-vcs-ignore-files): Rewrite rule so that
it won't misbehave even with maliciously-named sub-directories.
2008-10-17 12:04:27 +00:00
Jim Meyering
83c2762b35 generate .gitignore files from .cvsignore ones
* Makefile.maint (sync-vcs-ignore-files): New target.
Prompted by a patch from James Morris.
http://thread.gmane.org/gmane.comp.emulators.libvirt/8619/focus=8773
Add all (now-generated) .gitignore files.
* .gitignore: New file.
* build-aux/.gitignore: New file.
* docs/.gitignore: New file.
* docs/devhelp/.gitignore: New file.
* docs/examples/.gitignore: New file.
* docs/examples/python/.gitignore: New file.
* gnulib/lib/.gitignore: New file.
* gnulib/lib/arpa/.gitignore: New file.
* gnulib/lib/netinet/.gitignore: New file.
* gnulib/lib/sys/.gitignore: New file.
* gnulib/tests/.gitignore: New file.
* include/.gitignore: New file.
* include/libvirt/.gitignore: New file.
* po/.gitignore: New file.
* proxy/.gitignore: New file.
* python/.gitignore: New file.
* python/tests/.gitignore: New file.
* qemud/.gitignore: New file.
* src/.gitignore: New file.
* tests/.gitignore: New file.
* tests/confdata/.gitignore: New file.
* tests/sexpr2xmldata/.gitignore: New file.
* tests/virshdata/.gitignore: New file.
* tests/xencapsdata/.gitignore: New file.
* tests/xmconfigdata/.gitignore: New file.
* tests/xml2sexprdata/.gitignore: New file.
2008-10-17 09:59:02 +00:00
Daniel Veillard
8348610c5e qemudDomainBlockStats use qemudDiskDeviceName
* src/qemu_driver.c: use qemudDiskDeviceName to determine the block
  device name in qemudDomainBlockStats(), patch by Guido Günther
daniel
2008-10-17 09:29:29 +00:00
Daniel Veillard
f009e2aae2 * src/qemu_driver.c: fix qemudDiskDeviceName to handle disk devices
too, patch by Guido Günther
daniel
2008-10-17 09:24:07 +00:00
Daniel Veillard
aadb84a547 * src/domain_conf.c: fix virDiskNameToBusDeviceIndex() to allow 0
patch by Guido Günther
Daniel
2008-10-17 09:18:21 +00:00
Jim Meyering
c16d74a12a build: when po-check fails, say why and suggest a fix
* Makefile.maint (po-check): Before, when this check failed, it just
spat out a diff mentioning two temporary files.  Now, it tells you
what's wrong and suggests a fix with a patch using the name of the
affected file (rather than temporary file names) in the diff output.
2008-10-16 17:18:48 +00:00
Chris Lalancette
eeff3cdcbc Add support for detecting the partition table type when scanning
iSCSI volumes.  This is implemented in the
virStorageBackendUpdateVolInfoFD function, so all future callers will
automatically benefit.  This is a somewhat large patch because the
conversion of the virStorageBackendPartTableTypeToString necessitated
a change to the formatToString and formatFromString function pointers,
which caused fallout in other places in the storage stuff.  The good
news is that most of these callers are now converted over to the
VIR_ENUM_IMPL, which means a lot of redundant code is now gone.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-10-16 15:06:03 +00:00
Chris Lalancette
164f786626 Compiling with -Werror showed a possible use before initialization
in src/qemu_driver.c.  Make sure to initialize the olddisk ptr to NULL.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-10-16 13:44:09 +00:00
Jim Meyering
e4e4a45927 build: exempt *.ico files from the trailing blank check
* .x-sc_trailing_blank: Add \.ico$ to the list.
2008-10-16 13:28:07 +00:00
Chris Lalancette
0fd0cb6037 "make syntax-check" was complaining that network_driver.c was missing from
POTFILES.in.  Add it there, and then fix up one warning about included
c-ctypes.h that wasn't being used.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-10-16 12:04:06 +00:00
Richard W.M. Jones
d0a8e88b95 * configure.in, src/Makefile.am, src/virsh_win_icon.rc:
Add a Windows icon resource.
2008-10-15 18:39:34 +00:00
Richard W.M. Jones
d510d4bf92 * src/libvirt.c: Register the remote driver even when we are
configured --without-libvirtd.  Also adds debugging of
        registration events.
2008-10-15 10:33:01 +00:00
Jim Meyering
fd52c6ff67 avoid many format string warnings
Building with --disable-nls exposed many new warnings like these:
virsh.c:4952: warning: format not a string literal and no format ...
util.c:163: warning: format not a string literal and no format arguments
All but one of the following changes add a "%s" argument before
the offending _(...) argument.

This was the only manual change:
* src/lxc_driver.c (lxcVersion): Use %s and strerror(errno)
rather than %m, to avoid a warning from gcc -Wformat-security.

Add "%s" before each warned about format-string-with-no-%-directive:
* src/domain_conf.c (virDomainHostdevSubsysUsbDefParseXML)
(virDomainDefParseString, virDomainDefParseFile):
* src/hash.c (virGetConnect, __virGetDomain, virReleaseDomain)
(__virGetNetwork, virReleaseNetwork, __virGetStoragePool)
(virReleaseStoragePool, __virGetStorageVol, virReleaseStorageVol):
* src/lxc_container.c (lxcContainerChild):
* src/lxc_driver.c (lxcDomainDefine, lxcDomainUndefine)
(lxcDomainGetInfo, lxcGetOSType, lxcDomainDumpXML)
(lxcSetupInterfaces, lxcDomainStart, lxcDomainCreateAndStart)
(lxcVersion, lxcGetSchedulerParameters):
* src/network_conf.c (virNetworkDefParseString)
(virNetworkDefParseFile):
* src/openvz_conf.c (openvzReadNetworkConf, openvzLoadDomains):
* src/openvz_driver.c (openvzDomainDefineCmd)
(openvzDomainGetInfo, openvzDomainDumpXML, openvzDomainShutdown)
(openvzDomainReboot, ADD_ARG_LIT, openvzDomainDefineXML)
(openvzDomainCreateXML, openvzDomainCreate, openvzDomainUndefine)
(openvzDomainSetAutostart, openvzDomainGetAutostart)
(openvzDomainSetVcpus):
* src/qemu_driver.c (qemudDomainBlockPeek, qemudDomainMemoryPeek):
* src/remote_internal.c (remoteDomainBlockPeek)
(remoteDomainMemoryPeek, remoteAuthPolkit):
* src/sexpr.c (sexpr_new, _string2sexpr):
* src/storage_backend_disk.c (virStorageBackendDiskMakeDataVol)
(virStorageBackendDiskCreateVol):
* src/storage_backend_fs.c
(virStorageBackendFileSystemNetFindPoolSources):
* src/storage_backend_logical.c (virStorageBackendLogicalFindLVs)
(virStorageBackendLogicalFindPoolSources):
* src/test.c (testOpenDefault, testOpenFromFile, testOpen)
(testGetDomainInfo, testDomainRestore)
(testNodeGetCellsFreeMemory):
* src/util.c (virExec):
* src/virsh.c (cmdAttachDevice, cmdDetachDevice)
(cmdAttachInterface, cmdDetachInterface, cmdAttachDisk)
(cmdDetachDisk, cmdEdit):
* src/xend_internal.c (do_connect, wr_sync, xend_op_ext)
(urlencode, xenDaemonDomainCreateXML)
(xenDaemonDomainLookupByName_ids, xenDaemonDomainLookupByID)
(xenDaemonParseSxprOS, xend_parse_sexp_desc_char)
(xenDaemonParseSxprChar, xenDaemonParseSxprDisks)
(xenDaemonParseSxpr, sexpr_to_xend_topology, sexpr_to_domain)
(xenDaemonDomainFetch, xenDaemonDomainGetAutostart)
(xenDaemonDomainSetAutostart, xenDaemonDomainMigratePerform)
(xenDaemonDomainDefineXML, xenDaemonGetSchedulerType)
(xenDaemonGetSchedulerParameters)
(xenDaemonSetSchedulerParameters, xenDaemonDomainBlockPeek)
(xenDaemonFormatSxprChr, virDomainXMLDevID):
* src/xm_internal.c (xenXMConfigCacheRefresh, xenXMDomainPinVcpu)
(xenXMDomainCreate, xenXMDomainDefineXML)
(xenXMDomainAttachDevice, xenXMDomainDetachDevice):
* src/xml.c (virXPathString, virXPathNumber, virXPathLong)
(virXPathULong, virXPathBoolean, virXPathNode, virXPathNodeSet):
* src/xs_internal.c (xenStoreOpen):
2008-10-13 16:46:28 +00:00
Richard W.M. Jones
72523d7bc2 Documentation for NIC model selection.
* docs/formatdomain.html.in, docs/formatdomain.html: Add the
	documentation for NIC model selection.
2008-10-13 15:25:38 +00:00
Richard W.M. Jones
c13f07fc88 Build failure fixed.
* src/domain_conf.c: Fix build failure of the Xen proxy.
2008-10-13 15:24:34 +00:00