]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
12 years agomaint: avoid regression on copyright listings
Eric Blake [Thu, 26 Jul 2012 22:58:02 +0000 (16:58 -0600)]
maint: avoid regression on copyright listings

Commit f9ce7dad6 tried to kill uses of a raw street address, but
missed a few instances.  Automate things so we don't introduce
new problems in the future.

* cfg.mk (sc_copyright_address): New rule.
(exclude_file_name_regexp--sc_copyright_address): Add exemption.
* bootstrap.conf: Adjust offenders.
* build-aux/augeas-gentest.pl: Likewise.
* examples/systemtap/events.stp: Likewise.
* examples/systemtap/qemu-monitor.stp: Likewise.
* examples/systemtap/rpc-monitor.stp: Likewise.
* src/dtrace2systemtap.pl: Likewise.
* src/esx/esx_vi_generator.py: Likewise.
* src/hyperv/hyperv_wmi_generator.py: Likewise.
* src/remote/qemu_protocol.x: Likewise.
* src/remote/remote_protocol.x: Likewise.
* src/rpc/gensystemtap.pl: Likewise.
* src/rpc/virnetprotocol.x: Likewise.
* tests/object-locking.ml: Likewise.
* tools/virt-xml-validate.in: Likewise.

12 years agomaint: Use consistent copyright.
Osier Yang [Fri, 27 Jul 2012 09:39:53 +0000 (17:39 +0800)]
maint: Use consistent copyright.

This is a follow up patch of commit f9ce7dad6, it modifies all
the files which declare the copyright like "See COPYING.LIB for
the License of this software" to use the detailed/consistent one.

And deserts the outdated comments like:

 * libvirt-qemu.h:
 * Summary: qemu specific interfaces
 * Description: Provides the interfaces of the libvirt library to handle
 *              qemu specific methods
 *
 * Copy:  Copyright (C) 2010, 2012 Red Hat, Inc.

Uses the more compact style like:

 * libvirt-qemu.h: Interfaces specific for QEMU/KVM driver
 *
 * Copyright (C) 2010, 2012 Red Hat, Inc.

12 years agoAdd a test case that checks there are no bogus entries in .syms
Daniel P. Berrange [Tue, 24 Jul 2012 13:37:48 +0000 (14:37 +0100)]
Add a test case that checks there are no bogus entries in .syms

During refactoring of code, it has proved common to forget to
remove old symbols from the .syms file. While the Win32 linker
will complain about this, the Linux ELF linker does not. The
new test case validates that every symbol listed in the .syms
file actually exists in the built ELF libraries.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoRemove accidentally commited virNetClientSetEOFNotify symbol
Daniel P. Berrange [Fri, 27 Jul 2012 09:53:50 +0000 (10:53 +0100)]
Remove accidentally commited virNetClientSetEOFNotify symbol

The virNetClientSetEOFNotify symbol was accidentally added to
the libvirt_private.syms file due to an out-of-order cherry-pick

12 years agoRemove two non-existant NWFilter driver symbols from .syms
Daniel P. Berrange [Tue, 24 Jul 2012 13:39:51 +0000 (14:39 +0100)]
Remove two non-existant NWFilter driver symbols from .syms

virNWFilterGetIpAddrForIfname and virNWFilterDelIpAddrForIfname
do not exist, so remove them from libvirt_nwfilter.syms

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agovirsh: Fix error resetting on fallback paths
Peter Krempa [Thu, 26 Jul 2012 09:24:30 +0000 (11:24 +0200)]
virsh: Fix error resetting on fallback paths

On some fallback paths in virsh, error reported by the previously failed
API is cleared by virResetLastError() that doesn't free error stored by
virsh. This patch changes this to clear it using vshResetLibvirtError().

12 years agovirsh: Refactor error clearing on graceful fallback paths
Peter Krempa [Wed, 25 Jul 2012 11:41:49 +0000 (13:41 +0200)]
virsh: Refactor error clearing on graceful fallback paths

Virsh uses an error handler to save errors from libvirt. On some code
paths it's needed to clear libvirt errors and continue on fallback code
paths without reporting failure.

This patch adds function vshResetLibvirtError() that clears error
returned by libvirt and updates all places where the old two-line method
was used.

12 years agomaint: don't permit format strings without %
Eric Blake [Mon, 23 Jul 2012 20:33:08 +0000 (14:33 -0600)]
maint: don't permit format strings without %

Any time we have a string with no % passed through gettext, a
translator can inject a % to cause a stack overread.  When there
is nothing to format, it's easier to ask for a string that cannot
be used as a formatter, by using a trivial "%s" format instead.

In the past, we have used --disable-nls to catch some of the
offenders, but that doesn't get run very often, and many more
uses have crept in.  Syntax check to the rescue!

The syntax check can catch uses such as
virReportError(code,
               _("split "
                 "string"));
by using a sed script to fold context lines into one pattern
space before checking for a string without %.

This patch is just mechanical insertion of %s; there are probably
several messages touched by this patch where we would be better
off giving the user more information than a fixed string.

* cfg.mk (sc_prohibit_diagnostic_without_format): New rule.
* src/datatypes.c (virUnrefConnect, virGetDomain)
(virUnrefDomain, virGetNetwork, virUnrefNetwork, virGetInterface)
(virUnrefInterface, virGetStoragePool, virUnrefStoragePool)
(virGetStorageVol, virUnrefStorageVol, virGetNodeDevice)
(virGetSecret, virUnrefSecret, virGetNWFilter, virUnrefNWFilter)
(virGetDomainSnapshot, virUnrefDomainSnapshot): Add %s wrapper.
* src/lxc/lxc_driver.c (lxcDomainSetBlkioParameters)
(lxcDomainGetBlkioParameters): Likewise.
* src/conf/domain_conf.c (virSecurityDeviceLabelDefParseXML)
(virDomainDiskDefParseXML, virDomainGraphicsDefParseXML):
Likewise.
* src/conf/network_conf.c (virNetworkDNSHostsDefParseXML)
(virNetworkDefParseXML): Likewise.
* src/conf/nwfilter_conf.c (virNWFilterIsValidChainName):
Likewise.
* src/conf/nwfilter_params.c (virNWFilterVarValueCreateSimple)
(virNWFilterVarAccessParse): Likewise.
* src/libvirt.c (virDomainSave, virDomainSaveFlags)
(virDomainRestore, virDomainRestoreFlags)
(virDomainSaveImageGetXMLDesc, virDomainSaveImageDefineXML)
(virDomainCoreDump, virDomainGetXMLDesc)
(virDomainMigrateVersion1, virDomainMigrateVersion2)
(virDomainMigrateVersion3, virDomainMigrate, virDomainMigrate2)
(virStreamSendAll, virStreamRecvAll)
(virDomainSnapshotGetXMLDesc): Likewise.
* src/nwfilter/nwfilter_dhcpsnoop.c (virNWFilterSnoopReqLeaseDel)
(virNWFilterDHCPSnoopReq): Likewise.
* src/openvz/openvz_driver.c (openvzUpdateDevice): Likewise.
* src/openvz/openvz_util.c (openvzKBPerPages): Likewise.
* src/qemu/qemu_cgroup.c (qemuSetupCgroup): Likewise.
* src/qemu/qemu_command.c (qemuBuildHubDevStr, qemuBuildChrChardevStr)
(qemuBuildCommandLine): Likewise.
* src/qemu/qemu_driver.c (qemuDomainGetPercpuStats): Likewise.
* src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise.
* src/rpc/virnetsaslcontext.c (virNetSASLSessionGetIdentity):
Likewise.
* src/rpc/virnetsocket.c (virNetSocketNewConnectUNIX)
(virNetSocketSendFD, virNetSocketRecvFD): Likewise.
* src/storage/storage_backend_disk.c
(virStorageBackendDiskBuildPool): Likewise.
* src/storage/storage_backend_fs.c
(virStorageBackendFileSystemProbe)
(virStorageBackendFileSystemBuild): Likewise.
* src/storage/storage_backend_rbd.c
(virStorageBackendRBDOpenRADOSConn): Likewise.
* src/storage/storage_driver.c (storageVolumeResize): Likewise.
* src/test/test_driver.c (testInterfaceChangeBegin)
(testInterfaceChangeCommit, testInterfaceChangeRollback):
Likewise.
* src/vbox/vbox_tmpl.c (vboxListAllDomains): Likewise.
* src/xenxs/xen_sxpr.c (xenFormatSxprDisk, xenFormatSxpr):
Likewise.
* src/xenxs/xen_xm.c (xenXMConfigGetUUID, xenFormatXMDisk)
(xenFormatXM): Likewise.

12 years agomaint: avoid empty regex in syntax checker
Eric Blake [Thu, 26 Jul 2012 14:29:15 +0000 (08:29 -0600)]
maint: avoid empty regex in syntax checker

We were defining 'func_or' as '|VIR_ERROR|...', which when put
inside 'func_re' resulted in a regex that matches everything in
isolation.  Thankfully, we always used func_re with a leading
anchor \<, and since the empty regex does not start a word, we
happened to get the result we wanted; but it's better to define
func_or without a leading space converted into a leading empty
alternation.

* cfg.mk (func_or): Strip leading space.

12 years agovirsh: check if specified debug level is in range
Ján Tomko [Thu, 26 Jul 2012 14:05:51 +0000 (16:05 +0200)]
virsh: check if specified debug level is in range

12 years agobuild: update to latest gnulib, for secure tarball
Eric Blake [Tue, 10 Jul 2012 15:37:07 +0000 (09:37 -0600)]
build: update to latest gnulib, for secure tarball

Pick up some build fixes in the latest gnulib.  In particular,
we want to ensure that official tarballs are secure, but don't
want to penalize people who don't run 'make dist', since fixed
automake still hasn't hit common platforms like Fedora 17.

* .gnulib: Update to latest, for Automake CVE-2012-3386 detection.
* bootstrap: Resync from gnulib.
* bootstrap.conf (gnulib_extra_files): Drop missing, since gnulib
has dropped it in favor of Automake's version.
* cfg.mk (local-checks-to-skip): Conditionally skip the security
check in cases where it doesn't matter.

12 years agovirsh: Check for existence of storage before undefining the domain
Peter Krempa [Fri, 22 Jun 2012 12:16:24 +0000 (14:16 +0200)]
virsh: Check for existence of storage before undefining the domain

When undefining a domain and removing associated storage using "virsh
undefine --storage" the domain was at first undefined and after that the
storage removal proces was started. If the user specified an invalid
disk to remove, the error could not be corrected.

This patch moves enumeration and filtering of volumes that should be
removed before the domain is undefined, but the removal process is still
kept after the domain has been undefined.

12 years agodoc: add more description on libvirtd option timeout
Guannan Ren [Wed, 25 Jul 2012 16:22:53 +0000 (00:22 +0800)]
doc: add more description on libvirtd option timeout

12 years agoutil: set minimum value of nodesuspend duration to 60 seconds
Guannan Ren [Wed, 25 Jul 2012 05:52:49 +0000 (13:52 +0800)]
util: set minimum value of nodesuspend duration to 60 seconds

Change the permissible minimum value of nodesuspend duration time
to 60 seconds. If option is less than the value, reports error.
Update virsh help and manpage the infomation.

12 years agovirsh: Move command group definition into its own file
Osier Yang [Mon, 23 Jul 2012 07:19:04 +0000 (15:19 +0800)]
virsh: Move command group definition into its own file

* virsh-domain-monitor.c: Add domMonitoringCmds
* virsh-domain.c: Add domManagementCmds
* virsh-host.c: Add hostAndHypervisorCmds
* virsh-interface.c: Add ifaceCmds
* virsh-network.c: Add networkCmds
* virsh-nodedev.c: Add nodedevCmds
* virsh-nwfilter.c: Add nwfilterCmds
* virsh-pool.c: Add storagePoolCmds
* virsh-secret.c: Add secretCmds
* virsh-snapshot.c: Add snapshotCmds
* virsh-volume.c: Add storageVolCmds
* virsh.c: Remove all the above *Cmds.

12 years agovirsh: Split cmds in node device group from virsh.c
Osier Yang [Mon, 23 Jul 2012 07:08:39 +0000 (15:08 +0800)]
virsh: Split cmds in node device group from virsh.c

Commands in node device group moved from virsh.c to virsh-nodedev.c,

* virsh.c: Remove commands in node device group.
* virsh-nodedev.c: New file, filled with commands in node device group
* po/POTFILES.in: Add virsh-nodedev.c
* cfg.mk: Skip to check config.h including for virsh-nodedev.c

12 years agovirsh: Split cmds in host group from virsh.c
Osier Yang [Mon, 23 Jul 2012 06:37:50 +0000 (14:37 +0800)]
virsh: Split cmds in host group from virsh.c

Commands in host group moved from virsh.c to virsh-host.c,

* virsh.c: Remove commands in host group.
* virsh-host.c: New file, filled with commands in host group
* po/POTFILES.in: Add virsh-host.c
* cfg.mk: Skip to check config.h including for virsh-host.c

12 years agovirsh: Split cmds to manage domain snapshot from virsh.c
Osier Yang [Mon, 23 Jul 2012 06:23:00 +0000 (14:23 +0800)]
virsh: Split cmds to manage domain snapshot from virsh.c

Commands to manage domain snapshot are moved from virsh.c to
virsh-snapshot.c.

* virsh.c: Remove domain snapshot commands.
* virsh-snapshot.c: New file, filled with domain snapshot commands.
* po/POTFILES.in: Add virsh-snapshot.c
* cfg.mk: Skip strcase and config.h including checking for
          virsh-snapshot.c

12 years agovirsh: Split cmds to manage secret from virsh.c
Osier Yang [Mon, 23 Jul 2012 06:18:51 +0000 (14:18 +0800)]
virsh: Split cmds to manage secret from virsh.c

Commands to manage secret are moved from virsh.c to virsh-secret.c,
with a few helpers for secret command use.

* virsh.c: Remove secret commands and a few helpers.
           (vshCommandOptSecret, and vshCommandOptSecretBy)
* virsh-secret.c: New file, filled with secret commands and its helpers.
* po/POTFILES.in: Add virsh-secret.c
* cfg.mk: Skip to check config.h including for virsh-secret.c

12 years agovirsh: Split cmds to manage network filter from virsh.c
Osier Yang [Mon, 23 Jul 2012 06:15:55 +0000 (14:15 +0800)]
virsh: Split cmds to manage network filter from virsh.c

Commands to manage network filter are moved from virsh.c to virsh-nwfilter.c,
with a few helpers for network filter command use.

* virsh.c: Remove network filter commands and a few helpers.
           (vshCommandOptNWFilter, and vshCommandOptNWFilterBy)
* virsh-nwfilter.c: New file, filled with network filter commands and its helpers.

* po/POTFILES.in: Add virsh-nwfilter.c

* cfg.mk: Skip to check config.h including for virsh-nwfilter.c

12 years agovirsh: Split cmds to manage host interface from virsh.c
Osier Yang [Tue, 24 Jul 2012 08:56:49 +0000 (16:56 +0800)]
virsh: Split cmds to manage host interface from virsh.c

Commands to manage host interface are moved from virsh.c to
virsh-interface.c, with a few helpers for interface command use.

* virsh.c: Remove interface commands and a few helpers.
           (vshCommandOptInterface, vshCommandOptInterfaceBy)
* virsh-interface.c: New file, filled with interface commands and
                     its helpers.
* cfg.mk: Skip to check config.h including for virsh-interface.c
* po/POTFILES.in: Add virsh-interface.c

12 years agovirsh: Split cmds to manage network from virsh.c
Osier Yang [Mon, 23 Jul 2012 06:02:14 +0000 (14:02 +0800)]
virsh: Split cmds to manage network from virsh.c

Commands to manage network are moved from virsh.c to virsh-network.c,
with a few helpers for network command use.

* virsh.c: Remove network commands and a few helpers.
* virsh-network.c: New file, filled with network commands and its
                   helpers.
* po/POTFILES.in: Add virsh-network.c
* cfg.mk: Skip to check config.h including for virsh-network.c

12 years agovirsh: Split cmds of storage pool group from virsh.c
Osier Yang [Tue, 24 Jul 2012 08:49:27 +0000 (16:49 +0800)]
virsh: Split cmds of storage pool group from virsh.c

This splits commands of storage pool group into virsh-pool.c,
The helpers not for common use are moved too. Standard copyright
is added for the new file.

* tools/virsh.c:
  Remove commands for storage storage pool and a few helpers.
  (vshCommandOptVol, vshCommandOptVolBy).

* tools/virsh-pool.c:
  New file, filled with commands of storage pool group and its
  helpers.

* po/POTFILES.in:
  Add virsh-pool.c

* cfg.mk:
  Skip to check config.h including for virsh-pool.c

12 years agovirsh: Split cmds of storage volume group from virsh.c
Osier Yang [Tue, 24 Jul 2012 08:44:49 +0000 (16:44 +0800)]
virsh: Split cmds of storage volume group from virsh.c

This splits commands of storage volume group into virsh-volume.c,
The helpers not for common use are moved too. Standard copyright
is added for the new file.

* tools/virsh.c:
  Remove commands for storage storage volume and a few helpers.
  (vshCommandOptVol, vshCommandOptVolBy).

* tools/virsh-volume.c:
  New file, filled with commands of storage volume group and its
  helpers.

* po/POTFILES.in:
  Add virsh-volume.c

* cfg.mk:
  Skip to check config.h including for virsh-volume.c

12 years agovirsh: Split cmds of domain group from virsh.c
Osier Yang [Wed, 25 Jul 2012 15:37:18 +0000 (23:37 +0800)]
virsh: Split cmds of domain group from virsh.c

This splits commands to manage domain into virsh-domain.c,The helpers
not for common use are moved into them too. Standard copyright is added
for the new file.

* tools/virsh.c:
  - Remove commands for domain group, and one helper
    (vshDomainVcpuStateToString)
  - vshStreamSink is moved before commands's definition for it's
    also used by commands not of domain group, such as volUpload.

* tools/virsh-domain.c:
  - New file, commands for domain group and the one helper are
    moved into it.

* po/POTFILES.in:
  - Add virsh-domain.c

* cfg.mk:
  - Skip to check config.h including for virsh-domain.c

12 years agovirsh: Split cmds for domain monitoring from virsh.c
Osier Yang [Tue, 24 Jul 2012 08:24:50 +0000 (16:24 +0800)]
virsh: Split cmds for domain monitoring from virsh.c

This splits commands commands to monitor domain status into
virsh-domain-monitor.c. The helpers not for common use are moved too.
Standard copyright is added.

* tools/virsh.c:
  - Remove commands for domain monitoring group and a few helpers (
    vshDomainIOErrorToString, vshGetDomainDescription,
    vshDomainControlStateToString, vshDomainStateToString) not for
    common use.
  - Remove (incldue "intprops.h").

* tools/virsh-domain-monitor.c:
  - New file, filled with commands of domain monitor group.
  - Add "intprops.h".

* cfg.mk:
  - Skip strcase checking for virsh-domain-monitor.c
  - Skip to check config.h including for virsh-domain-monitor.c

* po/POTFILES.in
  - Add virsh-domain-monitor.c

12 years agovirsh: Move definition of cmds and cmd groups right at the top of main
Osier Yang [Mon, 23 Jul 2012 03:57:53 +0000 (11:57 +0800)]
virsh: Move definition of cmds and cmd groups right at the top of main

This will avoid many conflicts if moving the codes for each command
group into separate files in later patches.

12 years agovirsh man page - domain-id consistency
Jan Tomko [Wed, 25 Jul 2012 11:17:03 +0000 (13:17 +0200)]
virsh man page - domain-id consistency

Using 'domain' to represent domain name, domain id or uuid all over
the man page, to be consistent with virsh help.

12 years agoFixup manpage names and copyright dates
Laine Stump [Tue, 24 Jul 2012 17:41:03 +0000 (13:41 -0400)]
Fixup manpage names and copyright dates

The copyright dates in the manpages haven't been updated in awhile.

Also, when pod2man converts a pod file into a manpage, it will only
remove the extension from the filename if it is ".pod". Some of the
libvirt pod files are named *.pod.in, and that filename is placed
unchanged into the manpage. This patch uses pod2man's --name option to
fix that.

Believe it or not, there's even a BZ for this:

  https://bugzilla.redhat.com/show_bug.cgi?id=819364

12 years agoconf: Fix typo in virDomainHostdevSubsys comment
Jiri Denemark [Wed, 25 Jul 2012 14:27:06 +0000 (16:27 +0200)]
conf: Fix typo in virDomainHostdevSubsys comment

12 years agomaint: spelling correction in AUTHORS
Eric Blake [Wed, 25 Jul 2012 14:01:24 +0000 (08:01 -0600)]
maint: spelling correction in AUTHORS

Ján Tomko has an accented name.

12 years agoutil: Fix typoes on return value and comments
Guannan Ren [Wed, 25 Jul 2012 09:43:18 +0000 (17:43 +0800)]
util: Fix typoes on return value and comments

virNetDevTapCreateInBridgePort: Fix return value to -1
virNetDevTapCreate: Fix comments

12 years agofixed SegFault in virauth
Martin Kletzander [Tue, 24 Jul 2012 14:08:46 +0000 (16:08 +0200)]
fixed SegFault in virauth

No check for conn->uri being NULL in virAuthGetConfigFilePath (valid
state) made the client segfault. This happens for example with these
settings:
 - no virtualbox driver installed (modifies conn->uri)
 - no default URI set (VIRSH_DEFAULT_CONNECT_URI="",
   LIBVIRT_DEFAULT_URI="", uri_default="")
 - auth_sock_rw="sasl"
 - virsh run as root

That are unfortunately the settings with fresh Fedora 17 installation
with VDSM.

The check ought to be enough as conn->uri being NULL is valid in later
code and is handled properly.

12 years agodaemon: Fix the wrong macro name
Osier Yang [Fri, 20 Jul 2012 14:25:17 +0000 (22:25 +0800)]
daemon: Fix the wrong macro name

WITH_INTERFACE is not defined, it should be WITH_NETCF there to load
the interface driver.

Eric posted patch weeks ago to resolve the problems in the whole
build system, but it's not finalised yet:

https://www.redhat.com/archives/libvir-list/2012-June/msg01299.html

I'm going to simply fix the wrong macro name here so that the
interface driver could loaded, and continue the work on the listing
API for interface driver.

12 years agovirsh: Clarify that memtune parameters may be rounded in the man page
Jan Tomko [Tue, 24 Jul 2012 08:50:29 +0000 (10:50 +0200)]
virsh: Clarify that memtune parameters may be rounded in the man page

12 years agoFix libnl CFLAGS/LIBS inclusion
Doug Goldstein [Sat, 21 Jul 2012 13:02:22 +0000 (08:02 -0500)]
Fix libnl CFLAGS/LIBS inclusion

When using libnl, use the variables pkg-config provides in case there are
additional libraries or CFLAGS required to build it. Specifically if
the libnl headers are not directly in /usr/include.

12 years agovirsh: fixed domdisplay command
Martin Kletzander [Tue, 24 Jul 2012 14:00:14 +0000 (16:00 +0200)]
virsh: fixed domdisplay command

The 'domdisplay' command didn't properly evaluate '--include-password'
option.

12 years agobuilding: fix deps error when some drivers are not built
Wen Congyang [Mon, 23 Jul 2012 09:58:28 +0000 (17:58 +0800)]
building: fix deps error when some drivers are not built

libvirt-daemon-driver-XXX should be a dependency only when with_driver_modules
is 1.
libvirt-daemon-driver-libxl should be a dependency only when with_libxl is 1.
libvirt-daemon-driver-lxc should be a dependency only when with_lxc is 1.
libvirt-daemon-driver-qemu should be a dependency only when with_qemu is 1.
libvirt-daemon-driver-uml should be a dependency only when with_uml is 1.
libvirt-daemon-driver-xen should be a dependency only when with_xen is 1.

12 years agoMore advanced auto-detection of driver module directory
Daniel P. Berrange [Mon, 23 Jul 2012 15:21:13 +0000 (16:21 +0100)]
More advanced auto-detection of driver module directory

When running directly from GIT, libvirtd attempts to locate
the directory containing loadable modules. This currently
only works if executing libvirtd with a CWD inside the libvirt
source tree. Switch to locate based on the path to the current
binary instead

12 years agoadding handling EINTR to poll to make it more robust
Royce Lv [Thu, 19 Jul 2012 01:49:41 +0000 (09:49 +0800)]
adding handling EINTR to poll to make it more robust

some system call and signal will interrupt poll,
making event loop stops and fails to react events and keepalive message
from libvirt.
adding handling EINTR to poll to make it more robust

Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
12 years agobuild: regenerate .png files
Eric Blake [Sat, 21 Jul 2012 03:34:39 +0000 (21:34 -0600)]
build: regenerate .png files

We don't expect people to have tools installed to regenerate .png
from .fig by default.  However, since commit 5eb3df8, several
.fig files were updated without regenerating the .png file, and
as a result, 'make dist' ends up regenerating those five files,
or worse, failing because of missing tools (convert from
ImageMagick).

Additionally, even if the tools are present, the generation of
.png files is nondeterministic (the resulting files contain a
timestamp), which means prior to this patch, running 'make dist'
from two checkouts will end up producing different tarball
contents (two 'make dist' runs will always produce different tar
files, since tarballs also contain timestamps; but unpacking the
tarballs and doing a recursive diff will show if the contents
are unchanged).

After this patch, the timestamps are now up-to-date, and 'make
dist' no longer has anything to do for the .png files.  This gets
us closer to the goal of two checkouts being able to produce the
same tarball.

* docs/libvirt-*.png: Regenerate.

12 years agoMake ESX & Hyper-V code generator safe with parallel builds
Daniel P. Berrange [Mon, 23 Jul 2012 14:45:20 +0000 (15:45 +0100)]
Make ESX & Hyper-V code generator safe with parallel builds

If from a clean GIT checkout 'make -j 8' is run, the ESX
and Hyper-V code will be generated multiple times over.
This is because there are multiple files being generated
from one invocation of the generator script. make does not
realize this and so invokes the generator once per file.
This doesn't matter with serialized builds, but with
parallel builds multiple instances of the generator get
run at once.

make[2]: Entering directory `/home/berrange/src/virt/libvirt/src'
  GEN    util/virkeymaps.h
  GEN    remote/remote_protocol.h
  GEN    remote/remote_client_bodies.h
  GEN    remote/qemu_protocol.h
  GEN    remote/qemu_client_bodies.h
  GEN    esx/esx_vi_methods.generated.c
  GEN    esx/esx_vi_methods.generated.h
  GEN    esx/esx_vi_methods.generated.macro
  GEN    esx/esx_vi_types.generated.c
  GEN    esx/esx_vi_types.generated.h
  GEN    esx/esx_vi_types.generated.typedef
  GEN    esx/esx_vi_types.generated.typedef
  GEN    esx/esx_vi_types.generated.typeenum
  GEN    esx/esx_vi_types.generated.typetostring
  GEN    esx/esx_vi_types.generated.typefromstring
  GEN    esx/esx_vi_types.generated.h
  GEN    esx/esx_vi_types.generated.c
  GEN    esx/esx_vi_methods.generated.h
  GEN    esx/esx_vi_methods.generated.c
  GEN    esx/esx_vi_methods.generated.macro
  GEN    esx/esx_vi.generated.h
  GEN    esx/esx_vi.generated.c
  GEN    esx/esx_vi_types.generated.typeenum
  GEN    esx/esx_vi_types.generated.typedef
  GEN    esx/esx_vi_types.generated.typeenum
  GEN    esx/esx_vi_types.generated.typetostring
  GEN    esx/esx_vi_types.generated.typefromstring
  GEN    esx/esx_vi_types.generated.h
  GEN    esx/esx_vi_types.generated.c
  GEN    esx/esx_vi_methods.generated.h
  ...snip...
  GEN    hyperv/hyperv_wmi.generated.h
  GEN    libvirt_qemu_probes.h
  GEN    locking/qemu-sanlock.conf
  GEN    hyperv/hyperv_wmi.generated.c
  GEN    rpc/virnetprotocol.h
  GEN    hyperv/hyperv_wmi_classes.generated.typedef
  GEN    hyperv/hyperv_wmi_classes.generated.h
  GEN    hyperv/hyperv_wmi_classes.generated.c
  GEN    rpc/virkeepaliveprotocol.h
  GEN    remote/remote_protocol.c
  GEN    remote/qemu_protocol.c
  GEN    rpc/virkeepaliveprotocol.c
  GEN    rpc/virnetprotocol.c
  GEN    libvirt.def

Prevent this using a timestamp file to control generation,
as was previously done for the python bindings in commit
a7868e0131516ef2dece82586edd52dc87fe336c

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agotests: Add support for catching domain XML parsing errors
Peter Krempa [Mon, 9 Jul 2012 16:29:55 +0000 (18:29 +0200)]
tests: Add support for catching domain XML parsing errors

This patch enhances qemuxml2argvtest to deal with semantically incorrect
domain XMLs, that generate errors while parsing.

This patch cleans up macros that invoke the tests and changes boolean
flags to a bit array flag variable.

12 years agomaint: Clean up coding style and fix error message spelling
Peter Krempa [Mon, 2 Jul 2012 15:24:09 +0000 (17:24 +0200)]
maint: Clean up coding style and fix error message spelling

This patch cleans up coding style breaks some long lines and fixes error
message spelling on various places in domain_conf.c and in the qemu
driver.

12 years agodoc: Fix time keeping example for the guest clock
Doug Goldstein [Sat, 21 Jul 2012 13:14:44 +0000 (08:14 -0500)]
doc: Fix time keeping example for the guest clock

The time keeping example was missing quotes which resulted in an error
if you copied and pasted the example into a domain's XML. Additionally
the rest of the examples use single quotes (') instead of double quotes
(") so standardized that.

12 years agoFix test failure when no IPv6 is avail
Doug Goldstein [Sun, 22 Jul 2012 17:04:16 +0000 (12:04 -0500)]
Fix test failure when no IPv6 is avail

When the system doesn't have IPv6 available (e.g. not built into the
kernel or the module isn't loaded), you can not create an IPv6 socket.
The test determines earlier on that IPv6 isn't available then goes and
creates a socket. This makes socket creation conditional on IPv6
availability.

12 years agoDesert the FSF address in copyright
Osier Yang [Sat, 21 Jul 2012 10:06:23 +0000 (18:06 +0800)]
Desert the FSF address in copyright

Per the FSF address could be changed from time to time, and GNU
recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)

  You should have received a copy of the GNU General Public License
  along with Foobar.  If not, see <http://www.gnu.org/licenses/>.

This patch removes the explicit FSF address, and uses above instead
(of course, with inserting 'Lesser' before 'General').

Except a bunch of files for security driver, all others are changed
automatically, the copyright for securify files are not complete,
that's why to do it manually:

  src/security/security_selinux.h
  src/security/security_driver.h
  src/security/security_selinux.c
  src/security/security_apparmor.h
  src/security/security_apparmor.c
  src/security/security_driver.c

12 years agoESX: Fix ESX_VI__TEMPLATE__DYNAMIC_DEEP_COPY
Ata E Husain Bohra [Thu, 19 Jul 2012 06:14:18 +0000 (23:14 -0700)]
ESX: Fix ESX_VI__TEMPLATE__DYNAMIC_DEEP_COPY

Fix addresses two issues:
1. Fix generator code to allow deep copy operation for objects with
   Dynamic_Cast capabilities.
2. Add missing deep copy routine to Long datatype.

Signed-off-by: Ata E Husain Bohra <ata.husain@hotmail.com>
12 years agovmx: handle shared folders parsing
Jean-Baptiste Rouault [Wed, 11 Jul 2012 10:16:35 +0000 (12:16 +0200)]
vmx: handle shared folders parsing

This patch adds support for parsing vmx files with
shared folders enabled.

Update test suite accordingly.

12 years agovmx: handle shared folders formatting
Jean-Baptiste Rouault [Wed, 11 Jul 2012 10:16:34 +0000 (12:16 +0200)]
vmx: handle shared folders formatting

This patch adds support for generating vmx files with
shared folders enabled.

Update test suite accordingly.

12 years agotests: reduce length of nodeinfodata test names
Eric Blake [Fri, 20 Jul 2012 19:12:44 +0000 (13:12 -0600)]
tests: reduce length of nodeinfodata test names

Commit ddd6bef4 switched to the ustar format to fix an issue where
'make dist' fails to create a tarball because we have files with
relative names longer than 100 bytes by the time you include a
'libvirt-0.9.13' prefix.  Unfortunately, even with ustar format,
the use of 'tar -ch' tries to convert symlinks to hard links,
also with a name too long (omitting the -h works, but automake
automatically passes -h); such symlinks were added in commit
6dcf98c, which resulted in 'make dist' breaking again.  The
solution is to rename the offending symlinks to something shorter,
by shortening the entire nodeinfodata naming scheme.

* tests/nodeinfotest.c (mymain): Shorten test names.
(linuxTestNodeInfo): Accommodate new names.
* tests/nodeinfodata/*: Rename files accordingly.

12 years agotests: avoid seclabeltest crash
Eric Blake [Fri, 20 Jul 2012 20:44:54 +0000 (14:44 -0600)]
tests: avoid seclabeltest crash

Commit a56c347 introduced a use of random numbers into seclabel
handling, but failed to initialize the random number generator
in the testsuite.  Also, fail with usual status, not 255.

* tests/seclabeltest.c (main): Initialize randomness.

12 years agoopenvz: Implement domainGetHostname
Guido Günther [Tue, 10 Jul 2012 11:58:44 +0000 (13:58 +0200)]
openvz: Implement domainGetHostname

12 years agoopenvz: Add openvzVEGetStringParam
Guido Günther [Tue, 10 Jul 2012 11:57:38 +0000 (13:57 +0200)]
openvz: Add openvzVEGetStringParam

to retrieve a VEs config parameters as a single string. This will be
used by the upcoming domainGetHostname implementation.

12 years agoremote: Provide RPC call for domainGetHostname
Guido Günther [Fri, 13 Jul 2012 07:12:07 +0000 (09:12 +0200)]
remote: Provide RPC call for domainGetHostname

12 years agovirsh: Add domhostname
Guido Günther [Tue, 10 Jul 2012 10:45:30 +0000 (12:45 +0200)]
virsh: Add domhostname

to query the guest's hostname.

12 years agoAdd virDomainGetHostname
Guido Günther [Tue, 10 Jul 2012 07:34:23 +0000 (09:34 +0200)]
Add virDomainGetHostname

to query a guests's hostname. Containers like LXC and OpenVZ allow to
set a hostname different from the hosts name and QEMU's guest agent
could provide similar functionality.

12 years agoReport 'errno' in int1 field of virErrorPtr
Daniel P. Berrange [Mon, 24 Oct 2011 16:34:18 +0000 (17:34 +0100)]
Report 'errno' in int1 field of virErrorPtr

When reporting a system error (VIR_ERR_SYSTEM_ERROR) via
virReportSystemError, we should copy the errno value into
the 'int1' field of the virErrorPtr struct. This allows
callers to detect certain errno conditions & discard the
error

* src/util/virterror.c: Place errno value in int1 field

12 years agoOnly enforce check for YAJL when starting a VM
Daniel P. Berrange [Wed, 4 Jul 2012 09:44:58 +0000 (10:44 +0100)]
Only enforce check for YAJL when starting a VM

The previous check for YAJL would have many undesirable
consequences, the most important being that it caused the
capabilities XML to lose all <guest> elements. There is
no user visible feedback as to what is wrong in this respect,
merely a syslog message. The empty capabilities causes
libvirtd to then throw away all guest XML configs that are
stored.

This changes the code so that the check for YAJL is only
performed at the time we attempt to spawn a QEMU process

error: Failed to start domain vm-vnc
error: unsupported configuration: this qemu binary requires libvirt to be compiled with yajl

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoUse a hash table for storing MCS labels
Daniel P. Berrange [Thu, 24 May 2012 16:22:29 +0000 (17:22 +0100)]
Use a hash table for storing MCS labels

Instead of using an O(n) efficiency linked list for storing
MCS labels, use a hash table. Instead of having the list
be global, put it in the SELinux driver private data struct
to ensure uniqueness across different instances of the driver.
This also ensures thread safety when multiple hypervisor
drivers are used in the same libvirtd process

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoFix error handling when adding MCS labels
Daniel P. Berrange [Thu, 24 May 2012 15:52:18 +0000 (16:52 +0100)]
Fix error handling when adding MCS labels

When adding MCS labels, OOM was not being handled correctly.
In addition when reserving an existing label, no check was
made to see if it was already reserved

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoUse standard naming prefix for SELinux driver function names
Daniel P. Berrange [Thu, 24 May 2012 15:42:51 +0000 (16:42 +0100)]
Use standard naming prefix for SELinux driver function names

The function names in the SELinux driver all start with
SELinux or 'mcs' as a prefix. Sanitize this so that they
all use 'virSecuritySELinux' as the prefix

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoDisable NWFilter driver completely when unprivileged
Daniel P. Berrange [Thu, 19 Jul 2012 14:58:45 +0000 (15:58 +0100)]
Disable NWFilter driver completely when unprivileged

Running libvirtd unprivileged results in a warning message from
the NWFilter driver

  virNWFilterSnoopLeaseFileRefresh:1882 : open("/var/run/libvirt/network/nwfilter.ltmp"): No such file or directory

Since it requires privileged network access, this driver should
not even run when unprivileged.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of custom macros with virReportError in the Xen drivers
Daniel P. Berrange [Wed, 18 Jul 2012 13:48:05 +0000 (14:48 +0100)]
Replace use of custom macros with virReportError in the Xen drivers

Update the legacy Xen drivers to use virReportError instead of
the statsError, virXenInotifyError, virXenStoreError,
virXendError, xenUnifiedError, xenXMError custom macros

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoMake sure xenHypervisorInit correctly reports errors
Daniel P. Berrange [Fri, 20 Jul 2012 13:57:39 +0000 (14:57 +0100)]
Make sure xenHypervisorInit correctly reports errors

The xenHypervisorInit method was called from two different
locations, during initial driver registration and also while
opening a Xen connection. The former can't report any useful
errors to the end user/app, so remove it. To ensure thread
safety use a VIR_ONCE_GLOBAL_INIT call to invoke
xenHypervisorInit from the xenHypervisorOpen method.

12 years agoEnsure failure to talk to Xen hypervisor is fatal when privileged
Daniel P. Berrange [Fri, 20 Jul 2012 13:52:44 +0000 (14:52 +0100)]
Ensure failure to talk to Xen hypervisor is fatal when privileged

As per the comment, the Xen hypervisor driver is considered to
be mandatory when running privileged. When it fails to open,
we should thus return an error, not ignore it.

12 years agoUsing virOnce for global initialization is desirable since it
Daniel P. Berrange [Fri, 20 Jul 2012 14:03:39 +0000 (15:03 +0100)]
Using virOnce for global initialization is desirable since it
ensures that initialization will always take place when it is
needed, and guarantees it only occurs once. The problem is that
the code to setup a global initializer with proper error
propagation is tedious. This introduces VIR_ONCE_GLOBAL_INIT
macro to simplify this.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of VMX_ERROR with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 14:47:21 +0000 (15:47 +0100)]
Replace use of VMX_ERROR with virReportError

Update the VMX shared code to use virReportError instead of
the VMX_ERROR custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of virNetError with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 18:30:53 +0000 (19:30 +0100)]
Replace use of virNetError with virReportError

Update the libvirtd dispatch code to use virReportError
instead of the virNetError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of virConfError with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 18:26:35 +0000 (19:26 +0100)]
Replace use of virConfError with virReportError

Update the libvirtd config handling code to use virReportError
instead of the virConfError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of nodeReportError with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 18:19:23 +0000 (19:19 +0100)]
Replace use of nodeReportError with virReportError

Update the nodeinfo helper code to use virReportError instead
of the nodeReportError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of virSecurityReportError with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 14:39:18 +0000 (15:39 +0100)]
Replace use of virSecurityReportError with virReportError

Update the security drivers to use virReportError instead of
the virSecurityReportError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of PHYP_ERROR with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 14:40:46 +0000 (15:40 +0100)]
Replace use of PHYP_ERROR with virReportError

Update the Power-Hypervisor driver to use virReportError
instead of the PHYP_ERROR custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of HYPERV_ERROR with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 14:29:12 +0000 (15:29 +0100)]
Replace use of HYPERV_ERROR with virReportError

Update the Hyper-V driver to use virReportError instead
of the HYPERV_ERROR custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of ESX_ERROR & ESX_VI_ERROR with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 14:25:50 +0000 (15:25 +0100)]
Replace use of ESX_ERROR & ESX_VI_ERROR with virReportError

Update the ESX driver to use virReportError instead of
the ESX_ERROR & ESX_VI_ERROR custom macros

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of virLockError with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 13:37:08 +0000 (14:37 +0100)]
Replace use of virLockError with virReportError

Update the lock manager drivers to use virReportError instead
of the virLockError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of libxlError with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 13:32:10 +0000 (14:32 +0100)]
Replace use of libxlError with virReportError

Update the libxl driver to use virReportError instead of
the libxlError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoAdd missing "%s" format string to constant error messages in lock manager
Jiri Denemark [Fri, 20 Jul 2012 12:10:50 +0000 (13:10 +0100)]
Add missing "%s" format string to constant error messages in lock manager

Updates the lock manager code so that it passes "%s" as the format
string whenever raising an error message with a const string.

12 years agoAdd missing "%s" format string to constant error messages in libxl driver
Jiri Denemark [Fri, 20 Jul 2012 12:09:07 +0000 (13:09 +0100)]
Add missing "%s" format string to constant error messages in libxl driver

Updates the libxl driver code so that it passes "%s" as the format
string whenever raising an error message with a const string.

12 years agoMake the 'lxc_driver' global variable non-static
Gao feng [Fri, 20 Jul 2012 11:47:20 +0000 (12:47 +0100)]
Make the 'lxc_driver' global variable non-static

The 'lxc_driver' global variable is now used from several of
the LXC sources files. Thus it needs to be non-static to
avoid runtime linkage errors

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
12 years agoReplace use of streamsReportError with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 14:49:46 +0000 (15:49 +0100)]
Replace use of streamsReportError with virReportError

Update the streams code to use virReportError instead of
the streamsReportError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of remoteError with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 13:35:21 +0000 (14:35 +0100)]
Replace use of remoteError with virReportError

Update the remote driver to use virReportError instead of
the remoteError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of XENXS_ERROR with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 13:17:20 +0000 (14:17 +0100)]
Replace use of XENXS_ERROR with virReportError

Update the XenXS shared code to use virReportError instead
of the XENXS_ERROR custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of openvzError with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 13:13:44 +0000 (14:13 +0100)]
Replace use of openvzError with virReportError

Update the OpenVZ driver to use virReportError instead of
the openvzError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoFix Xen driver to have sensible error messages
Daniel P. Berrange [Thu, 19 Jul 2012 15:35:11 +0000 (16:35 +0100)]
Fix Xen driver to have sensible error messages

The Xen driver had a number of error reports which passed a
constant string without format specifiers and was missing
"%s". Furthermore the errors were related to failing system
calls, but virReportSystemError was not used. So the only
useful piece of info (the errno) was being discarded

12 years agoMove LXC process management code into separate file
Daniel P. Berrange [Fri, 13 Jul 2012 11:39:29 +0000 (12:39 +0100)]
Move LXC process management code into separate file

Move all the code that manages stop/start of LXC processes
into separate lxc_process.{c,h} file to make the lxc_driver.c
file smaller

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoMove cgroup setup code out of lxc_controller.c
Daniel P. Berrange [Fri, 13 Jul 2012 11:21:27 +0000 (12:21 +0100)]
Move cgroup setup code out of lxc_controller.c

Move the cgroup setup code out of the lxc_controller.c file
and into lxc_cgroup.{c,h}. This reduces the size of the
lxc_controller.c file and paves the way to invoke cgroup
setup from lxc_driver.c instead of lxc_controller.c in the
future

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoMove LXC domain private data into separate file
Daniel P. Berrange [Fri, 13 Jul 2012 10:16:23 +0000 (11:16 +0100)]
Move LXC domain private data into separate file

Move the LXC driver code related to the virDomainObjPtr
private data into separate lxc_domain.{c,h} files
to reduce the size of lxc_driver.c

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of vmwareError with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 13:22:54 +0000 (14:22 +0100)]
Replace use of vmwareError with virReportError

Update the VMWare driver to use virReportError instead of
the vmwareError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of virCPUReportError with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 12:16:38 +0000 (13:16 +0100)]
Replace use of virCPUReportError with virReportError

Update the CPU helper APIs to use virReportError instead
of the virCPUReportError custom macor

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of testError with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 12:12:06 +0000 (13:12 +0100)]
Replace use of testError with virReportError

Update the test driver to use virReportError instead of the
testError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of vboxError with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 12:06:29 +0000 (13:06 +0100)]
Replace use of vboxError with virReportError

Update the VirtualBox driver to use virReportError instead of
the vboxError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of xenapiError with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 18:25:00 +0000 (19:25 +0100)]
Replace use of xenapiError with virReportError

Update the XenAPI driver to use virReportError instead of
the xenapiError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReplace use of qemuReportError with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 15:22:03 +0000 (16:22 +0100)]
Replace use of qemuReportError with virReportError

Update the QEMU driver to use virReportError instead of
the qemuReportError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoqemu: Add missing "%s" before translation macros
Peter Krempa [Thu, 19 Jul 2012 13:32:27 +0000 (14:32 +0100)]
qemu: Add missing "%s" before translation macros

This patch cleans up some missing "%s" before translation macros,
for strings which are const without format specifiers

12 years agoReplace use of umlReportError with virReportError
Daniel P. Berrange [Wed, 18 Jul 2012 12:01:08 +0000 (13:01 +0100)]
Replace use of umlReportError with virReportError

Update the UML driver to use virReportError instead of the
umlReportError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoAdd lots of internal symbols to libvirt_private.syms
Daniel P. Berrange [Wed, 18 Jul 2012 16:03:17 +0000 (17:03 +0100)]
Add lots of internal symbols to libvirt_private.syms

Make sure that libvirt_private.syms has all the internal symbols
from APIs in src/rpc/*.h and src/util/cgroup.h, since the LXC
controller/driver will shortly need them

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoReset the 'quit' flag in virNetServerRun
Daniel P. Berrange [Wed, 18 Jul 2012 15:49:15 +0000 (16:49 +0100)]
Reset the 'quit' flag in virNetServerRun

To allow virNetServerRun/virNetServerQuit to be invoked multiple
times, we must reset the 'quit' flag in virNetServerRun

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoIf in delay close mode for an RPC client, don't read further data
Daniel P. Berrange [Wed, 18 Jul 2012 15:48:24 +0000 (16:48 +0100)]
If in delay close mode for an RPC client, don't read further data

In the delayed close mode, we're just waiting for final data to
be written back to the client. While waiting, we should not
bother to read more data from the client.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoDon't autostart domains when reloading config
Daniel P. Berrange [Fri, 13 Jul 2012 11:49:55 +0000 (12:49 +0100)]
Don't autostart domains when reloading config

When sending SIGHUP to libvirtd, it will trigger the virStateDriver
reload operation. This is intended to reload the configuration files
for guests. For unknown historical reasons this is also triggering
autostart of all guests. Autostart is generally expected to be
something that happens on OS startup. Starting VMs on SIGHUP will
violate that expectation and potentially cause dangerous scenarios
if the admin has explicitly shutdown a misbehaving VM that has
been marked as autostart

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>