[libvirt] [PATCH 0/6] Fix regression with relative backing names in storage pools
by Peter Krempa
Our recent refactors broke relative backing names in storage pools, fix it partially.
Peter Krempa (6):
storage: backend: Fix formatting of function arguments
storage: Track backing store of a volume in the target struct
storage: backend: fs: Touch up coding style
storage: fs: Process backing store data in
virStorageBackendProbeTarget
storage: fs: Properly parse backing store info
storage: fs: Don't fail volume update if backing store isn't
accessible
src/conf/storage_conf.c | 53 +++++++++--------
src/conf/storage_conf.h | 1 -
src/storage/storage_backend.c | 40 ++++++-------
src/storage/storage_backend_fs.c | 103 ++++++++++++++++++----------------
src/storage/storage_backend_gluster.c | 20 +++++--
src/storage/storage_backend_logical.c | 11 ++--
6 files changed, 129 insertions(+), 99 deletions(-)
--
2.0.0
10 years, 4 months
[libvirt] [PATCH 0/4] fix virReportSystemError misuse
by Jincheng Miao
virReportSystemError() reports some OS errors, and the first
argument of it should be the error number defined in errno.h.
virReportError() reports libvirt errors, and the first argument
should be the error number defined in virerrno.h.
This patch set fix some misuse of virReportSystemError:
passing virerrno instead of errno.
Jincheng Miao (4):
qemu: fix wrong errno report in qemuMonitorOpenUnix
lxc: print ENOTSUP when usernamespace is not supported
openvz: print EOVERFLOW when barrier:limit are too long
util: print errno in virObjectLockableNew
src/lxc/lxc_container.c | 2 +-
src/openvz/openvz_conf.c | 2 +-
src/qemu/qemu_monitor.c | 7 +++++--
src/util/virobject.c | 2 +-
4 files changed, 8 insertions(+), 5 deletions(-)
--
1.8.3.1
10 years, 4 months
[libvirt] [PATCH] spec: Update polkit dependencies for CVE-2013-4311
by Jiri Denemark
Use secured polkit on distros which provide it. However, RHEL-6 will
still allow for older polkit-0.93 rather than forcing polkit-0.96-5
which is not available in all RHEL-6 releases.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
libvirt.spec.in | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 8d1acfa..f32ab00 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -535,7 +535,9 @@ BuildRequires: module-init-tools
BuildRequires: cyrus-sasl-devel
%endif
%if %{with_polkit}
- %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
+ %if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
+BuildRequires: polkit-devel >= 0.112
+ %elif 0%{?fedora} >= 12 || 0%{?rhel} >= 6
BuildRequires: polkit-devel >= 0.93
%else
BuildRequires: PolicyKit-devel >= 0.6
@@ -698,7 +700,9 @@ Requires: avahi-libs
%endif
%endif
%if %{with_polkit}
- %if 0%{?fedora} >= 12 || 0%{?rhel} >=6
+ %if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
+Requires: polkit >= 0.112
+ %elif 0%{?fedora} >= 12 || 0%{?rhel} >=6
Requires: polkit >= 0.93
%else
Requires: PolicyKit >= 0.6
--
2.0.0
10 years, 4 months
[libvirt] [PATCH] spec: fix invalid syntax
by Eric Blake
Commit 20e01504 broke 'make rpm':
error: line 540: Unknown tag: %elif 020 >= 12 || 0 >= 6
Apparently, even though shell has elif so that you can do a chain
of conditionals, the rpm spec file does not, and you have to nest
things instead.
* libvirt.spec.in: Convert %elif to proper nested %if.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Pushing under the build-breaker rule.
libvirt.spec.in | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 47bfec5..9c7b241 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -537,10 +537,12 @@ BuildRequires: cyrus-sasl-devel
%if %{with_polkit}
%if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
BuildRequires: polkit-devel >= 0.112
- %elif 0%{?fedora} >= 12 || 0%{?rhel} >= 6
-BuildRequires: polkit-devel >= 0.93
%else
+ %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
+BuildRequires: polkit-devel >= 0.93
+ %else
BuildRequires: PolicyKit-devel >= 0.6
+ %endif
%endif
%endif
%if %{with_storage_fs}
@@ -702,10 +704,12 @@ Requires: avahi-libs
%if %{with_polkit}
%if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
Requires: polkit >= 0.112
- %elif 0%{?fedora} >= 12 || 0%{?rhel} >=6
-Requires: polkit >= 0.93
%else
+ %if 0%{?fedora} >= 12 || 0%{?rhel} >=6
+Requires: polkit >= 0.93
+ %else
Requires: PolicyKit >= 0.6
+ %endif
%endif
%endif
%if %{with_cgconfig}
--
1.9.3
10 years, 4 months
Re: [libvirt] Enable kvm on aarch64, Cleanup F-16/18 conditionals
by Eric Blake
On 07/15/2014 04:00 PM, Peter Robinson wrote:
[reformatting to avoid top-posting]
> On Tue, Jul 15, 2014 at 6:52 PM, Daniel P. Berrange
<berrange(a)redhat.com> wrote:
>> Historically we've kept support for building libvirt against
>> Fedora versions even if unsupported by Fedora itself, because
>> we've found people often stick on old Fedora versions. At some
>> point though it does get a bit insane. eg we don't really need
>> Fedora 8 support at this point. If we are going todo a cleanup
>> though, we should do it throughout the spec, not just in these
>> few places
> Sorry, I missed the Fedora 8 stuff. Would it even work on Fedora 8
> with all the various other changes? Not sure it's worth the effort for
> the few people that want that release as a hypervisor, I can
> understand for the supported elX releases but not sure the Fedora
> releases that are systemd based give value to elX releases and are
> generally relatively ancient history. Dan do you really have know
> users of the latest release running it on F-8?
>
> In terms of pushing upstream Cole has said he's happy to push the
> commits to ensure it fits your work flows.
Doing an out-of-the-box build on RHEL 5 is the oldest configuration
still actively (if marginally) supported, ideally for as long as RHEL 5
remains a live platform (several more years to go). We have build-bots
that ensure that we can build on RHEL 5, although I'm not sure if those
buildbots are exercising 'make rpm' to test the older parts of the spec
file. Historically, RHEL 5.10 is based off of libvirt-0.8.2, and that
was the release in use during Fedora 13. So it's _definitely_ worth
culling any conditionals older than F13; but stuff between F13 and F18
might be shared with RHEL 5, and therefore more effort to cull the
Fedora side while still leaving the RHEL side intact.
I could go either way if we were to set some sort of policy (maybe: any
fedora release that is unsupported for more than a year is no longer
required to be supported in the spec file), and use that to justify
cleanups of older parts of the spec file as long as it doesn't break
RHEL 5. F16 is definitely more than a year out-of-date, F18 is a bit
more borderline on whether we are ready to call it unsupported.
Anyone else on the libvirt list have an opinion on how far back we can
clean without annoying people that are slow on the upgrade to modern Fedora?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
10 years, 4 months
[libvirt] [PATCH 0/4] Resolve const correctness isues
by Michal Privoznik
Okay, okay. The approach in 4/4 can be considered hackish, but hey - it works!
Michal Privoznik (4):
Fix const correctness
viralloc: Honor const correctness in VIR_FREE
VIR_FREE: Avoid doing side work in callees
virFree: Check const correctness
src/conf/network_conf.c | 12 ++++++++----
src/locking/lock_driver_lockd.c | 2 +-
src/qemu/qemu_capabilities.c | 2 +-
src/remote/remote_driver.c | 2 +-
src/util/viralloc.c | 6 ++++--
src/util/viralloc.h | 33 ++++++++++++++++-----------------
src/xenapi/xenapi_utils.c | 3 ++-
tools/virsh-domain.c | 4 ++--
tools/wireshark/src/packet-libvirt.c | 6 +++---
tools/wireshark/src/packet-libvirt.h | 4 ++--
10 files changed, 40 insertions(+), 34 deletions(-)
--
1.8.5.5
10 years, 4 months
[libvirt] [PATCH 0/2] Implement interface stats for BSD
by Roman Bogorodskiy
This series implements support for querying network interface
stats on (Free)BSD.
It's more of an RFC, because I'm uncertain about few things:
- It feels a little strange to have a source file that implements
only a single function like this. I am wondering if it would be better
to just move it to something like util/virnetdev.c?
- FreeBSD stores interface data in the if_data struct and a number of outgoing
packet drops is stored in a field 'ifi_oqdrops'. This field was added
in -CURRENT and later merged back to 10-STABLE. In order not to break
the ABI, it's available only if _IFI_OQDROPS is defined. I've added
a configure.ac check which adds -D_IFI_OQDROPS before checking this field
and resetting it back if it is not present. This way, this flag will
present when the field is available even if the flag is not needed
(e.g. on -CURRENT). Is there a better way of doing it? I was thinking
about trying to check this field without the flag and if it fails check
one more time with the flag, but it looks a little messy.
- Did I get it right that the stats reported are from the guest POV, e.g.
when downloading a large file from guest, it should look like:
vnet0 rx_bytes 731603341
vnet0 rx_packets 518354
vnet0 rx_errs 0
vnet0 rx_drop 0
vnet0 tx_bytes 17577834
vnet0 tx_packets 264226
vnet0 tx_errs 0
vnet0 tx_drop 0
Roman Bogorodskiy (2):
util: virstatslinux: make more generic
Implement interface stats for BSD
configure.ac | 13 ++++-
po/POTFILES.in | 2 +-
src/Makefile.am | 2 +-
src/libvirt_linux.syms | 3 --
src/libvirt_private.syms | 2 +
src/lxc/lxc_driver.c | 2 +-
src/openvz/openvz_driver.c | 2 +-
src/qemu/qemu_driver.c | 16 +-----
src/uml/uml_driver.c | 2 +-
src/util/{virstatslinux.c => virstats.c} | 93 +++++++++++++++++++++++++-------
src/util/{virstatslinux.h => virstats.h} | 12 ++---
src/xen/xen_hypervisor.c | 2 +-
tests/statstest.c | 2 +-
13 files changed, 102 insertions(+), 51 deletions(-)
rename src/util/{virstatslinux.c => virstats.c} (61%)
rename src/util/{virstatslinux.h => virstats.h} (77%)
--
1.9.0
10 years, 4 months
Re: [libvirt] Enable kvm on aarch64, Cleanup F-16/18 conditionals
by Eric Blake
reposting to the upstream list - we'd like to keep the downstream .spec
file in sync with upstream, rather than needlessly diverging.
On 07/15/2014 10:52 AM, Peter Robinson wrote:
> commit ae37ed3500672f12383825c84dd5ae940fb90ff8
> Author: Peter Robinson <pbrobinson(a)gmail.com>
> Date: Tue Jul 15 17:52:18 2014 +0100
>
> Enable kvm on aarch64, Cleanup F-16/18 conditionals
>
> libvirt.spec | 28 ++++++++--------------------
> 1 files changed, 8 insertions(+), 20 deletions(-)
> ---
> diff --git a/libvirt.spec b/libvirt.spec
> index fad21d9..213760d 100644
> --- a/libvirt.spec
> +++ b/libvirt.spec
> @@ -55,14 +55,10 @@
>
> %define with_qemu_tcg %{with_qemu}
> # Change if we ever provide qemu-kvm binaries on non-x86 hosts
> -%if 0%{?fedora} >= 18
> - %if 0%{?fedora} >= 20
> - %define qemu_kvm_arches %{ix86} x86_64 ppc64 s390x %{arm}
> - %else
> - %define qemu_kvm_arches %{ix86} x86_64 ppc64 s390x
> - %endif
> +%if 0%{?fedora} >= 20
> + %define qemu_kvm_arches %{ix86} x86_64 %{power64} s390x %{arm} aarch64
> %else
> - %define qemu_kvm_arches %{ix86} x86_64
> + %define qemu_kvm_arches %{ix86} x86_64 %{power64} s390x
> %endif
>
> %ifarch %{qemu_kvm_arches}
> @@ -212,18 +208,6 @@
> %define with_xen 0
> %endif
>
> -# Fedora doesn't have any QEMU on ppc64 until FC16 - only ppc
> -%if 0%{?fedora} && 0%{?fedora} < 16
> - %ifarch ppc64
> - %define with_qemu 0
> - %endif
> -%endif
> -
> -# Fedora doesn't have new enough Xen for libxl until F18
> -%if 0%{?fedora} && 0%{?fedora} < 18
> - %define with_libxl 0
> -%endif
> -
> # PolicyKit was introduced in Fedora 8 / RHEL-6 or newer
> %if 0%{?fedora} >= 8 || 0%{?rhel} >= 6
> %define with_polkit 0%{!?_without_polkit:1}
> @@ -385,7 +369,7 @@
> Summary: Library providing a simple virtualization API
> Name: libvirt
> Version: 1.2.6
> -Release: 1%{?dist}%{?extra_release}
> +Release: 2%{?dist}%{?extra_release}
> License: LGPLv2+
> Group: Development/Libraries
> BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
> @@ -2236,6 +2220,10 @@ exit 0
> %doc examples/systemtap
>
> %changelog
> +* Tue Jul 15 2014 Peter Robinson <pbrobinson(a)fedoraproject.org> 1.2.6-2
> +- Enable kvm on aarch64
> +- Cleanup F-16/18 conditionals
> +
> * Wed Jul 2 2014 Daniel P. Berrange <berrange(a)redhat.com> - 1.2.6-1
> - Update to 1.2.6 release
>
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
10 years, 4 months
[libvirt] [PATCH 0/3] libxl: support hotplug of <interface> device
by Chunyan Liu
This patch series is to add support for attach/detaching an <interface>
device. At the same time, add two fixes (1/3 and 3/3)
Chunyan Liu (3):
libxl: add HOSTDEV type in libxlDomainDetachDeviceConfig
libxl: support hotplug of <interface>
libxl: fix return value error Attach|DetachDeviceFlags
.gnulib | 2 +-
src/libxl/libxl_domain.c | 12 ++-
src/libxl/libxl_driver.c | 193 +++++++++++++++++++++++++++++++++++++++++------
3 files changed, 180 insertions(+), 27 deletions(-)
--
1.8.4.5
10 years, 4 months
[libvirt] [PATCH v2 00/16] Support for per-guest-node binding
by Martin Kletzander
Currently we are only able to bind the whole domain to some host nodes
using the /domain/numatune/memory element. Numerous requests were
made to support host<->guest numa node bindings, so this series tries
to implement that using /domain/numatune/memnode elements.
That is incompatible with automatic numa placement (numad) since that
makes no sense.
Some of these patches were ACK'd in the previous round, but this
version completely rewrites the parsing and formatting of the numatune
XML element and places it into a separate file. Hence the repost of
all the patches even with those ACK'd ones.
Patches 1-3 move some code around, patch 4 adds cell id specification
into the XML (which is used later on). Then patches 5-7 rework the
numatune handling, which clears out some odd things, but mostly cleans
the parsing code. Patch 8 adds the support for memnode elements in
the XML conf code and together with patch 9 enables the use of it
outside numatune_conf.c. After that, I needed to probe qemu for 2
capabilities; for one of them patch 10 adds the possibility to probe
for it, then two following patches 11 and 12 add the probing data.
One of the capabilities tells us that we can use disjoint ranges (not
necessarily for the cpus= param) with qemu, so patch 13 makes a use of
it. Finally patch 14 uses the memnode data to tell qemu which host
nodes should be used for the allocations of memory blocks. Patch 15
does almost nothing, but the next patch looks better with it. And the
last patch, number 16, fixes a bug with KVM and cgroups.
One last note, APIs for handling the memnode settings will be added
later. I'm sending this to prepare the ground for Michal's work with
hugepages.
Martin Kletzander (16):
qemu: purely a code movement
qemu: remove useless error check
conf: purely a code movement
conf, schema: add 'id' field for cells
numatune: create new module for numatune
numatune: unify numatune struct and enum names
numatune: Encapsulate numatune configuration in order to unify results
conf, schema: add support for memnode elements
numatune: add support for per-node memory bindings in private APIs
qemu: allow qmp probing for cmdline options without params
qemu: memory-backend-ram capability probing
qemu: newer -numa parameter capability probing
qemu: enable disjoint numa cpu ranges
qemu: pass numa node binding preferences to qemu
qemu: split out cpuset.mems setting
qemu: leave restricting cpuset.mems after initialization
docs/formatdomain.html.in | 26 +-
docs/schemas/domaincommon.rng | 22 +
po/POTFILES.in | 1 +
src/Makefile.am | 3 +-
src/conf/cpu_conf.c | 39 +-
src/conf/cpu_conf.h | 3 +-
src/conf/domain_conf.c | 203 ++-----
src/conf/domain_conf.h | 10 +-
src/conf/numatune_conf.c | 589 +++++++++++++++++++++
src/conf/numatune_conf.h | 108 ++++
src/libvirt_private.syms | 24 +-
src/lxc/lxc_cgroup.c | 20 +-
src/lxc/lxc_controller.c | 5 +-
src/lxc/lxc_native.c | 15 +-
src/parallels/parallels_driver.c | 7 +-
src/qemu/qemu_capabilities.c | 16 +-
src/qemu/qemu_capabilities.h | 2 +
src/qemu/qemu_cgroup.c | 52 +-
src/qemu/qemu_cgroup.h | 4 +-
src/qemu/qemu_command.c | 98 +++-
src/qemu/qemu_driver.c | 84 ++-
src/qemu/qemu_monitor.c | 6 +-
src/qemu/qemu_monitor.h | 3 +-
src/qemu/qemu_monitor_json.c | 8 +-
src/qemu/qemu_monitor_json.h | 3 +-
src/qemu/qemu_process.c | 12 +-
src/util/virnuma.c | 61 +--
src/util/virnuma.h | 28 +-
tests/qemucapabilitiesdata/caps_1.6.50-1.caps | 1 +
tests/qemucapabilitiesdata/caps_1.6.50-1.replies | 5 +
tests/qemumonitorjsontest.c | 20 +-
.../qemuxml2argv-cpu-numa-disjoint.args | 6 +
.../qemuxml2argv-cpu-numa-disjoint.xml | 28 +
tests/qemuxml2argvdata/qemuxml2argv-cpu-numa1.xml | 6 +-
tests/qemuxml2argvdata/qemuxml2argv-cpu-numa2.xml | 6 +-
tests/qemuxml2argvdata/qemuxml2argv-cpu-numa3.xml | 25 +
.../qemuxml2argv-numatune-auto-prefer.xml | 29 +
.../qemuxml2argv-numatune-memnode-no-memory.args | 8 +
.../qemuxml2argv-numatune-memnode-no-memory.xml | 30 ++
.../qemuxml2argv-numatune-memnode-nocpu.xml | 25 +
.../qemuxml2argv-numatune-memnode.args | 11 +
.../qemuxml2argv-numatune-memnode.xml | 33 ++
.../qemuxml2argv-numatune-memnodes-problematic.xml | 31 ++
tests/qemuxml2argvtest.c | 12 +
.../qemuxml2xmlout-cpu-numa1.xml | 28 +
.../qemuxml2xmlout-cpu-numa2.xml | 28 +
.../qemuxml2xmlout-numatune-auto-prefer.xml | 29 +
.../qemuxml2xmlout-numatune-memnode.xml | 33 ++
tests/qemuxml2xmltest.c | 8 +
49 files changed, 1467 insertions(+), 387 deletions(-)
create mode 100644 src/conf/numatune_conf.c
create mode 100644 src/conf/numatune_conf.h
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-numa-disjoint.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-numa-disjoint.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-numa3.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-auto-prefer.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode-no-memory.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode-no-memory.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode-nocpu.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-memnodes-problematic.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-numa1.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-cpu-numa2.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-numatune-auto-prefer.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-numatune-memnode.xml
--
2.0.0
10 years, 4 months