]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/log
people/liuw/libxenctrl-split/libvirt.git
12 years agoqemu: Fix reboot with guest agent
Jiri Denemark [Tue, 4 Sep 2012 10:01:43 +0000 (12:01 +0200)]
qemu: Fix reboot with guest agent

When reboot using qemu guest agent was requested, qemu driver kept
waiting for SHUTDOWN event from qemu. However, such event is never
emitted during guest reboot and qemu driver would keep waiting forever.

12 years agoFix mingw64 build by using intptr_t for int->void* casts
Daniel P. Berrange [Tue, 4 Sep 2012 10:16:55 +0000 (11:16 +0100)]
Fix mingw64 build by using intptr_t for int->void* casts

The viratomictest.c was casting from an int to a void* via a
long. This works on Linux or Mingw32, but fails on Mingw64
due to a pointer/integer size mis-match. Replacing 'long'
with 'intptr_t' ensures matching type sizes

12 years agoqemu: Don't update graphic definitions on password change failure
Peter Krempa [Mon, 3 Sep 2012 14:52:27 +0000 (16:52 +0200)]
qemu: Don't update graphic definitions on password change failure

When the password change failed we updated the graphic definition
anyways, which is not desired.

12 years agotests: Add tests for qemu S3/S4 state configuration
Martin Kletzander [Thu, 2 Aug 2012 10:18:16 +0000 (12:18 +0200)]
tests: Add tests for qemu S3/S4 state configuration

Few tests were added which are checking whether the parsing of the xml
and command-line arguments is working and compatible with each other.

12 years agoqemu: Add support for S3/S4 state configuration
Martin Kletzander [Thu, 2 Aug 2012 10:14:39 +0000 (12:14 +0200)]
qemu: Add support for S3/S4 state configuration

This patch adds support for running qemu guests with the required
parameters to forcefully enable or disable BIOS advertising of S3 and
S4 states.  The support for this is added to capabilities and there is
also a qemu command parameter parsing implemented.

12 years agoAdd per-guest S3/S4 state configuration
Martin Kletzander [Thu, 2 Aug 2012 10:12:50 +0000 (12:12 +0200)]
Add per-guest S3/S4 state configuration

There is a new <pm/> element implemented that can control what ACPI
sleeping states will be advertised by BIOS and allowed to be switched
to by libvirt. The default keeps defaults on hypervisor, otherwise
forces chosen setting.
The documentation of the pm element is added as well.

12 years agopython: don't mask libvirt errors
Eric Blake [Fri, 31 Aug 2012 17:07:19 +0000 (10:07 -0700)]
python: don't mask libvirt errors

A user reported this crash when using python bindings:

  File "/home/nox/workspace/NOX/src/NOX/hooks.py", line 134, in trigger
    hook.trigger(event)
  File "/home/nox/workspace/NOX/src/NOX/hooks.py", line 33, in trigger
    self.handlers[event]()
  File "/home/nox/workspace/NOX/hooks/volatility.py", line 81, in memory_dump
    for block in Memory(self.ctx):
  File "/home/see/workspace/NOX/src/NOX/lib/libtools.py", line 179, in next
    libvirt.VIR_MEMORY_PHYSICAL)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 1759, in memoryPeek
    ret = libvirtmod.virDomainMemoryPeek(self._o, start, size, flags)
SystemError: error return without exception set

In the python bindings, returning NULL makes python think an
exception was thrown, while returning the None object lets the
wrappers know that a libvirt error exists.

Reported by Nox DaFox, fix suggested by Dan Berrange.

* python/libvirt-override.c (libvirt_virDomainBlockPeek)
(libvirt_virDomainMemoryPeek): Return python's None object, so
wrapper knows to check libvirt error.

12 years agoqemu: Support for Block Device IO Limits.
Viktor Mihajlovski [Wed, 29 Aug 2012 15:48:31 +0000 (17:48 +0200)]
qemu: Support for Block Device IO Limits.

Implementation of iolimits for the qemu driver with
capability probing for block size attribute and
command line generation for block sizes.
Including testcase for qemuxml2argvtest.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
12 years agoconf: Support for Block Device IO Limits
Viktor Mihajlovski [Wed, 29 Aug 2012 15:48:30 +0000 (17:48 +0200)]
conf: Support for Block Device IO Limits

Introducing a new iolimits element allowing to override certain
properties of a guest block device like the physical and logical
block size.
This can be useful for platforms with 'non-standard' disk formats
like S390 DASD with its 4K block size.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
12 years agocommand: shell-quote when logging commands
Eric Blake [Tue, 28 Aug 2012 18:11:45 +0000 (11:11 -0700)]
command: shell-quote when logging commands

Without this patch, logged command executions can be ambiguous if
the command contained any shell metacharacters.  This has caused
more than one person to attempt to patch clients to add unnecessary
quoting, without realizing that the command itself was run with
correct args, and only the logged output was ambiguous.

* src/util/command.c (virCommandToString): Add shell escapes.
* tests/commandtest.c (test16): Test new behavior.
* tests/commanddata/test16.log: Update expected output.
* tests/qemuxml2argvdata/qemuxml2argv-*.args: Likewise.
* tests/networkxml2argvdata/*.argv: Likewise.

12 years agovirsh: remove unneeded usage of vshConnectionUsability()
Peter Krempa [Fri, 24 Aug 2012 11:57:01 +0000 (13:57 +0200)]
virsh: remove unneeded usage of vshConnectionUsability()

Now that vshCommandRun() checks for the connection automaticaly, remove
all of the redundant checks in the code.

vshConnectionUsability() no longer needs to be exported and this patch
marks it static.

12 years agovirsh: Improve checking for connection when running commands
Peter Krempa [Fri, 24 Aug 2012 10:39:53 +0000 (12:39 +0200)]
virsh: Improve checking for connection when running commands

Almost each virsh command uses the function vshConnectionUsability
before doing anything, to check if the connection is "alive".  Commands
that don't need an conection are already conveniently marked with
VSH_CMD_FLAG_NOCONNECT. We can automaticaly check for the connection
before calling any remote command so we don't forget to do so.

This patch also upgrades the connection check to use virConnectIsAlive
along with the current approach.

12 years agoqemu: fix remote port searching
Martin Kletzander [Fri, 31 Aug 2012 13:33:26 +0000 (15:33 +0200)]
qemu: fix remote port searching

After fixing the last review comments on remote port searching (commit
a14b4aea512d6c3a42af56207a65ef10ac4a12a1), the commit right after that
wasn't modified accordingly, therefore two values weren't changed as
they should and the configurable ports don't work as expected.

This simple commit changes last two values missed and fixes the issue.

12 years agoschemas: Fix wwn pattern
Osier Yang [Wed, 29 Aug 2012 16:28:40 +0000 (00:28 +0800)]
schemas: Fix wwn pattern

It should be [] instead of ().

12 years agoutil: Update the inconsistent and outdated comments
Osier Yang [Fri, 31 Aug 2012 13:44:21 +0000 (21:44 +0800)]
util: Update the inconsistent and outdated comments

The codes were updated to allow to reset the device as long as
there is no devices/functions behind the same bus. However, the
comments were kept without touched.

12 years agoRelease of libvirt-0.10.1
Daniel Veillard [Fri, 31 Aug 2012 12:39:36 +0000 (20:39 +0800)]
Release of libvirt-0.10.1

* configure.ac docs/news.html.in libvirt.spec.in: update for release
* po/*.po*: pulled localization updates for sp,ja,mr,pa,uk,zh_CN,zh_TW
  and regenerated

12 years agoconf: Avoid formatting auto-generated DAC labels
Marcelo Cerri [Fri, 31 Aug 2012 11:40:41 +0000 (13:40 +0200)]
conf: Avoid formatting auto-generated DAC labels

To avoid backward compatibility issues, this patch suppresses
auto-generated DAC labels from XML. This change affects commands such as
dumpxml and save.

Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
12 years agoconf: Fix parsing of seclabels without model
Marcelo Cerri [Fri, 31 Aug 2012 11:40:40 +0000 (13:40 +0200)]
conf: Fix parsing of seclabels without model

With this patch libvirt tries to assign a model to a single seclabel
when model is missing. Libvirt will look up at host's capabilities and
assign the first model to seclabel.

This patch fixes:

1. The problem with existing guests that have a seclabel defined in its XML.
2. A XML parse error when a guest is restored.

Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
12 years agovirsh: fixed incorrect timing report
Viktor Mihajlovski [Fri, 31 Aug 2012 11:32:45 +0000 (13:32 +0200)]
virsh: fixed incorrect timing report

When executing virsh -t <command> the reported timing was off
by 3 orders of magnitude if the command took more than one
second.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
12 years agovirsh: Document subdriver option of attach-disk
Jiri Denemark [Thu, 30 Aug 2012 15:51:35 +0000 (17:51 +0200)]
virsh: Document subdriver option of attach-disk

12 years agoqemu: Don't ignore CPU tuning config if required cgroups are missing
Jiri Denemark [Wed, 29 Aug 2012 14:08:59 +0000 (16:08 +0200)]
qemu: Don't ignore CPU tuning config if required cgroups are missing

When domain XML contains any of the elements for setting up CPU
scheduling parameters (period, quota, emulator_period, or
emulator_quota) we need cpu cgroup to enforce the configuration.
However, the existing code would just ignore silently such settings if
either cgroups were not available at all cpu cgroup was not available.
Moreover, APIs for manipulating CPU scheduler parameters were already
failing if cpu cgroup was not available. This patch makes cpu cgroup
mandatory for all domains that use CPU scheduling elements in their XML.

12 years agodoc: update option force to subcommand change-media
Guannan Ren [Fri, 31 Aug 2012 09:58:44 +0000 (17:58 +0800)]
doc: update option force to subcommand change-media

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

12 years agocgroup: fix libvirtd crash caused by messed memory
Guannan Ren [Fri, 31 Aug 2012 08:45:02 +0000 (16:45 +0800)]
cgroup: fix libvirtd crash caused by messed memory

The variable max_id is initialized again in the step of
getting cpu mapping variable map2. But in the next for loop
we still expect original value of max_id, the bug will
crash libvirtd when using on NUMA machine with big number
of cpus.

12 years agocgroup: fix a typo on extracting data from vcpu cgroup
Guannan Ren [Fri, 31 Aug 2012 08:40:10 +0000 (16:40 +0800)]
cgroup: fix a typo on extracting data from vcpu cgroup

12 years agocgroup: read more data from cgroup cpuacct.usage_percpu
Guannan Ren [Fri, 31 Aug 2012 08:31:30 +0000 (16:31 +0800)]
cgroup: read more data from cgroup cpuacct.usage_percpu

On NUMA machine, the length of string got from file
cpuacct.usage_percpu is quite large, so expand the
limit of 1024 bytes.

errors like:
Failed to read file \
'/cgroup/cpuacct/libvirt/qemu/rhel6q/cpuacct.usage_percpu': \
Value too large for defined data type

12 years agodocs: Fix typo in CPU tuning
Jiri Denemark [Fri, 31 Aug 2012 06:22:57 +0000 (08:22 +0200)]
docs: Fix typo in CPU tuning

12 years agodoc: Fix emulator pinning example in formatdomain.html
Peter Krempa [Fri, 31 Aug 2012 07:59:34 +0000 (09:59 +0200)]
doc: Fix emulator pinning example in formatdomain.html

Add correct closing tags.

12 years agonwfilter: adapt IP learning for broadcasted DHCP replies
Stefan Berger [Thu, 30 Aug 2012 18:29:51 +0000 (14:29 -0400)]
nwfilter: adapt IP learning for broadcasted DHCP replies

Adapt the IP learning code to also accept broadcasted DHCP replies

12 years agonwfilter: accept broadcasted DHCP replies in DHCP snooping code
Stefan Berger [Thu, 30 Aug 2012 18:29:50 +0000 (14:29 -0400)]
nwfilter: accept broadcasted DHCP replies in DHCP snooping code

Some DHCP servers send their DHCP replies to the broadcast MAC address
rather than to the MAC address of the VM. The existing DHCP snooping
code assumes that the reply always goes to the MAC address of the VM
thus filtering the traffic of some DHCP servers' replies.

The below patch adapts the code to

1) filter DHCP replies by comparing the MAC address in the reply against
   the MAC address of the VM (held in the snoop request)

2) adapts the pcap filter for traffic towards the VM to accept DHCP replies
   sent to any MAC address; for further filtering we rely on 1)

3) creates initial rules that are active while waiting for DHCP replies;
   these rules now accept DHCP replies to the VM's MAC address or to the
   MAC broadcast address

12 years agoImplement virMacAddrIsBroadcastRaw
Stefan Berger [Thu, 30 Aug 2012 18:29:49 +0000 (14:29 -0400)]
Implement virMacAddrIsBroadcastRaw

Add function for testing for Ethernet broadcast address

12 years agoFix adding ports to OVS bridges without VLAN tags
Kyle Mestery [Thu, 30 Aug 2012 20:38:06 +0000 (16:38 -0400)]
Fix adding ports to OVS bridges without VLAN tags

The introduction of the new VLAN code, along with the fix
from 5e465df6be8bcb00f0b4bff831e91f4042fae272, caused the
addition of OVS ports to fail with the following message:

ovs-vsctl: 00002|vsctl|ERR|: missing column name

This fix takes into account the VLAN arguments are optional,
and correctly sets up the command line to run the "ovs-vsctl"
command to add ports to the OVS bridge.

Signed-off-by: Kyle Mestery <kmestery@cisco.com>
CC: Eric Blake <eblake@redhat.com>
12 years agoFix xen driver following changes to make it stateful
Jim Fehlig [Thu, 30 Aug 2012 18:53:02 +0000 (12:53 -0600)]
Fix xen driver following changes to make it stateful

Recent work to improve support for loadable driver modules introduced
a regression in the xen driver.  The legacy xen driver is now a
stateful, libvirtd driver but was not being registered when building
without driver modules.

A slight behavior change was also noted in the xen drivers when
built as driver modules.  Previously, explicitly specifying a
connection URI was not necessary, but now

Compiled against library: libvirt 0.10.0
Using library: libvirt 0.10.0
Using API: QEMU 0.10.0
error: failed to get the hypervisor version
error: internal error Cannot find suitable emulator for x86_64

The xen drivers need to be registered before the qemu driver since
the qemu driver will return success with a null connection URI.
This ordering is safe since the xen drivers will decline when not
running the xen kernel.

12 years agoFix issue of PF brought down if VF is 8021.Qbh and pci passthrough
Nishank Trivedi [Thu, 30 Aug 2012 19:27:27 +0000 (15:27 -0400)]
Fix issue of PF brought down if VF is 8021.Qbh and pci passthrough

If a 8021.Qbh network device supports SRIOV and its VF is being used
in pci passthrough mode, when the guest is shutdown or destroyed, the
PF inteface is also brought down. qemuDomainHostdevNetConfigRestore()
finds out the PF for provided hostdev (which is VF) and passes it to
virNetDevPortProfileDisassociate() as linkdev. Later, linkdev gets passed
to virNetDevSetOnline() where the interface is brought down by clearing
IFF_UP flag.

Bringing down a PF, when only VF is being brought down is not expected
behavior. This patch adds a check so that virNetDevSetOnline() is called
only for PF and not if device is a VF.

Signed-off-by: Nishank Trivedi <nistrive@cisco.com>
12 years agonwfilter: loop generated too many rules
Stefan Berger [Thu, 30 Aug 2012 17:51:27 +0000 (13:51 -0400)]
nwfilter: loop generated too many rules

The loop processing the trusted DHCP server generated one too
many rules and added one final rules that accepted responses
from all DHCP servers. Below patch fixes this.

12 years agosecurity: Re-apply commit ce53382ba28179d3a504b29b4f888b6e130d53f0
Peter Krempa [Thu, 30 Aug 2012 14:05:53 +0000 (16:05 +0200)]
security: Re-apply commit ce53382ba28179d3a504b29b4f888b6e130d53f0

Recent changes in the security driver discarded changes that fixed
labeling un-confined guests.

12 years agovcpupin: Fix returning of arrays from virDomainVcpuPinAdd
Peter Krempa [Thu, 30 Aug 2012 13:38:37 +0000 (15:38 +0200)]
vcpupin: Fix returning of arrays from virDomainVcpuPinAdd

virDomainVcpuPinAdd does a realloc on vcpupin_list if the new vcpu pin
definition doesn't fit into the array. The list is an array of pointers
but the function definition didn't support returning the changed pointer
to the caller if it was realloced. This caused segfaults if realloc
would change the base pointer.

12 years agoqemu: Fix possible infinite loop and segfault on error path.
Peter Krempa [Thu, 30 Aug 2012 13:31:54 +0000 (15:31 +0200)]
qemu: Fix possible infinite loop and segfault on error path.

virDomainVcpuPinDefCopy when the control flow reaches out of memory
cleanup code, the flow would end in a infinite loop as the loop variable
wasn't decremented.

Also a dereference of NULL pointers was possible if allocation of the
Vcpu pinning definiton structure failed.

12 years agoqemu: Clean up security driver initialisation and config file
Peter Krempa [Thu, 30 Aug 2012 08:58:09 +0000 (10:58 +0200)]
qemu: Clean up security driver initialisation and config file

Commit d0c0e79ac646462aaa815f81ad324a0d3ef12954 left behind some dead
code (hasDAC can't be efectively set to true, because
virSecurityManagerNew fails to load the "dac" driver).

This patch also enhances the condition for adding the default
auto-detected security manager if the manager array is allocated but
empty.

Also the configuration file for qemu driver still contains reference to
the DAC driver that can't be enabled manualy.

12 years agoqemu: Revert to blocking behavior of qemuAgentCommand
Jiri Denemark [Thu, 30 Aug 2012 12:40:01 +0000 (14:40 +0200)]
qemu: Revert to blocking behavior of qemuAgentCommand

Before commit 05447e3af44ec153314ff97cd611330d9b4b5730, qemuAgentCommand
blocked until it got a reply or appropriate event. When new parameter
was added to qemuAgentCommand in the above commit, all existing callers
of it were updated in a wrong way changing them from blocking to
5-seconds timeout.

12 years agoqemu: Remove redundant parameter from qemuAgentSend
Jiri Denemark [Thu, 30 Aug 2012 12:19:02 +0000 (14:19 +0200)]
qemu: Remove redundant parameter from qemuAgentSend

The @timeout parameter of qemuAgentSend is both redundant and confusing.
This patch should not result in any functional changes.

12 years agonetwork: get vlan info for Open vSwitch interfaces from proper source
Laine Stump [Thu, 30 Aug 2012 09:14:32 +0000 (05:14 -0400)]
network: get vlan info for Open vSwitch interfaces from proper source

This bug was revealed by the crash described in

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

The vlan info pointer sent to virNetDevOpenvswitchAddPort should never
be non-NULL unless there is at least one tag. The factthat such a vlan
info pointer was receveid pointed out that a caller was passing the
wrong pointer. Instead of sending &net->vlan, the result of
virDomainNetGetActualVlan(net) should be sent - that function will
look for vlan info in net->data.network.actual->vlan, and in cany case
return NULL instead of a pointer if the vlan info it finds has no
tags.

Aside from causing the crash, sending a hardcoded &net->vlan has the
effect of ignoring vlan info from a <network> or <portgroup> config.

12 years agoSmall cleanup on previous patch
Daniel Veillard [Thu, 30 Aug 2012 07:18:02 +0000 (15:18 +0800)]
Small cleanup on previous patch

As pointed by Eric Blake

12 years agoFix a crash when using Open vSwitch virtual ports
Kyle Mestery [Wed, 29 Aug 2012 18:44:36 +0000 (14:44 -0400)]
Fix a crash when using Open vSwitch virtual ports

Fixup buffer usage when handling VLANs. Also fix the logic
used to determine if the virNetDevVlanPtr is valid or not.
Fixes crashes in the latest code when using Open vSwitch
virtualports.

Signed-off-by: Kyle Mestery <kmestery@cisco.com>
12 years agoqemu: Sort the numa params only when it affects the live config
Osier Yang [Wed, 29 Aug 2012 06:46:06 +0000 (14:46 +0800)]
qemu: Sort the numa params only when it affects the live config

As the next boot doesn't have to worry about the previous numa
params setting (there is no).

12 years agoFix configuration of QEMU security drivers
Daniel P. Berrange [Thu, 30 Aug 2012 00:37:01 +0000 (01:37 +0100)]
Fix configuration of QEMU security drivers

If no 'security_driver' config option was set, then the code
just loaded the 'dac' security driver. This is a regression
on previous behaviour, where we would probe for a possible
security driver. ie default to SELinux if available.

This changes things so that it 'security_driver' is not set,
we once again do probing. For simplicity we also always
create the stack driver, even if there is only one driver
active.

The desired semantics are:

 - security_driver not set
     -> probe for selinux/apparmour/nop
     -> auto-add DAC driver
 - security_driver set to a string
     -> add that one driver
     -> auto-add DAC driver
 - security_driver set to a list
     -> add all drivers in list
     -> auto-add DAC driver

It is not allowed, or possible to specify 'dac' in the
security_driver config param, since that is always
enabled.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoqemu: Refactor initialisation of security drivers.
Peter Krempa [Wed, 29 Aug 2012 12:19:39 +0000 (14:19 +0200)]
qemu: Refactor initialisation of security drivers.

The security driver loading code in qemu has a flaw that causes it to
register the DAC security driver twice. This causes problems (machines
unable to start) as the two DAC drivers clash together.

This patch refactors the code to allow loading the DAC driver even if
its specified in configuration (it can't be registered as a common
security driver), and does not add the driver twice.

12 years agoRevert "security: Add DAC to security_drivers"
Peter Krempa [Wed, 29 Aug 2012 12:29:43 +0000 (14:29 +0200)]
Revert "security: Add DAC to security_drivers"

This reverts commit 9f9b7b85c9b422e8f4e813f3920bf8f433246a4a.

The DAC security driver needs special handling and extra parameters and
can't just be added to regular security drivers.

12 years agoqemu: Fix starting domains with no cpu cgroup
Jiri Denemark [Wed, 29 Aug 2012 13:30:34 +0000 (15:30 +0200)]
qemu: Fix starting domains with no cpu cgroup

If cgroups are enabled in general but cpu cgroup is disabled in
qemu.conf or not mounted at all, libvirt would refuse to start any
domain even though scheduler parameters are not set in domain XML.

This patch makes cpu cgroup mandatory only for domains that actually
want to use it.

12 years agosecurity: remove dead code from virSecurityDACGenLabel
Alex Jia [Wed, 29 Aug 2012 10:00:51 +0000 (18:00 +0800)]
security: remove dead code from virSecurityDACGenLabel

* src/security/security_dac.c: remove useless dead code.

Signed-off-by: Alex Jia <ajia@redhat.com>
12 years agoRelease of libvirt-0.10.0
Daniel Veillard [Wed, 29 Aug 2012 03:57:02 +0000 (11:57 +0800)]
Release of libvirt-0.10.0

* configure.ac docs/news.html.in libvirt.spec.in: updates for the release
* po/*.po*: update localizations for zh_CN, uk, ja, pt_BR, as, sp, mr, zh_TW

12 years agonwfilter: Don't try to acquire DBus context when DBus is disabled
Peter Krempa [Tue, 28 Aug 2012 13:19:31 +0000 (15:19 +0200)]
nwfilter: Don't try to acquire DBus context when DBus is disabled

To silence error if DBus support is not compiled in.

12 years agoDon't require gawk for a simple print expression
Guido Günther [Tue, 28 Aug 2012 08:57:54 +0000 (10:57 +0200)]
Don't require gawk for a simple print expression

Fedora uses gawk as awk so there's no change and in behavior while
Debian/Ubuntu use mawk by default.

This was reported by Luca Capello in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636712

12 years agoutil: Prevent libvirtd crash from virNetDevOpenvswitchAddPort()
Alex Jia [Wed, 29 Aug 2012 02:56:04 +0000 (10:56 +0800)]
util: Prevent libvirtd crash from virNetDevOpenvswitchAddPort()

* src/util/virnetdevopenvswitch.c (virNetDevOpenvswitchAddPort): avoid libvirtd
crash due to derefing a NULL virtVlan->tag.

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

Signed-off-by: Alex Jia <ajia@redhat.com>
12 years agoqemu: Set placement when setting numa parameters
Osier Yang [Tue, 28 Aug 2012 12:13:31 +0000 (20:13 +0800)]
qemu: Set placement when setting numa parameters

To keep the internal data structure consistent.

12 years agoPortability fixes for non-linux or old linux platforms
Daniel Veillard [Wed, 29 Aug 2012 01:21:38 +0000 (09:21 +0800)]
Portability fixes for non-linux or old linux platforms

The commits d57567940153147f4d43875fb92c3030b3178b03 and
080bf330e3749d94ebe094f8deca0e3e67d3f2fe made use directly of
macro defined in recent linux netlink version. Make those
part conditional on the definition

* daemon/libvirtd.c: do not use NETLINK_ROUTE and NETLINK_KOBJECT_UEVENT
  without some check first

12 years agosecurity_dac: Don't return uninitialised uid and gid for image labels
Peter Krempa [Tue, 28 Aug 2012 23:15:04 +0000 (01:15 +0200)]
security_dac: Don't return uninitialised uid and gid for image labels

As in the previous commit, images are also chowned to uninitialised
uid and gid if the label is not present.

12 years agosecurity_dac: Don't return uninitialised value when parsing seclabels
Peter Krempa [Tue, 28 Aug 2012 16:29:38 +0000 (18:29 +0200)]
security_dac: Don't return uninitialised value when parsing seclabels

When starting a machine the DAC security driver tries to set the UID and
GID of the newly spawned process. This worked as desired if the desired
label was set. When the label was missing a logical bug in
virSecurityDACGenLabel() caused that uninitialised values were used as
uid and gid for the new process.

With this patch, default values (from qemu driver configuration)
are used if the label is not found.

12 years agosecurity_dac: Avoid segfault when no label is requested
Peter Krempa [Tue, 28 Aug 2012 16:27:31 +0000 (18:27 +0200)]
security_dac: Avoid segfault when no label is requested

When no DAC "label" was requested for a domain the DAC manager tried to
strdup a NULL string causing a segfault.

12 years agoutil: Fix error message when getpwuid_r fails to find the user
Peter Krempa [Tue, 28 Aug 2012 14:51:05 +0000 (16:51 +0200)]
util: Fix error message when getpwuid_r fails to find the user

getpwuid_r returns success but sets the return structure to NULL when it
fails to deliver data about the requested uid. In our helper code this
created following strange error messages:

" ... cannot getpwuid_r(1234): Success"

This patch creates a more helpful message:
" ... getpwuid_r failed to retrieve data for uid '1234'"

12 years agoconf: Fix the problem which cause libvirtd to crash
Osier Yang [Tue, 28 Aug 2012 11:31:56 +0000 (19:31 +0800)]
conf: Fix the problem which cause libvirtd to crash

* src/conf/domain_conf.c: Use STREQ_NULLABLE instead of STREQ,
as def->seclables[i]->model could be NULL.

12 years agobuild: define 'inline' iff HAVE_LIBNL1
Michal Privoznik [Tue, 28 Aug 2012 10:01:50 +0000 (12:01 +0200)]
build: define 'inline' iff HAVE_LIBNL1

Previous commit 0b4b53bb80 defined 'inline' to prevent broken build on
systems with libnl1 headers. However, it broke build on systems with
libnl3 headers. Therefore we must make that fix conditional.

12 years agodocs: CPU allocation and pinning clarification
Martin Kletzander [Mon, 27 Aug 2012 14:26:26 +0000 (16:26 +0200)]
docs: CPU allocation and pinning clarification

There was a request for clarifying this part of the
documentation. This also fixes a case used with CPU.

12 years agobuild: work with older libnl1 headers
Eric Blake [Mon, 27 Aug 2012 21:00:59 +0000 (15:00 -0600)]
build: work with older libnl1 headers

Ubuntu 10.04 shipped with out-of-the-box libnl1 headers, which
assumed the old gcc semantics of 'extern inline' as a C89 extension:
the function will _always_ be inline if it is used, and that
it may be declared extern inline in headers without a definition,
as long as the definition occurs before any use.  But when C99
added 'extern inline' as a mandatory feature of the language, with
slightly different semantics than gcc (the function MUST have
external linkage, and the inline definition MUST be present
alongside any declaration, where the compiler can then choose
which of the two versions to use), this rendered the use of
'inline' in libnl's header obsolete.  Most distros already solved
this by removing 'inline' (the resulting 'extern' is correct,
regardless of gcc semantics), and libnl-3 does not have the
problem (where it has switched to 'static inline' instead, again
with the definition present, and again, our hack will result in
plain 'static' with no ill effects).  But for the case of building
out of the box, we hack around the broken Ubuntu header.

* src/util/virnetlink.h: Work around libnl issue.

12 years agoqemu: Fix define logic
Michal Privoznik [Mon, 27 Aug 2012 15:40:33 +0000 (17:40 +0200)]
qemu: Fix define logic

With current flow in qemudDomainDefine we might lose data
when updating an existing domain. We parse given XML and
overwrite the configuration.  Then we try to save the new
config. However, this step may fail and we don't perform any
roll back.  In fact, we remove the domain from the list of
domains held up by qemu driver. This is okay as long as the
domain was brand new one.

12 years agoqemu_agent: Switch to virReportSystemError() on system error
Michal Privoznik [Mon, 27 Aug 2012 11:49:21 +0000 (13:49 +0200)]
qemu_agent: Switch to virReportSystemError() on system error

Currently, if a syscall in qemu_agent.c fails we report an internal
error even though we should be reporting a system error.

12 years agoIntroduce new VIR_ERR_AGENT_UNRESPONSIVE error code
Michal Privoznik [Mon, 27 Aug 2012 10:24:59 +0000 (12:24 +0200)]
Introduce new VIR_ERR_AGENT_UNRESPONSIVE error code

Currently, when guest agent is configured but not responsive
(e.g. due to appropriate service not running in the guest)
we return VIR_ERR_INTERNAL_ERROR. Both are wrong. Therefore
we need to introduce new error code to reflect this case.

12 years agoconf: prevent NULL pointer access in virSecurityLabelDefsParseXML
Ján Tomko [Mon, 27 Aug 2012 12:51:28 +0000 (14:51 +0200)]
conf: prevent NULL pointer access in virSecurityLabelDefsParseXML

When checking for seclabels without security models, def->nseclabels is
already set to n. In the case of an error def->seclabels is freed but
nseclabels is left untouched. This leads to a segmentation fault when
def is freed in virDomainDefParseXML.

12 years agoqemu: Switch to unified func name
Michal Privoznik [Mon, 27 Aug 2012 08:35:02 +0000 (10:35 +0200)]
qemu: Switch to unified func name

With the latest patches libvirt supports qemu agent monitor
passthrough. However, function in qemu driver is called
qemuDrvDomainAgentCommand. s/Drv// as used in all other names.

12 years agorpc: fix segmentation fault caused by null client-sock
Guannan Ren [Mon, 27 Aug 2012 08:59:25 +0000 (16:59 +0800)]
rpc: fix segmentation fault caused by null client-sock

The client-sock could have been set to NULL by eventloop thread
after async event fired.

12 years agoqemu: fix regression with spice tls port allocation
Martin Kletzander [Mon, 27 Aug 2012 07:41:36 +0000 (09:41 +0200)]
qemu: fix regression with spice tls port allocation

In my quest for reusing variables I failed to edit one variable when
fixing details between two patch versions. That results in a failure
to start qemu with autoport and spice tls, because qemu is trying to
bind two sockets to the same port.

12 years agoqemu: fix regression with pinning
Martin Kletzander [Fri, 24 Aug 2012 15:31:47 +0000 (17:31 +0200)]
qemu: fix regression with pinning

Commit 4b03d59167f4a4c6ec57def315a61d977466e75b changed the pinning
behavior in a way that makes some machines non-startable.

The comment mentioning that we cannot control each vcpu when there is
not VCPU<-> PID mapping available is true, however, this isn't
necessarily an error, because this can be caused by old QEMU without
support for "query-cpus" command as well as a software emulated
machines that don't create more than one process.

12 years agovirsh: fix missing return value
Alex Jia [Mon, 27 Aug 2012 05:58:46 +0000 (13:58 +0800)]
virsh: fix missing return value

Although virsh command raises a correct error information, the command status
returns 0(true), this patch is used for fixing this issue.

Signed-off-by: Alex Jia <ajia@redhat.com>
12 years agospecfile: require libnl3 for Fedora >= 18 and RHEL >= 7
Laine Stump [Fri, 24 Aug 2012 21:57:42 +0000 (17:57 -0400)]
specfile: require libnl3 for Fedora >= 18 and RHEL >= 7

Everything is ready in both netcf and libvirt to switch over to libnl3
in future releases of both Fedora and RHEL. This needs to be done more
or less simultaneously in both packages, though, because you can't mix
libnl1.1 and libnl3 in the same process (e.g. libvirtd using
libnl-3.so and libnetcf.so, while libnetcf.so uses libnl.so)

This patch does two things when fedora >= 18 || rhel >= 7):

  1) requires libnl3-devel
  2) requires netcf-devel-0.2.2 or greater

(the idea is that a similar patch is going into netcf's specfile, so
that when a build of netcf is done on F18 or later (or RHEL7 or later)
netcf will be guaranteed to be built with libnl3 rather than
libnl-1.1)

12 years agobuild: add LIBNL_CFLAGS to build of libvirt_lxc
Laine Stump [Sat, 25 Aug 2012 18:09:55 +0000 (14:09 -0400)]
build: add LIBNL_CFLAGS to build of libvirt_lxc

When libvirt_lxc is built, it uses the utility library and #includes
virnetdev.h, which #includes virnetlink.h, which includes
<netlink/msg.h>.

Normally, the netlink include directory would be just off
/usr/include, so that wouldn't create a problem, but on Fedora and
RHEL systems using libnl3, the libnl includes have been moved into
/usr/include/libnl3 (to allow concurrent installation of libnl-1.1).

All other binaries that need it have added $(LIBNL_CFLAGS) to their
CFLAGS, but not libvirt_lxc, so it fails to build on Fedora and RHEL
that have only libnl3-devel installed. This was previously unnoticed
because everyone was building with libnl headers in
/usr/include/netlink (even on systems with the headers in
/usr/include/libnl3/netlink, many people (like me) usually also have
the libnl1.1 headers in /usr/include/netlink).

This patch adds the necessary CFLAGS for libvirt_lxc.

Note that we don't need to add $(LIBNL_LIBS) to the LDADD for this
binary, because it never directly calls libnl functions, but only
calls them indirectly through the util library, which it's already
linking against.

12 years agosnapshot: rename an enum
Eric Blake [Mon, 13 Aug 2012 22:59:57 +0000 (16:59 -0600)]
snapshot: rename an enum

The name 'virDomainDiskSnapshot' didn't fit in with our normal
conventions of using a prefix hinting that it is related to a
virDomainSnapshotPtr.  Also, a future patch will reuse the
enum for declaring where the VM memory is stored.

* src/conf/snapshot_conf.h (virDomainDiskSnapshot): Rename...
(virDomainSnapshotLocation): ...to this.
(_virDomainSnapshotDiskDef): Update clients.
* src/conf/domain_conf.h (_virDomainDiskDef): Likewise.
* src/libvirt_private.syms (domain_conf.h): Likewise.
* src/conf/domain_conf.c (virDomainDiskDefParseXML)
(virDomainDiskDefFormat): Likewise.
* src/conf/snapshot_conf.c: (virDomainSnapshotDiskDefParseXML)
(virDomainSnapshotAlignDisks, virDomainSnapshotDefFormat):
Likewise.
* src/qemu/qemu_driver.c (qemuDomainSnapshotDiskPrepare)
(qemuDomainSnapshotCreateSingleDiskActive)
(qemuDomainSnapshotCreateDiskActive, qemuDomainSnapshotCreateXML):
Likewise.

12 years agosnapshot: split snapshot conf code into own file
Eric Blake [Tue, 14 Aug 2012 00:09:12 +0000 (18:09 -0600)]
snapshot: split snapshot conf code into own file

This has several benefits:
1. Future snapshot-related code has a definite place to go (and I
_will_ be adding some)
2. Snapshot errors now use the VIR_FROM_DOMAIN_SNAPSHOT error
classification, which has been underutilized (previously only in
libvirt.c)

* src/conf/domain_conf.h, domain_conf.c: Split...
* src/conf/snapshot_conf.h, snapshot_conf.c: ...into new files.
* src/Makefile.am (DOMAIN_CONF_SOURCES): Build new files.
* po/POTFILES.in: Mark new file for translation.
* src/vbox/vbox_tmpl.c: Update caller.
* src/esx/esx_driver.c: Likewise.
* src/qemu/qemu_command.c: Likewise.
* src/qemu/qemu_domain.h: Likewise.

12 years agosnapshot: make virDomainSnapshotObjList opaque
Eric Blake [Tue, 14 Aug 2012 06:22:39 +0000 (00:22 -0600)]
snapshot: make virDomainSnapshotObjList opaque

We were failing to react to allocation failure when initializing
a snapshot object list.  Changing things to store a pointer
instead of a complete object adds one more possible point of
allocation failure, but at the same time, will make it easier to
react to failure now, as well as making it easier for a future
patch to split all virDomainSnapshotPtr handling into a separate
file, as I continue to add even more snapshot code.

Luckily, there was only one client outside of domain_conf.c that
was actually peeking inside the object, and a new wrapper function
was easy.

* src/conf/domain_conf.h (_virDomainObj): Use a pointer.
(virDomainSnapshotObjListInit): Rename.
(virDomainSnapshotObjListFree, virDomainSnapshotForEach): New
declarations.
(_virDomainSnapshotObjList): Move definitions...
* src/conf/domain_conf.c: ...here.
(virDomainSnapshotObjListInit, virDomainSnapshotObjListDeinit):
Rename...
(virDomainSnapshotObjListNew, virDomainSnapshotObjListFree): ...to
these.
(virDomainSnapshotForEach): New function.
(virDomainObjDispose, virDomainListPopulate): Adjust callers.
* src/qemu/qemu_domain.c (qemuDomainSnapshotDiscard)
(qemuDomainSnapshotDiscardAllMetadata): Likewise.
* src/qemu/qemu_migration.c (qemuMigrationIsAllowed): Likewise.
* src/qemu/qemu_driver.c (qemuDomainSnapshotLoad)
(qemuDomainUndefineFlags, qemuDomainSnapshotCreateXML)
(qemuDomainSnapshotListNames, qemuDomainSnapshotNum)
(qemuDomainListAllSnapshots)
(qemuDomainSnapshotListChildrenNames)
(qemuDomainSnapshotNumChildren)
(qemuDomainSnapshotListAllChildren)
(qemuDomainSnapshotLookupByName, qemuDomainSnapshotGetParent)
(qemuDomainSnapshotGetXMLDesc, qemuDomainSnapshotIsCurrent)
(qemuDomainSnapshotHasMetadata, qemuDomainRevertToSnapshot)
(qemuDomainSnapshotDelete): Likewise.
* src/libvirt_private.syms (domain_conf.h): Export new function.

12 years agoxen-xs: fix uuid of renamed domain
Philipp Hahn [Fri, 24 Aug 2012 12:58:52 +0000 (14:58 +0200)]
xen-xs: fix uuid of renamed domain

When the XenStore tdb lives persistently and is not cleared between host
reboots, Xend (version 3.4 and 4.1) re-creates the domain information
located in XenStore below /vm/$UUID. (According to the xen-3.2-commit
hg265950e3df69 to fix a problem when locally migrating a domain to the
host itself.)

When doing so a version number is added to the UUID separated by one
dash, which confuses xenStoreDomainIntroduced(): It iterates over all
domains and tries to lookup all inactive domains using
xenStoreDomainGetUUID(), which fails if the running domain is renamed:
virUUIDParse() fails to parse the versioned UUID and the domain is
flagged as missing. When this happens the function delays .2s and
re-tries 20 times again, multiplied by the number of renamed VMs.
  14:48:38.878: 4285: debug : xenStoreDomainIntroduced:1354 : Some domains were missing, trying again

This adds a significant delay:
  # time virsh list >/dev/null
  real    0m6.529s
  # xenstore-list /vm
  00000000-0000-0000-0000-000000000000
  00000000-0000-0000-0000-000000000000-1
  00000000-0000-0000-0000-000000000000-2
  00000000-0000-0000-0000-000000000000-3
  00000000-0000-0000-0000-000000000000-4
  00000000-0000-0000-0000-000000000000-5
  7c06121e-90c3-93d4-0126-50481d485cca
  00000000-0000-0000-0000-000000000000-6
  00000000-0000-0000-0000-000000000000-7
  144ad19d-dfb4-2f80-8045-09196bb8784f
  00000000-0000-0000-0000-000000000000-8
  144ad19d-dfb4-2f80-8045-09196bb8784f-1
  00000000-0000-0000-0000-000000000000-9
  00000000-0000-0000-0000-000000000000-10
  00000000-0000-0000-0000-000000000000-11
  00000000-0000-0000-0000-000000000000-12
  00000000-0000-0000-0000-000000000000-13
  00000000-0000-0000-0000-000000000000-14
  144ad19d-dfb4-2f80-8045-09196bb8784f-2
  00000000-0000-0000-0000-000000000000-15
  144ad19d-dfb4-2f80-8045-09196bb8784f-3
  00000000-0000-0000-0000-000000000000-16

The patch adds truncation of the UUID as read from the XenStore path
before passing it to virUUIDParse().

The same issue is reported at
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666135>

Signed-off-by: Philipp Hahn <hahn@univention.de>
12 years agoconf: Don't always require security/@model
Michal Privoznik [Fri, 24 Aug 2012 12:59:59 +0000 (14:59 +0200)]
conf: Don't always require security/@model

Only parse model, if static labelling, or
a base label is set, or doing active XML.

12 years agosecurity: Add DAC to security_drivers
Michal Privoznik [Fri, 24 Aug 2012 10:36:03 +0000 (12:36 +0200)]
security: Add DAC to security_drivers

Currently, if users set 'security_driver="dac"' in qemu.conf libvirtd
fails to initialize as DAC driver is not found because it is missing
in our security drivers array.

12 years agolibssh2_transport: Add docs to remote.html
Peter Krempa [Fri, 24 Aug 2012 13:44:46 +0000 (15:44 +0200)]
libssh2_transport: Add docs to remote.html

Describe the existence of the transport driver and document the
configurable options.

12 years agonwfilter: don't log error if firewalld is disabled, improve diagnostics
Laine Stump [Fri, 24 Aug 2012 05:38:19 +0000 (01:38 -0400)]
nwfilter: don't log error if firewalld is disabled, improve diagnostics

The original patch to support firewalld in nwfilter wasn't personally
checking the exit status of firewall-cmd, but was instead sending NULL
in the *exitstatus arg, which meant that virCommandWait would log an
error just for the exit status being non-0 (and a "more scary than
useful" error at that).

We don't want to treat this as an error, though, just as a reason to
use standard (ip|eb)tables commands instead of firewall-cmd.

This patch modifies the virCommandRun in the nwfilter code to request
status back from the caller. This avoids virCommandWait logging an
error message, and allows the caller to do as it likes after examining
the status.

The VIR_DEBUG() logged when firewalld is enabled has also been
reworded and changed to a VIR_INFO, and a similar VIR_INFO has been
added in the case that firewalld is *not* found+enabled.

12 years agoopenvz: check the exitstatus of vzlist
Laine Stump [Fri, 24 Aug 2012 05:43:19 +0000 (01:43 -0400)]
openvz: check the exitstatus of vzlist

I noticed this while auditing all calls to virCommandRun that request
an exit status from virCommandRun. Two functions in the openvz driver

  openvzDomainGetBarrierLimit
  openvzDomainSetBarrierLimit

request an exit status from virCommandRun (thus assuring that
virCommandRun won't log any errors just due to a non-0 exit status),
but then fail to examine that exit status. This could result in the
functions believing that the call to "vzlist" was successful, even
though it may have encountered an error.

12 years agoqemu-agent: available in 0.10.0
Eric Blake [Thu, 23 Aug 2012 15:56:56 +0000 (09:56 -0600)]
qemu-agent: available in 0.10.0

The recent virDomainQemuAgentCommand addition is part of 0.10.0;
also, grouping all libvirt-qemu.so callbacks together makes them
easier to identify.

* src/libvirt_qemu.syms: Fix release symbol.
* src/qemu/qemu_driver.c (qemuDriver): Likewise.
* src/remote/remote_driver.c (remote_driver): Likewise.
* src/driver.h (_virDriver): Group qemu-specific callbacks.

12 years agonetwork: fix virtual network bridge delay setting
Laine Stump [Thu, 23 Aug 2012 15:21:47 +0000 (11:21 -0400)]
network: fix virtual network bridge delay setting

libvirt's network config documents that a bridge's STP "forward delay"
(called "delay" in the XML) should be specified in seconds, but
virNetDevBridgeSetSTPDelay() assumes that it is given a delay in
milliseconds (although the comment at the top of the function
incorrectly says "seconds".

This fixes the comment, and converts the delay to milliseconds before
calling virNetDevBridgeSetSTPDelay().

12 years agoqemu: forbid suspend if already pmsuspended
Michal Privoznik [Thu, 23 Aug 2012 13:26:20 +0000 (15:26 +0200)]
qemu: forbid suspend if already pmsuspended

If a domain is pmsuspended then virsh suspend will succeed. Beside
obvious flaw, virsh resume will report success and change domain
state to running which is another mistake. Therefore we must forbid
any attempts for suspend and resume when pmsuspended.

12 years agoagent: add qemu-agent-command to virsh
MATSUDA Daiki [Thu, 23 Aug 2012 03:29:27 +0000 (12:29 +0900)]
agent: add qemu-agent-command to virsh

Add qemu-agent-command to virsh to support virDomainQemuAgentCommand().

Signed-off-by: MATSUDA Daiki <matsudadik@intellilink.co.jp>
12 years agoagent: add python module support
MATSUDA Daiki [Thu, 23 Aug 2012 03:29:26 +0000 (12:29 +0900)]
agent: add python module support

Add virDomainQemuAgentCommand() support function to python module.

Signed-off-by: MATSUDA Daiki <matsudadik@intellilink.co.jp>
12 years agoagent: add remote driver support
MATSUDA Daiki [Thu, 23 Aug 2012 03:29:25 +0000 (12:29 +0900)]
agent: add remote driver support

Add qemuDomainAgentCommand() which is generated automatically,
for .qemuDomainArbitraryAgentCommand to remote driver.

Signed-off-by: MATSUDA Daiki <matsudadik@intellilink.co.jp>
12 years agoagent: add qemu driver support
MATSUDA Daiki [Thu, 23 Aug 2012 03:29:24 +0000 (12:29 +0900)]
agent: add qemu driver support

Add qemuDrvDomainAgentCommand() for .qemuDomainArbitraryAgentCommand
to qemu driver.

Signed-off-by: MATSUDA Daiki <matsudadik@intellilink.co.jp>
12 years agoagent: add virDrvDomainQemuAgentCommand prototype for drivers.
MATSUDA Daiki [Thu, 23 Aug 2012 03:29:23 +0000 (12:29 +0900)]
agent: add virDrvDomainQemuAgentCommand prototype for drivers.

Add virDrvDomainQemuAgentCommand prototype for drivers.
Add virDomainQemuAgentCommand() for virDrvDomainQemuAgentCommand.

Signed-off-by: MATSUDA Daiki <matsudadik@intellilink.co.jp>
12 years agoagent: add qemuAgentArbitraryCommand() for general qemu agent command
MATSUDA Daiki [Thu, 23 Aug 2012 03:29:22 +0000 (12:29 +0900)]
agent: add qemuAgentArbitraryCommand() for general qemu agent command

Add a function qemuAgentArbitraryCommand() for general qemu agent command.

Signed-off-by: MATSUDA Daiki <matsudadik@intellilink.co.jp>
12 years agoagent : add @seconds variable to qemuAgentSend().
MATSUDA Daiki [Thu, 23 Aug 2012 03:29:21 +0000 (12:29 +0900)]
agent : add @seconds variable to qemuAgentSend().

Add @seconds variable to qemuAgentSend().
When @timemout is true, @seconds controls how long to wait for a
response (if @seconds is VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT,
default to QEMU_AGENT_WAIT_TIME).
In addition, @seconds must be >= 0 or VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT.
If @timeout is false, @seconds is ignored.

Signed-off-by: MATSUDA Daiki <matsudadik@intellilink.co.jp>
12 years agoFix a missing build requirement on dbus-devel
Daniel Veillard [Thu, 23 Aug 2012 09:44:08 +0000 (17:44 +0800)]
Fix a missing build requirement on dbus-devel

Communication with the firewall daemon uses DBus
so if we compile with firewalld support, the dbus-devel
is required for building

12 years agofix check of vcpuid in virDomainVcpuPinDefParseXML
Hu Tao [Thu, 23 Aug 2012 02:31:12 +0000 (10:31 +0800)]
fix check of vcpuid in virDomainVcpuPinDefParseXML

For emulator, the vcpuid field is always set to -1, instead of parsing
XML for the value of it.

12 years agoutil: eliminate erroneous VIR_WARNs in (eb|ip)tables.c
Laine Stump [Wed, 22 Aug 2012 20:00:28 +0000 (16:00 -0400)]
util: eliminate erroneous VIR_WARNs in (eb|ip)tables.c

Several VIR_DEBUG()'s were changed to VIR_WARN() while I was testing
the firewalld support patch, and I neglected to change them back
before I pushed.

In the meantime I've decided that it would be useful to have them be
VIR_INFO(), just so there will be logged evidence of which method is
being used (firewall-cmd vs. (eb|ip)tables) without needing to crank
logging to 11. (at most this adds 2 lines to libvirtd's logs per
libvirtd start).

12 years agoFix some typos in messages, docs and comments.
Yuri Chornoivan [Wed, 22 Aug 2012 18:29:18 +0000 (21:29 +0300)]
Fix some typos in messages, docs and comments.

12 years agodnsmasq: avoid forwarding queries without a domain
Gene Czarcinski [Wed, 22 Aug 2012 16:59:24 +0000 (12:59 -0400)]
dnsmasq: avoid forwarding queries without a domain

dnsmasq is forwarding a number of queries upstream that should not
be done.  There still remains an MX query for a plain name with no
domain specified that will be forwarded is dnsmasq has --domain=xxx
--local=/xxx/ specified. This does not happen with no domain name
and --local=// ... not a libvirt problem.

BTW, thanks again to Claudio Bley!

12 years agodocs: fix blockpull/blockcopy bandwidth Mbps -> MiB/s
Stefan Hajnoczi [Wed, 22 Aug 2012 13:59:11 +0000 (14:59 +0100)]
docs: fix blockpull/blockcopy bandwidth Mbps -> MiB/s

The bandwidth units for blockpull and blockcopy are in Megabytes per
Second, not Megabits per Second.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoFix parameter list in virNetlinkEvent{Add,Remove}Client Win32 stubs
Daniel P. Berrange [Wed, 22 Aug 2012 15:09:17 +0000 (16:09 +0100)]
Fix parameter list in virNetlinkEvent{Add,Remove}Client Win32 stubs

The virNetlinkEventAddClient / virNetlinkEventRemoveClient stub
impls had syntax errors in their parameter lists, using a ')'
after the second-to-last parameter instead of a ','

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