[libvirt] [PATCH] iohelper: Don't try to fdatasync(stdout)
by Christophe Fergeau
After upgrading to libvirt 1.0.0, I've started getting warnings
from libvirt:
(gnome-boxes:5965): Libvirt.GObject-CRITICAL **: cannot finish stream:
internal error libvirt_iohelper: unable to fsync stdout: Invalid argument
On further investigation, in iohelper.c:runIO(), fdatasync can get called
on STDOUT_FILENO, which indeed returns EINVAL when this happens. After
making sure that fdout is not STDOUT_FILENO, this warning goes away.
---
src/util/iohelper.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/util/iohelper.c b/src/util/iohelper.c
index 860e14a..f8a8ee3 100644
--- a/src/util/iohelper.c
+++ b/src/util/iohelper.c
@@ -180,9 +180,11 @@ runIO(const char *path, int fd, int oflags, unsigned long long length)
}
/* Ensure all data is written */
- if (fdatasync(fdout) < 0) {
- virReportSystemError(errno, _("unable to fsync %s"), fdoutname);
- goto cleanup;
+ if (fdout != STDOUT_FILENO) {
+ if (fdatasync(fdout) < 0) {
+ virReportSystemError(errno, _("unable to fsync %s"), fdoutname);
+ goto cleanup;
+ }
}
ret = 0;
--
1.7.12.1
12 years
[libvirt] jna problem
by Matthieu Simonin
Hello,
Since this morning i got this exception throwed by the libvirt-java :
java.lang.UnsatisfiedLinkError: com.sun.jna.Native.pointerSize()I
at com.sun.jna.Native.pointerSize(Native Method)
What could be the problem ? Is it related to an update of my distribution ?
Bye,
Matt
12 years
[libvirt] [PATCHv4 00/51] another round of snapshot patches
by Eric Blake
I think I've addressed most findings from round 3 - by implementing
the ability to redefine a snapshot, it becomes possible to restore
snapshot hierarchy when recreating a transient domain by the same
name. New goodies in this round: several bug fixes, add virsh
snapshot-edit, drop undefine --snapshots-full (you can only remove
snapshot metadata on undefine). I tested as I went, but this went
through so many rebases that there may be some nasties that snuck
in; but I wanted to get this posted now. I also know that I'm
missing at least one major feature requested in the v3 review:
namely, transient domains _should_ auto-remove snapshot metadata
files when they halt, but right now aren't doing that.
v3 was at:
https://www.redhat.com/archives/libvir-list/2011-August/msg01132.html
Also available here:
git fetch git://repo.or.cz/libvirt/ericb.git snapshot
or browse online at:
http://repo.or.cz/w/libvirt/ericb.git/shortlog/refs/heads/snapshot
I'm also trying to group things by several bugzilla related to
various patches (looks like I still need to create a few):
Eric Blake (51):
https://bugzilla.redhat.com/show_bug.cgi?id=674537
snapshot: fix corner case on OOM during creation
https://bugzilla.redhat.com/show_bug.cgi?id=733762
snapshot: better events when starting paused
snapshot: fine-tune ability to start paused
snapshot: expose --running and --paused in virsh
snapshot: fine-tune qemu saved images starting paused
snapshot: improve reverting to qemu paused snapshots
snapshot: properly revert qemu to offline snapshots
snapshot: fine-tune qemu snapshot revert states
no bug filed yet... should be one about no stale metadata
snapshot: allow deletion of just snapshot metadata
snapshot: add snapshot-list --parent to virsh
https://bugzilla.redhat.com/show_bug.cgi?id=733529
snapshot: speed up snapshot location
snapshot: avoid crash when deleting qemu snapshots
snapshot: track current domain across deletion of children
snapshot: simplify acting on just children
no bug filed yet... should be one about no stale metadata
snapshot: let qemu discard only snapshot metadata
snapshot: identify which snapshots have metadata
snapshot: reflect new dumpxml and list options in virsh
snapshot: identify qemu snapshot roots
snapshot: allow recreation of metadata
snapshot: refactor virsh snapshot creation
snapshot: improve virsh snapshot-create, add snapshot-edit
snapshot: add qemu snapshot creation without metadata
no bug filed yet... should be one about snapshot migration
snapshot: add qemu snapshot redefine support
snapshot: prevent stranding snapshot data on domain destruction
snapshot: teach virsh about new undefine flags
snapshot: refactor some qemu code
snapshot: cache qemu-img location
snapshot: support new undefine flags in qemu
snapshot: prevent migration from stranding snapshot data
https://bugzilla.redhat.com/show_bug.cgi?id=638510
snapshot: refactor domain xml output
snapshot: allow full domain xml in snapshot
snapshot: correctly escape generated xml
snapshot: update rng to support full domain in xml
snapshot: store qemu domain details in xml
snapshot: additions to domain xml for disks
snapshot: reject transient disks where code is not ready
snapshot: introduce new deletion flag
snapshot: expose new delete flag in virsh
snapshot: allow halting after snapshot
snapshot: expose halt-after-creation in virsh
snapshot: wire up new qemu monitor command
snapshot: support extra state in snapshots
snapshot: add <disks> to snapshot xml
snapshot: also support disks by path
snapshot: add virsh domblklist command
snapshot: add flag for requesting disk snapshot
snapshot: wire up disk-only flag to snapshot-create
snapshot: reject unimplemented disk snapshot features
snapshot: make it possible to audit external snapshot
snapshot: wire up live qemu disk snapshots
snapshot: use SELinux and lock manager with external snapshots
docs/formatdomain.html.in | 40 +-
docs/formatsnapshot.html.in | 269 ++-
docs/schemas/Makefile.am | 1 +
docs/schemas/domain.rng | 2555 +-------------------
docs/schemas/{domain.rng => domaincommon.rng} | 32 +-
docs/schemas/domainsnapshot.rng | 84 +-
examples/domain-events/events-c/event-test.c | 37 +-
include/libvirt/libvirt.h.in | 66 +-
src/conf/domain_audit.c | 12 +-
src/conf/domain_audit.h | 4 +-
src/conf/domain_conf.c | 902 ++++++--
src/conf/domain_conf.h | 76 +-
src/esx/esx_driver.c | 38 +-
src/libvirt.c | 256 ++-
src/libvirt_private.syms | 8 +
src/libxl/libxl_conf.c | 5 +
src/libxl/libxl_driver.c | 11 +-
src/qemu/qemu_command.c | 5 +
src/qemu/qemu_conf.h | 1 +
src/qemu/qemu_driver.c | 1532 +++++++++---
src/qemu/qemu_hotplug.c | 18 +-
src/qemu/qemu_migration.c | 48 +-
src/qemu/qemu_migration.h | 2 -
src/qemu/qemu_monitor.c | 24 +
src/qemu/qemu_monitor.h | 4 +
src/qemu/qemu_monitor_json.c | 33 +
src/qemu/qemu_monitor_json.h | 4 +
src/qemu/qemu_monitor_text.c | 40 +
src/qemu/qemu_monitor_text.h | 4 +
src/qemu/qemu_process.c | 11 +-
src/uml/uml_driver.c | 56 +-
src/vbox/vbox_tmpl.c | 43 +-
src/xen/xend_internal.c | 12 +-
src/xenxs/xen_sxpr.c | 5 +
src/xenxs/xen_xm.c | 5 +
tests/domainsnapshotxml2xmlin/disk_snapshot.xml | 16 +
tests/domainsnapshotxml2xmlout/disk_snapshot.xml | 77 +
tests/domainsnapshotxml2xmlout/full_domain.xml | 35 +
.../qemuxml2argv-disk-snapshot.args | 7 +
.../qemuxml2argv-disk-snapshot.xml | 39 +
.../qemuxml2argv-disk-transient.xml | 27 +
tests/qemuxml2argvtest.c | 2 +
tests/virsh-optparse | 20 +
tools/virsh.c | 772 +++++-
tools/virsh.pod | 214 ++-
45 files changed, 3978 insertions(+), 3474 deletions(-)
copy docs/schemas/{domain.rng => domaincommon.rng} (98%)
create mode 100644 tests/domainsnapshotxml2xmlin/disk_snapshot.xml
create mode 100644 tests/domainsnapshotxml2xmlout/disk_snapshot.xml
create mode 100644 tests/domainsnapshotxml2xmlout/full_domain.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-snapshot.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-snapshot.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-transient.xml
--
1.7.4.4
12 years
[libvirt] [PATCH][reordered] gitignore: ignore more files
by liguang
ignore *.patch, cscope.po.out, cscope.in.out
Signed-off-by: liguang <lig.fnst(a)cn.fujitsu.com>
---
.gitignore | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
index 1cd2d45..3672131 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,7 @@
*.loT
*.o
*.orig
+*.patch
*.pyc
*.rej
*.s
@@ -184,7 +185,9 @@ Makefile.in
TAGS
coverage
cscope.files
+cscope.in.out
cscope.out
+cscope.po.out
results.log
stamp-h
stamp-h.in
--
1.7.1
12 years
[libvirt] [PATCH v5 1/6] add a configure option --with-fuse to prepare introduction of fuse support for libvirt lxc
by Gao feng
add a configure option --with-fuse to prepare introduction
of fuse support for libvirt lxc.
With help from Daniel
Signed-off-by: Gao feng <gaofeng(a)cn.fujitsu.com>
---
configure.ac | 36 ++++++++++++++++++++++++++++++++++++
libvirt.spec.in | 9 +++++++++
2 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index 8810efd..0cac7fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,6 +115,7 @@ LIBSSH2_REQUIRED="1.0"
LIBSSH2_TRANSPORT_REQUIRED="1.3"
LIBBLKID_REQUIRED="2.17"
DBUS_REQUIRED="1.0.0"
+FUSE_REQUIRED="2.8.6"
dnl Checks for C compiler.
AC_PROG_CC
@@ -1857,6 +1858,36 @@ AC_SUBST([CAPNG_CFLAGS])
AC_SUBST([CAPNG_LIBS])
+dnl libfuse
+AC_ARG_WITH([fuse],
+ AC_HELP_STRING([--with-fuse], [use libfuse to proivde fuse filesystem support for libvirt lxc]),
+ [],
+ [with_fuse=check])
+dnl
+dnl This check looks for 'fuse'
+dnl
+FUSE_CFLAGS=
+FUSE_LIBS=
+if test "x$with_fuse" != "xno"; then
+ PKG_CHECK_MODULES([FUSE], [fuse >= $FUSE_REQUIRED],
+ [with_fuse=yes], [
+ if test "x$with_fuse" = "xcheck" ; then
+ with_fuse=no
+ else
+ AC_MSG_ERROR(
+ [You must install fuse Library to compile libvirt])
+ fi
+ ])
+ if test "x$with_fuse" = "xyes" ; then
+ FUSE_LIBS="-lfuse"
+ FUSE_CFLAGS="-D_FILE_OFFSET_BITS=64"
+ AC_DEFINE_UNQUOTED([HAVE_FUSE], 1, [whether fuse is available for libvirt lxc])
+ fi
+fi
+AM_CONDITIONAL([HAVE_FUSE], [test "x$with_fuse" = "xyes"])
+AC_SUBST([FUSE_CFLAGS])
+AC_SUBST([FUSE_LIBS])
+
dnl virsh libraries
AC_CHECK_HEADERS([readline/readline.h])
@@ -3161,6 +3192,11 @@ AC_MSG_NOTICE([ capng: $CAPNG_CFLAGS $CAPNG_LIBS])
else
AC_MSG_NOTICE([ capng: no])
fi
+if test "$with_fuse" = "yes" ; then
+AC_MSG_NOTICE([ fuse: $FUSE_CFLAGS $FUSE_LIBS])
+else
+AC_MSG_NOTICE([ fuse: no])
+fi
if test "$with_xen" = "yes" ; then
AC_MSG_NOTICE([ xen: $XEN_CFLAGS $XEN_LIBS])
else
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 511949e..8fe0d77 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -93,6 +93,7 @@
# A few optional bits off by default, we enable later
%define with_polkit 0%{!?_without_polkit:0}
%define with_capng 0%{!?_without_capng:0}
+%define with_fuse 0%{!?_without_fuse:0}
%define with_netcf 0%{!?_without_netcf:0}
%define with_udev 0%{!?_without_udev:0}
%define with_hal 0%{!?_without_hal:0}
@@ -503,6 +504,9 @@ BuildRequires: numactl-devel
%if %{with_capng}
BuildRequires: libcap-ng-devel >= 0.5.0
%endif
+%if %{with_fuse}
+BuildRequires: fuse-devel >= 2.8.6
+%endif
%if %{with_phyp} || %{with_libssh2_transport}
%if %{with_libssh2_transport}
BuildRequires: libssh2-devel >= 1.3.0
@@ -1186,6 +1190,10 @@ of recent versions of Linux (and other OSes).
%define _without_capng --without-capng
%endif
+%if ! %{with_fuse}
+%define _without_fuse --without-fuse
+%endif
+
%if ! %{with_netcf}
%define _without_netcf --without-netcf
%endif
@@ -1289,6 +1297,7 @@ autoreconf -if
%{?_without_numactl} \
%{?_without_numad} \
%{?_without_capng} \
+ %{?_without_fuse} \
%{?_without_netcf} \
%{?_without_selinux} \
%{?_with_selinux_mount} \
--
1.7.7.6
12 years
[libvirt] for initial review: updated doc for DHCPv6
by Gene Czarcinski
I have taken a shot at updating the libvirt documentation for DHCPv6
support and am attaching the resulting patch.
This is a sanity check and not a submission. I will submit the
documentation patch when I submit the patches which actually do the work.
Is there any other documentation I should be updating?
Gene
12 years
[libvirt] [PATCH 0/2] Add new CPU flags and the AMD Opteron G5 model
by Peter Krempa
This series is based on the recent upstream submission of the new AMD CPU model.
Peter Krempa (2):
cpu: Add newly added cpu flags
cpu: Add AMD Opteron G5 cpu model
src/cpu/cpu_map.xml | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
--
1.7.12.4
12 years
[libvirt] Release of libvirt-1.0.0
by Daniel Veillard
Well we just crossed that important milestone in the life of any
project, so congratulation everybody the 1.0.0 release is out !!!
For a bit of history, this is actually the 7th birthday of the project
accounted from the first commit, on Nov 2 2005, public from day one !
CVS converted commit labelled "Initial revision" 2005-11-02 20:50:21
At the time I had one hypervisor (Xen) to play with, and except the
general idea and some of the earlier entry point there is nothing left
from that first commit, and that is just fine :-) !
Anyway back to useful informations, the release is as usual at:
ftp://libvirt.org/libvirt/
as a tarball and signed rpms.
For just over a month of development we are at nearly 350 commits so
the pace is apparently not slowing down! There is a number of important
improvements, but for a change I would like to point out the silent
work of our translators communities, work being done in the framework
of Transifex:
https://www.transifex.com/projects/p/libvirt/
we have around 10 languages with near complete translation, historically
we had 2 complete localization : japanese and ukrainian at 100% and
updating within hours of a new pot source file being pushed, in the last
month 5 new indian languages have completed, and various others have
made significant improvements. So to those group of people helping
mostly silently in the background I want to say Thank You, your work makes
a difference !!!
Features:
- virNodeGetCPUMap: Define public API. (Viktor Mihajlovski)
- Add systemd journal support (Daniel P. Berrange)
- Add a qemu capabilities cache manager (Daniel P. Berrange)
- USB migration support (Jiri Denemark)
- various improvement and fixes when using QMP QEmu interface
- Support for Xen 4.2 (Jim Fehlig)
- Lot of localization enhancements (Transifex teams)
Documentation:
- net-update docs: s/domain/network/ (Michal Privoznik)
- docs: libvirtd no longer uses abstract namespace (Eric Blake)
- documentation: HTML tag fix (Philipp Hahn)
- virsh: Fix POD syntax (Jiri Denemark)
- docs: Fix installation of internals/*.html (Cole Robinson)
- docs: virsh: clarify behavior of send-key (Cole Robinson)
- maint: fix license on polkit script (Eric Blake)
- doc: Sort out the relationship between <vcpu>, <vcpupin>, and <emulatorpin> (Osier Yang)
- Tweak comments in the policykit rules file (Cole Robinson)
- Various typos and misspellings (Ján Tomko)
- qemu: Fix misleading comment for qemuDomainObjBeginJobWithDriver() (Peter Krempa)
- Correct name of domain/pm/suspend-to-mem in docs (Zeeshan Ali (Khattak))
- doc: update description about user/group in qemu.conf (Marcelo Cerri)
- docs: Drop useless </p> in drvphyp.html.in (Michal Privoznik)
- docs: fix links in migration.html TOC (Eric Blake)
- doc: Add Maven repository to Java bindings documentation (Wido den Hollander)
- docs: rudimentary phyp documentation (Eric Blake)
- doc: update description about security labels on formatdomain.html (Marcelo Cerri)
- Add note about numeric domain names to manpage (Dave Allan)
- Fix typo in header file comment (Daniel P. Berrange)
- Update how to compile with -Werror (Doug Goldstein)
- node_memory: Improve the docs (Osier Yang)
Portability:
- Don't assume pid_t is the same size as an int (Daniel P. Berrange)
- build: Fix RPM build for non-x86 platforms (Viktor Mihajlovski)
- build: fix linking with systemtap probes (Eric Blake)
- parallels: fix build for some older compilers (Laine Stump)
- Fix build with apparmor (Jiri Denemark)
- build: use correct printf types for uid/gid (Eric Blake)
- spec: Fix multilib issue with systemtap tapsets (Cole Robinson)
- spec: Require newer sanlock on recent distros 2 (Jiri Denemark)
- spec: Add runtime requirement for libssh2 (Peter Krempa)
- spec: Require newer sanlock on recent distros (Jiri Denemark)
- locking: Fix build with sanlock < 2.4 (Jiri Denemark)
- Fix virProcessKillPainfully on Win32 (Daniel P. Berrange)
- Properly parse (unsigned) long long (Guido Günther)
- win32: Pretend that close-on-exec works (Matthias Bolte)
- build: fix VPATH builds (Eric Blake)
- build: avoid journald on rhel 5 (Eric Blake)
- build: fix bitmap conversion when !CPU_ALLOC (Eric Blake)
- Fix compilation of legacy xen driver with Xen 4.2 (Jim Fehlig)
- build: fix detection of netcf linked with libnl1 (Christophe Fergeau)
Bug Fixes:
- qemu: QMP capabilities support starts with 1.2 (Doug Goldstein)
- Linux Containers are not allowed to create device nodes. (Dan Walsh)
- qemu: Fix name comparison in qemuMonitorJSONBlockIoThrottleInfo() (Stefan Hajnoczi)
- qemu: Keep QEMU host drive prefix in BlkIoTune (Stefan Hajnoczi)
- iohelper: fdatasync() at the end (Michal Privoznik)
- conf: Fix private symbols exported by files in conf (Peter Krempa)
- Fix arch detection for qemu-system-i386 with QMP (Daniel P. Berrange)
- build: prefer mkostemp for multi-thread safety (Eric Blake)
- qemu: Fix EmulatorPinInfo without emulatorpin (Martin Kletzander)
- ip6tables rule removal (Gene Czarcinski)
- Create temporary dir for socket (Guido Günther)
- cpu: Fix definition of flag smap (Peter Krempa)
- nodeinfotest: Delete NUL bytes from test data (Peter Krempa)
- qemu: Do not ignore address for USB disks (Vladislav Bogdanov)
- esx: Fix connection to ESX 5.1 (Martin Kletzander)
- build: place attributes in correct location (Eric Blake)
- qemu: Fix domxml-to-native network model conversion (Cole Robinson)
- build: typo fix for qemu cpu affinity (Eric Blake)
- qemu: fix attach/detach of netdevs with matching mac addrs (Laine Stump)
- cpustat: fix regression when cpus are offline (Eric Blake)
- build: fix type-punning bug (Eric Blake)
- network: fix networkValidate check for default portgroup and vlan (Laine Stump)
- Fix detection of Xen sysctl version 9 (Jim Fehlig)
- selinux: Don't fail RestoreAll if file doesn't have a default label (Cole Robinson)
- xml: omit domain name from comment if it contains double hyphen (Ján Tomko)
- Fix disabling of apparmor/selinux security drivers (Christophe Fergeau)
- storage: Don't do wait loops from VolLookupByPath (Cole Robinson)
- qemu: Don't use -enable-nesting with qemu 1.2.0+ (Cole Robinson)
- qemu: Don't blindly assume VNC is supported (Doug Goldstein)
- test: Don't assume VNC is always available (Doug Goldstein)
- virsh: Fix segfault of snapshot-list (Osier Yang)
- qemu: Fix the unused parameter which causes the build failure (Osier Yang)
- daemon: Avoid 'Could not find keytab file' in syslog (Cole Robinson)
- network: don't allow multiple default portgroups (Laine Stump)
- network: always create dnsmasq hosts and addnhosts files, even if empty (Laine Stump)
- network: free/null newDef if network fails to start (Laine Stump)
- blockjob: avoid segv on early error (Eric Blake)
- selinux: relabel tapfd in qemuPhysIfaceConnect (Guannan Ren)
- qemu: Set arch to i686 if qemu-system-i386 is found (Guido Günther)
- qemu: Don't fail without emulatorpin or cpumask (Guido Günther)
- network: Set to NULL after virNetworkDefFree() (Michal Privoznik)
- spec: Fix dependency for lock-sanlock subpackage (Jiri Denemark)
- qemu: Correctly wait for spice to migrate (Michal Privoznik)
- qemu: Clear async job when p2p migration fails early (Jiri Denemark)
- selinux: fix wrong tapfd relablling (Guannan Ren)
- storage: lvm: lvcreate fails with allocation=0, don't do that (Cole Robinson)
- conf: Fix crash with cleanup (Martin Kletzander)
- Avoid straying </cpuset> (Guido Günther)
- conf: fix virDevicePCIAddressEqual args (Laine Stump)
- virsh: block SIGINT while getting BlockJobInfo (Ján Tomko)
- esx: Fix dynamic dispatch for types with more than one level of inheritance (Matthias Bolte)
- qemu: Fix QMP detection of QXL graphics (Jiri Denemark)
- Call curl_global_init from virInitialize to avoid thread-safety issues (Matthias Bolte)
- fix kvm_pv_eoi with kvmclock (Martin Kletzander)
- Fix typo in HAVE_DBUS automake conditional (Alexander Larsson)
- esx: Disable libcurl's use of signals to fix a segfault (Matthias Bolte)
- S390: Buffer too small for large CPU numbers. (Viktor Mihajlovski)
- Correct checking of virStrcpyStatic() return value (Kyle Mestery)
- qemu: Kill processes used for QMP caps probing (Jiri Denemark)
- qemu: Use proper agent entering function when freezing filesystems (Peter Krempa)
- lxc: Correctly report active cgroups (Michal Privoznik)
- build: avoid infinite autogen loop (Eric Blake)
- Avoid bogus I/O event errors when closing the QEMU monitor (Daniel P. Berrange)
- Fix QEMU test with 1.2.0 help output (Daniel P. Berrange)
- network: fix dnsmasq/radvd binding to IPv6 on recent kernels (Benjamin Cama)
- Fix regression starting QEMU instances without query-events (Daniel P. Berrange)
- Fix handling of itanium arch name in QEMU driver (Daniel P. Berrange)
- Fix potential deadlock when agent is closed (Daniel P. Berrange)
- Fix (rare) deadlock in QEMU monitor callbacks (Daniel P. Berrange)
- Don't skip over socket label cleanup (Daniel P. Berrange)
- Don't ignore return value of qemuProcessKill (Daniel P. Berrange)
- Fix deadlock in handling EOF in LXC monitor (Daniel P. Berrange)
- parallels: don't give null pointers to virBitmapEqual (Dmitry Guryanov)
- parallels: fix memory allocation (Dmitry Guryanov)
- qemu: wait for SPICE to migrate (Michal Privoznik)
- Don't use O_TRUNC when opening QEMU logfiles (Daniel P. Berrange)
- Fix start of containers with custom root filesystem (Daniel P. Berrange)
Improvements:
- cpumap: optimize for clients that don't need online count (Eric Blake)
- daemon: Make the default PolicyKit policy auth_admin_keep. (Richard W.M. Jones)
- util: Improve error reporting from absolutePathFromBaseFile helper (Peter Krempa)
- Make non-KVM machines work with QMP probing (Martin Kletzander)
- maint: log xml during volume creation (Eric Blake)
- util: do a better job of matching up pids with their binaries (Laine Stump)
- sanlock: Introduce 'user' and 'group' conf variables (Michal Privoznik)
- qemu: pass -usb and usb hubs earlier, so USB disks with static address are handled properly (Vladislav Bogdanov)
- qemu: Report errors from iohelper (Michal Privoznik)
- util: Re-format literal strings in virXMLEmitWarning (Peter Krempa)
- xml: print uuids in the warning (Ján Tomko)
- blockjob: relabel entire existing chain (Eric Blake)
- blockjob: allow mirroring under SELinux and cgroup (Eric Blake)
- blockjob: allow for existing files in block-copy (Eric Blake)
- blockjob: implement block copy for qemu (Eric Blake)
- blockjob: make block pivot safer (Eric Blake)
- blockjob: support pivot operation on cancel (Eric Blake)
- blockjob: return appropriate event and info (Eric Blake)
- blockjob: react to active block copy (Eric Blake)
- blockjob: add qemu capabilities related to block jobs (Eric Blake)
- build: check for pod errors (Eric Blake)
- build: silence compiler warning about signedness (Eric Blake)
- maint: Sort .gitignore (Peter Krempa)
- virsh: Remove --flags from nodesuspend (Jiri Denemark)
- snapshot: improve snapshot-list error message (Eric Blake)
- maint: ignore unsaved emacs files (Eric Blake)
- daemon: Fix LIBVIRT_DEBUG=1 default output (Cole Robinson)
- virNodeGetCPUMap: Add python binding (Viktor Mihajlovski)
- virNodeGetCPUMap: Implement driver support (Viktor Mihajlovski)
- virNodeGetCPUMap: Implement support function in nodeinfo (Viktor Mihajlovski)
- nodeinfo: improve probing node cpu bitmap (Eric Blake)
- bitmap: add virBitmapCountBits (Eric Blake)
- esx: Update version checks for vSphere 5.1 (Matthias Bolte)
- cpu: Add recently added cpu feature flags. (Peter Krempa)
- qemu: Prohibit chaning affinity of domain process if placement is 'auto' (Osier Yang)
- qemu: Keep the affinity when creating cgroup for emulator thread (Osier Yang)
- qemu: Add helper to prepare cpumap for affinity setting (Osier Yang)
- virNodeGetCPUMap: Implement virsh support. (Viktor Mihajlovski)
- libvirt.h.in: Add new cpumap macro VIR_CPU_USED (Viktor Mihajlovski)
- virNodeGetCPUMap: Implement wire protocol. (Viktor Mihajlovski)
- header: declare node memory parameter handling earlier (Eric Blake)
- header: declare typed parameter handling earlier (Eric Blake)
- build: improve FORTIFY_SOURCE usage (Eric Blake)
- qemu_migration: Transport OVS per-port data during live migration (Kyle Mestery)
- openvswitch: Add utility functions for getting and setting Open vSwitch per-port data (Kyle Mestery)
- qemu_migration: Add hooks to transport network data during migration (Kyle Mestery)
- build: print uids as unsigned (Eric Blake)
- storage: don't shadow global 'wait' declaration (Ján Tomko)
- maint: update to latest gnulib (Eric Blake)
- snapshot: sanity check when reusing file for snapshot (Eric Blake)
- storage: let format probing work on root-squash NFS (Eric Blake)
- migrate: v2: use VIR_DOMAIN_XML_MIGRATABLE when available (Ján Tomko)
- qemu: set seamless migration capability (Michal Privoznik)
- Log parameters passed to virFileMakePath (Cole Robinson)
- Log file name passed to virConfReadFile (Cole Robinson)
- blockjob: properly label disks for qemu block-commit (Eric Blake)
- blockjob: refactor qemu disk chain permission grants (Eric Blake)
- blockjob: implement shallow commit flag in qemu (Eric Blake)
- blockjob: wire up online qemu block-commit (Eric Blake)
- blockjob: manage qemu block-commit monitor command (Eric Blake)
- blockjob: remove unused parameters after previous patch (Eric Blake)
- storage: use cache to walk backing chain (Eric Blake)
- storage: cache backing chain while qemu domain is live (Eric Blake)
- storage: make it easier to find file within chain (Eric Blake)
- storage: remember relative names in backing chain (Eric Blake)
- storage: don't require caller to pre-allocate metadata struct (Eric Blake)
- storage: get entire metadata chain in one call (Eric Blake)
- storage: don't probe non-files (Eric Blake)
- storage: use enum for snapshot driver type (Eric Blake)
- storage: use enum for disk driver type (Eric Blake)
- storage: use enum for default driver type (Eric Blake)
- storage: match RNG to supported driver types (Eric Blake)
- storage: treat 'aio' like 'raw' at parse time (Eric Blake)
- storage: list more file types (Eric Blake)
- Autogenerate AUTHORS (Cole Robinson)
- qemu: Allow migration with host USB devices (Jiri Denemark)
- dist: added cpu/cpu_ppc_data.h to Makefile.am (Viktor Mihajlovski)
- qemu: Always format CPU topology (Jiri Denemark)
- qemu: Add support for HyperV Enlightenment feature "relaxed" (Peter Krempa)
- conf: Add support for HyperV Enlightenment features (Peter Krempa)
- conf: Make tri-state feature options more universal (Peter Krempa)
- qemu: Fixed default machine detection in qemuCapsParseMachineTypesStr (Viktor Mihajlovski)
- qemu: Pin the emulator when only cpuset is specified (Martin Kletzander)
- interface: add virInterfaceGetXMLDesc() in udev (Doug Goldstein)
- Implement CPU model driver for PowerPC (Li Zhang)
- Add one file cpu_ppc_data.h to define CPU data for PPC (Li Zhang)
- selinux: remove unused variables in socket labelling (Guannan Ren)
- storage: lvm: Don't overwrite lvcreate errors (Cole Robinson)
- Make virInitialize thread safe (Daniel P. Berrange)
- Add JSON serialization of virNetServerPtr objects for process re-exec() (Daniel P. Berrange)
- Add JSON serialization of virNetServerClientPtr objects for process re-exec() (Daniel P. Berrange)
- Add JSON serialization of virNetServerServicePtr objects for process re-exec() (Daniel P. Berrange)
- Add JSON serialization of virNetSocketPtr objects for process re-exec() (Daniel P. Berrange)
- Add JSON serialization of virLockSpacePtr objects for process re-exec() (Daniel P. Berrange)
- Introduce an internal API for handling file based lockspaces (Daniel P. Berrange)
- tests: Fix domain-events python test (Martin Kletzander)
- maint: prepare for next release number (Eric Blake)
- conf: add test for boot dev and order (Martin Kletzander)
- selinux: Use raw contexts 2 (Martin Kletzander)
- selinux: add security selinux function to label tapfd (Guannan Ren)
- Add support for SUSPEND_DISK event (Martin Kletzander)
- util: switch virLogEatParams to virLogSource (Ján Tomko)
- node_memory: Add new parameter field to tune the new sysfs knob (Osier Yang)
- qemu: reorganize qemuDomainChangeNet and qemuDomainChangeNetBridge (Laine Stump)
- conf: virDomainDeviceInfoCopy utility function (Laine Stump)
- qemu: Ignore def->cpumask if emulatorpin is specified (Osier Yang)
- conf: Ignore emulatorpin if vcpu placement is auto (Osier Yang)
- qemu: Initialize cpuset for hotplugged vcpu as def->cpuset (Osier Yang)
- qemu: Create or remove cgroup when doing vcpu hotpluging (Osier Yang)
- conf: Initialize the pinning policy for vcpus (Osier Yang)
- conf: Ignore vcpupin for not onlined vcpus when parsing (Osier Yang)
- Only keep one polkit rules file (Cole Robinson)
- daemon: Use $(AM_V_GEN) in a few more places (Cole Robinson)
- spec: Add support for libssh2 transport (Peter Krempa)
- selinux: Use raw contexts (Martin Kletzander)
- conf: Mark missing optional USB devices in domain XML (Jiri Denemark)
- virsh: remove reference to migration in blockcopy (Ján Tomko)
- qemu: Make save/restore with USB devices usable (Jiri Denemark)
- Add MIGRATABLE flag for virDomainGetXMLDesc (Jiri Denemark)
- qemu: Implement startupPolicy for USB passed through devices (Jiri Denemark)
- qemu: Add option to treat missing USB devices as success (Jiri Denemark)
- qemu: Introduce qemuFindHostdevUSBDevice (Jiri Denemark)
- conf: Add support for startupPolicy for USB devices (Jiri Denemark)
- locking: Implement lock failure action in sanlock driver (Jiri Denemark)
- locking: Add support for lock failure action (Jiri Denemark)
- locking: Pass hypervisor driver name when acquiring locks (Jiri Denemark)
- locking: Add const char * parameter to avoid ugly typecasts (Jiri Denemark)
- conf: Add on_lockfailure event configuration (Jiri Denemark)
- conf: Rename life cycle actions to event actions (Jiri Denemark)
- storage: Report UUID/name consistently in driver errors (Cole Robinson)
- Change qemuSetSchedularParameters to use AFFECT_CURRENT (Daniel P. Berrange)
- interface: add udevIfaceIsActive() to udev backend (Doug Goldstein)
- interface: always build all available backends (Doug Goldstein)
- interface: fix netcf based backend naming (Doug Goldstein)
- interface: add udev based backend for virInterface (Doug Goldstein)
- hooks: let virCommand do the error reporting (Eric Blake)
- nodeinfo: Fully convert to new virReportError (Michal Privoznik)
- virsh: add qemu-monitor-command --pretty (Eric Blake)
- security: update user and group parsing in security_dac.c (Marcelo Cerri)
- util: extend virGetUserID and virGetGroupID to support names and IDs (Marcelo Cerri)
- python: keep consistent handling of Python integer conversion (Guannan Ren)
- python: cleanup vcpu related binding APIs (Guannan Ren)
- Check for private symbols presence as well (Michal Privoznik)
- spec: prefer canonical name of util-linux (Eric Blake)
- build: update gnulib for FreeBSD build (Eric Blake)
- security: also parse user/group names instead of just IDs for DAC labels (Marcelo Cerri)
- build: avoid -Wno-format on new-enough gcc (Eric Blake)
- build: fix typo in debug message (Eric Blake)
- hyperv: Fix and improve hypervListAllDomains (Matthias Bolte)
- esx: Fix and improve esxListAllDomains function (Matthias Bolte)
- build: default selinuxfs mount point to /sys/fs/selinux (Daniel J Walsh)
- Add support for detecting capablities using QMP commands (Daniel P. Berrange)
- Ignore error from query-cpu-definitions (Daniel P. Berrange)
- Remove need to pass in a virDomainObjPtr instance to qemuMonitorOpen (Daniel P. Berrange)
- ARMHF: implement /proc/cpuinfo parsing (Chuck Short)
- Automatically enable systemd journal logging (Daniel P. Berrange)
- Refactor qemuCapsParseDeviceStr to work from data tables (Daniel P. Berrange)
- Don't initialize logging twice in libvirtd (Daniel P. Berrange)
- Change logging category parameter into an enum (Daniel P. Berrange)
- Include filename explicitly in logging APIs (Daniel P. Berrange)
- Whitespace cleanup in logging files (Daniel P. Berrange)
- s/int/virLogDestination/ in logging code (Daniel P. Berrange)
- s/long long/size_t/ for file line numbers in logging code (Daniel P. Berrange)
- s/int/virLogPriority/ in logging code (Daniel P. Berrange)
- python: return error if PyObject obj is NULL for unwrapper helper functions (Guannan Ren)
- Pass the "raw" log message to each virLogOutputFunc (Miloslav Trmač)
- Split priority conversion from virLogOutputToSyslog (Miloslav Trmač)
- Move command/event capabilities detection out of QEMU monitor code (Daniel P. Berrange)
- Remove some unused includes in QEMU code (Daniel P. Berrange)
- Add a qemuMonitorGetTargetArch() method for QMP query-target command (Daniel P. Berrange)
- Add a qemuMonitorGetObjectProps() method for QMP device-list-properties command (Daniel P. Berrange)
- Add a qemuMonitorGetObjectTypes() method for QMP qom-list-types command (Daniel P. Berrange)
- Add a qemuMonitorGetEvents() method for QMP query-events command (Daniel P. Berrange)
- Add a qemuMonitorGetCommands() method for QMP query-commands command (Daniel P. Berrange)
- Add a qemuMonitorGetCPUDefinitions method for QMP query-cpu-definitions command (Daniel P. Berrange)
- Add a qemuMonitorGetMachines() method for QMP query-machines command (Daniel P. Berrange)
- Add a qemuMonitorGetVersion() method for QMP query-version command (Daniel P. Berrange)
- Refactor guest init to support qemu-system-i386 binary too (Daniel P. Berrange)
- Make qemuCapsProbeMachineTypes & qemuCapsProbeCPUModels static (Daniel P. Berrange)
- Remove probing of CPU models when launching QEMU guests (Daniel P. Berrange)
- Remove probing of machine types when canonicalizing XML (Daniel P. Berrange)
- Remove probing of flags when launching QEMU guests (Daniel P. Berrange)
- Switch over to use cache for building QEMU capabilities (Daniel P. Berrange)
- Use size_t instead of int for virDomainDefPtr struct (Daniel P. Berrange)
- Move most of qemuProcessKill into virProcessKillPainfully (Daniel P. Berrange)
- Support Xen sysctl version 9 in Xen 4.2 (Jim Fehlig)
- network: backend for virNetworkUpdate of interface list (Laine Stump)
- build: avoid older gcc warning (Eric Blake)
- Simplify some redundant locking while unref'ing objects (Daniel P. Berrange)
- Convert virLXCMonitor to use virObject (Daniel P. Berrange)
- Move virProcess{Kill,Abort,TranslateStatus} into virprocess.{c,h} (Daniel P. Berrange)
- Move virProcessKill into virprocess.{h,c} (Daniel P. Berrange)
- Rename virCommandTranslateStatus to virProcessTranslateStatus (Daniel P. Berrange)
- Rename virPid{Abort,Wait} to virProcess{Abort,Wait} (Daniel P. Berrange)
- Rename virKillProcess to virProcessKill (Daniel P. Berrange)
- qemu: Avoid holding the driver lock in trivial snapshot API's (Peter Krempa)
- storage: Add timeout for iscsi volume's stable path discovery (Osier Yang)
- tests: test previous commit (Eric Blake)
- command: Change virCommandAddEnv so it replaces existing environment variables. (Richard W.M. Jones)
- command: Move environ-adding code to common function virCommandAddEnv. (Richard W.M. Jones)
Cleanups:
- gitignore: Ignore 'tags' (Michal Privoznik)
- build: fix syntax-check tab violation (Eric Blake)
- maint: consistent whitespace after 'if' (Eric Blake)
- Remove a couple duplicates from AUTHORS.in (Cole Robinson)
- qemu: Cleanup the unused 'nodeinfo' (Osier Yang)
- AUTHORS: Remove double entry (Michal Privoznik)
- Doc-fix for PowerPC CPU model driver (Li Zhang)
- Fix typo in previous commit s/lik/like/ (Daniel P. Berrange)
- maint: drop spurious semicolons (Eric Blake)
- Fix tab vs space (Guido Günther)
- private.syms: Drop virKillProcess (Michal Privoznik)
- Remove xenner support (Daniel P. Berrange)
- parallels: remove unneded code from parallelsDoCmdRun (Dmitry Guryanov)
- parallels: remove unused member 'os' from parallelsDomObj (Dmitry Guryanov)
- Remove pointless virLXCProcessMonitorDestroy method (Daniel P. Berrange)
So thanks everybody for the help assembling that milestone version,
and let's celebrate :-) !!!
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
12 years
[libvirt] [PATCH] cpumap: optimize for clients that don't need online count
by Eric Blake
It turns out that calling virNodeGetCPUMap(conn, NULL, NULL, 0)
is both useful, and with Viktor's patches, common enough to
optimize. Since this interface hasn't been released yet, we
can change the RPC call.
* src/nodeinfo.c (nodeGetCPUMap): Avoid bitmap when not needed.
* src/remote/remote_protocol.x (remote_node_get_cpu_map_args):
Supply two separate flags for needed arguments.
* src/remote/remote_driver.c (remoteNodeGetCPUMap): Update
caller.
* daemon/remote.c (remoteDispatchNodeGetCPUMap): Likewise.
* src/remote_protocol-structs: Regenerate.
---
This has to be applied before 1.0.0 if we want it; otherwise the
change to RPC wire protocol will render this patch an ABI break.
I thought of one alternative, that wouldn't change the RPC size,
but still would be a difference. That would be using the old
need_results int as a bitmap of which of the two arguments are
needed, instead of just a 1 or 0. But even that is risky enough
that it should get in before we commit to this interface.
daemon/remote.c | 8 ++++----
src/nodeinfo.c | 3 +++
src/remote/remote_driver.c | 3 ++-
src/remote/remote_protocol.x | 3 ++-
src/remote_protocol-structs | 3 ++-
5 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/daemon/remote.c b/daemon/remote.c
index 7a9df60..340d07d 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -4578,7 +4578,7 @@ remoteDispatchNodeGetCPUMap(virNetServerPtr server ATTRIBUTE_UNUSED,
remote_node_get_cpu_map_ret *ret)
{
unsigned char *cpumap = NULL;
- unsigned int online;
+ unsigned int online = 0;
unsigned int flags;
int cpunum;
int rv = -1;
@@ -4592,13 +4592,13 @@ remoteDispatchNodeGetCPUMap(virNetServerPtr server ATTRIBUTE_UNUSED,
flags = args->flags;
- cpunum = virNodeGetCPUMap(priv->conn, args->need_results ? &cpumap : NULL,
- &online, flags);
+ cpunum = virNodeGetCPUMap(priv->conn, args->need_map ? &cpumap : NULL,
+ args->need_online ? &online : NULL, flags);
if (cpunum < 0)
goto cleanup;
/* 'serialize' return cpumap */
- if (args->need_results) {
+ if (args->need_map) {
ret->cpumap.cpumap_len = VIR_CPU_MAPLEN(cpunum);
ret->cpumap.cpumap_val = (char *) cpumap;
cpumap = NULL;
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index 35c5f96..3348ae7 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -1277,6 +1277,9 @@ nodeGetCPUMap(virConnectPtr conn ATTRIBUTE_UNUSED,
virCheckFlags(0, -1);
+ if (!cpumap && !online)
+ return nodeGetCPUCount();
+
if (!(cpus = nodeGetCPUBitmap(&maxpresent)))
goto cleanup;
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 71218f0..5eca0fa 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -5793,7 +5793,8 @@ remoteNodeGetCPUMap(virConnectPtr conn,
remoteDriverLock(priv);
- args.need_results = !!cpumap;
+ args.need_map = !!cpumap;
+ args.need_online = !!online;
args.flags = flags;
memset (&ret, 0, sizeof(ret));
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 765ffcd..d6ac3c1 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -2671,7 +2671,8 @@ struct remote_node_get_memory_parameters_ret {
};
struct remote_node_get_cpu_map_args {
- int need_results;
+ int need_map;
+ int need_online;
unsigned int flags;
};
diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
index 567864a..6fe7213 100644
--- a/src/remote_protocol-structs
+++ b/src/remote_protocol-structs
@@ -2127,7 +2127,8 @@ struct remote_node_get_memory_parameters_ret {
int nparams;
};
struct remote_node_get_cpu_map_args {
- int need_results;
+ int need_map;
+ int need_online;
u_int flags;
};
struct remote_node_get_cpu_map_ret {
--
1.7.11.7
12 years