1. 21 8月, 2012 1 次提交
    • E
      build: fix build with autoconf 2.59 · ba9c38b4
      Eric Blake 提交于
      Commit 350583c8 broke development on a RHEL 5 box, where the
      ancient Autoconf 2.59 lacks AS_VERSION_STRING.  Rather than
      backport the complex awk script that newer autoconf uses for
      true strverscmp comparisons from the shell, it was easier to
      just open-code a shell case statement.
      
      * configure.ac (qemu_version): Open-code a replacement for
      AS_VERSION_CHECK.
      ba9c38b4
  2. 14 8月, 2012 2 次提交
    • D
      Fix timebomb in LIBVIRT_VERSION_INFO calculation · 3b0cd660
      Daniel P. Berrange 提交于
      The way LIBVIRT_VERSION_INFO is calculated has a timebomb that
      will cause us to accidentally break soname when we change the
      major version number to a non-zero value !
      
      Given CURRENT:REVISION:AGE, libtool will generate
      
         libvirt.so.($CURRENT-$AGE).$AGE.$REVISION
      
      We set CURRENT to be MAJOR+MINOR and AGE to $MINOR, so as
      soon as MAJOR changes to non-zero, we get libvirt.so.1
      as the soname, eg  1.3.9 would create libvirt.so.1.3.9
      Looks natural but is not ABI compatible with libvirt.so.0.x.y
      
      The fix is to set CURRENT to always be exactly the same
      as AGE. We want to have the major version reflected in
      the so symlinks though. So then we set AGE to MAJOR*1000+MINOR
      eg, so 1.3.9 would create libvirt.so.0.1003.9 and libvirt
      2.51.3 would create libvirt.so.0.2051.3
      3b0cd660
    • M
      json: fix interface locale dependency · 43bfa23e
      Martin Kletzander 提交于
      libvirt creates invalid commands if wrong locale is selected. For
      example with locale that uses comma as a decimal point, JSON commands
      created with decimal numbers are invalid because comma separates the
      entries in JSON. Fortunately even when decimal point is affected,
      thousands grouping is not, because for grouping to be enabled with
      *printf, there has to be an apostrophe flag specified (and supported).
      
      This patch adds specific internal function for converting doubles to
      strings with C locale.
      43bfa23e
  3. 03 8月, 2012 1 次提交
    • E
      build: add stubs so mdns code can be unconditionally compiled · 1f6f723c
      Eric Blake 提交于
      The recent changes to the testsuite to validate exported symbols
      flushed out a case of unconditionally exporting symbols that
      were only conditionally compiled under HAVE_AVAHI.
      
      * src/Makefile.am (libvirt_net_rpc_server_la_SOURCES): Compile
      virnetservermdns unconditionally.
      * configure.ac (HAVE_AVAHI): Drop unused automake conditional.
      * src/rpc/virnetservermdns.c: Add fallbacks when Avahi is not
      present.
      1f6f723c
  4. 02 8月, 2012 2 次提交
    • D
      Avoid clash of base64 symbols · 7a054e99
      Daniel P. Berrange 提交于
      On Debian/Ubuntu, one of the libraries libvirt (indirectly) links
      with exports a symbol named 'base64_encode'. This takes precedence
      over GNULIB's base64_encode function during linking. Unfortunately
      they of course have different API semantics. To avoid this problem
      use a few #defines in config.h to rename the GNULIB provided
      function to have a 'libvirt_gl_' prefix
      7a054e99
    • D
      Rewrite virAtomic APIs using GLib's atomic ops code · 0c9fd4cf
      Daniel P. Berrange 提交于
      There are a few issues with the current virAtomic APIs
      
       - They require use of a virAtomicInt struct instead of a plain
         int type
       - Several of the methods do not implement memory barriers
       - The methods do not implement compiler re-ordering barriers
       - There is no Win32 native impl
      
      The GLib library has a nice LGPLv2+ licensed impl of atomic
      ops that works with GCC, Win32, or pthreads.h that addresses
      all these problems. The main downside to their code is that
      the pthreads impl uses a single global mutex, instead of
      a per-variable mutex. Given that it does have a Win32 impl
      though, we don't expect anyone to seriously use the pthread.h
      impl, so this downside is not significant.
      
      * .gitignore: Ignore test case
      * configure.ac: Check for which atomic ops impl to use
      * src/Makefile.am: Add viratomic.c
      * src/nwfilter/nwfilter_dhcpsnoop.c: Switch to new atomic
        ops APIs and plain int datatype
      * src/util/viratomic.h: inline impls of all atomic ops
        for GCC, Win32 and pthreads
      * src/util/viratomic.c: Global pthreads mutex for atomic
        ops
      * tests/viratomictest.c: Test validate to validate safety
        of atomic ops.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      0c9fd4cf
  5. 01 8月, 2012 1 次提交
  6. 19 7月, 2012 1 次提交
    • S
      Add a sheepdog backend for the storage driver · 29bc4fe6
      Sebastian Wiedenroth 提交于
      This patch brings support to manage sheepdog pools and volumes to libvirt.
      It uses the "collie" command-line utility that comes with sheepdog for that.
      
      A sheepdog pool in libvirt maps to a sheepdog cluster.
      It needs a host and port to connect to, which in most cases
      is just going to be the default of localhost on port 7000.
      
      A sheepdog volume in libvirt maps to a sheepdog vdi.
      To create one specify the pool, a name and the capacity.
      Volumes can also be resized later.
      
      In the volume XML the vdi name has to be put into the <target><path>.
      To use the volume as a disk source for virtual machines specify
      the vdi name as "name" attribute of the <source>.
      The host and port information from the pool are specified inside the host tag.
      
        <disk type='network'>
          ...
          <source protocol="sheepdog" name="vdi_name">
            <host name="localhost" port="7000"/>
          </source>
        </disk>
      
      To work right this patch parses the output of collie,
      so it relies on the raw output option. There recently was a bug which caused
      size information to be reported wrong. This is fixed upstream already and
      will be in the next release.
      Signed-off-by: NSebastian Wiedenroth <wiedi@frubar.net>
      29bc4fe6
  7. 17 7月, 2012 1 次提交
  8. 02 7月, 2012 1 次提交
    • D
      Release of libvirt-0.9.13 · 3a4d9d1e
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in: new version and
        documentation update
      * po/*.po*: updated and regenerated localizations
      3a4d9d1e
  9. 28 6月, 2012 1 次提交
  10. 25 6月, 2012 1 次提交
  11. 16 6月, 2012 1 次提交
    • E
      build: hoist qemu dependence on yajl to configure · 350583c8
      Eric Blake 提交于
      Commit 6e769eba made it a runtime error if libvirt was compiled
      without yajl support but targets a new enough qemu.  But enough
      users are hitting this on self-compiled libvirt that it is worth
      erroring out at compilation time, rather than an obscure failure
      when trying to use the built executable.
      
      * configure.ac: If qemu is requested and -version works, require
      yajl when qemu version is new enough.
      * src/qemu/qemu_capabilities.c (qemuCapsComputeCmdFlags): Add
      comment.
      350583c8
  12. 06 6月, 2012 1 次提交
    • E
      build: ensure storage driver is used · 3c3644d3
      Eric Blake 提交于
      Commit 1c275e9a accidentally dropped the storage driver from
      libvirtd, because it depended on a C preprocessor macro that
      was not defined.  Furthermore, if you do './configure
      --without-storage-dir --with-storage-disk' or any other combination
      where you explicitly build a subset of storage backends excluding
      the dir backend, then the build is broken.
      
      Based on analysis by Osier Yang.
      
      * configure.ac (WITH_STORAGE): Define top-level conditional.
      * src/Makefile.am (mod_LTLIBRARIES): Build driver even when
      storage_dir is disabled.
      * daemon/libvirtd.c: Pick up storage driver for any backend, not
      just dir.
      * daemon/Makefile.am (libvirtd_LDADD): Likewise.
      3c3644d3
  13. 30 5月, 2012 1 次提交
    • E
      build: fix testing of augeas files in VPATH builds · fb59cf7a
      Eric Blake 提交于
      Without this fix, a VPATH build (such as used by ./autobuild.sh)
      fails with messages like:
      
      make[3]: Entering directory `/home/remote/eblake/libvirt-tmp2/build/daemon'
      ../../build-aux/augeas-gentest.pl libvirtd.conf ../../daemon/test_libvirtd.aug.in test_libvirtd.aug
      cannot read libvirtd.conf: No such file or directory at ../../build-aux/augeas-gentest.pl line 38.
      
      Since the test files are not part of the tarball, we can generate
      them into the build dir, but rather than create a subdirectory
      just for the test file, it is easier to test them directly in
      libvirt.git/src.
      
      * daemon/Makefile.am (AUG_GENTEST): Factor out definition.
      (test_libvirtd.aug): Look for correct file.
      * src/Makefile.am (AUG_GENTEST): Use $(PERL).
      (qemu/test_libvirtd_qemu.aug, lxc/test_libvirtd_lxc.aug)
      (locking/test_libvirt_sanlock.aug): Rename to avoid subdirectories.
      (check-augeas-qemu, check-augeas-lxc, check-augeas-sanlock): Reflect
      location of built tests.
      * configure.ac (PERL): Substitute perl.
      fb59cf7a
  14. 28 5月, 2012 2 次提交
    • E
      build: silence libtool during tests · 1d22ba95
      Eric Blake 提交于
      Libtool is picky about linking against a module library (aka a .so);
      giving lots of warnings like this in the tests directory:
      
        CCLD   networkxml2argvtest
      
      *** Warning: Linking the executable networkxml2argvtest against the loadable module
      *** libvirt_driver_network.so is not portable!
      
      Fix that by splitting things into a convenience library which can
      be used directly by the tests, and making the real .so just wrap
      the convenience library.
      
      Based on a suggestion by Daniel P. Berrange.
      
      * configure.ac (--with-driver-modules): Fix help test.
      * src/Makefile.am (libvirt_driver_xen.la, libvirt_driver_libxl.la)
      (libvirt_driver_qemu.la, libvirt_driver_lxc.la)
      (libvirt_driver_uml.la): Factor into new convenience libraries.
      * tests/Makefile.am (xen_LDADDS, qemu_LDADDS, lxc_LDADDS)
      (networkxml2argvtest_LDADD): Link to convenience libraries, not
      shared libraries.
      1d22ba95
    • D
      Fix Win32 build by linking to ole32 · 7cd77b6b
      Daniel P. Berrange 提交于
      The CoTaskMemFree function requires the ole32 DLL to be
      linked against. Currently this is only done for the
      VirtualBox driver. Also add it to libvirt_util.la
      
      * configure.ac: Unconditionally add ole32 DLL to Win32
      * src/Makefile.am: Link old32 to libvirt_util.la
      7cd77b6b
  15. 26 5月, 2012 1 次提交
  16. 24 5月, 2012 2 次提交
    • D
      Default to enable driver modules for libvirtd · ff0f6a0e
      Daniel P. Berrange 提交于
      Always enable driver modules for libvirtd, if we have dlopen
      available. This allows more modular packaging by distros
      and ensures we don't break this config
      
      * configure.ac: Default to enable driver modules
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      ff0f6a0e
    • D
      Remove libvirt_test.la library · 6cd4b1fe
      Daniel P. Berrange 提交于
      The libvirt_test.la library was introduced to allow test suites
      to reference internal-only symbols. These days, nearly every
      symbol we care about is in src/libvirt_private.syms, so there
      is no need for libvirt_test.la to continue to exist
      
      * src/Makefile.am: Delete libvirt_test.la & add new .syms files
      * src/libvirt_private.syms: Export symbols needed by test suite
      * tests/Makefile.am: Link to libvirt_test.la. Ensure LXC tests link
        to network_driver.la
      * src/libvirt_esx.syms, src/libvirt_openvz.syms: Add exports needed
        by test suite
      6cd4b1fe
  17. 22 5月, 2012 1 次提交
    • W
      storage backend: Add RBD (RADOS Block Device) support · 74951ead
      Wido den Hollander 提交于
      This patch adds support for a new storage backend with RBD support.
      
      RBD is the RADOS Block Device and is part of the Ceph distributed storage
      system.
      
      It comes in two flavours: Qemu-RBD and Kernel RBD, this storage backend only
      supports Qemu-RBD, thus limiting the use of this storage driver to Qemu only.
      
      To function this backend relies on librbd and librados being present on the
      local system.
      
      The backend also supports Cephx authentication for safe authentication with
      the Ceph cluster.
      
      For storing credentials it uses the built-in secret mechanism of libvirt.
      Signed-off-by: NWido den Hollander <wido@widodh.nl>
      74951ead
  18. 16 5月, 2012 2 次提交
    • D
      Fix build compat with older libselinux for LXC · 7ba66ef2
      Daniel P. Berrange 提交于
      Most versions of libselinux do not contain the function
      selinux_lxc_contexts_path() that the security driver
      recently started using for LXC. We must add a conditional
      check for it in configure and then disable the LXC security
      driver for builds where libselinux lacks this function.
      
      * configure.ac: Check for selinux_lxc_contexts_path
      * src/security/security_selinux.c: Disable LXC security
        if selinux_lxc_contexts_path() is missing
      7ba66ef2
    • D
      Allow stack traces to be included with log messages · 54856395
      Daniel P. Berrange 提交于
      Sometimes it is useful to see the callpath for log messages.
      This change enhances the log filter syntax so that stack traces
      can be show by setting '1:+NAME' instead of '1:NAME'.
      
      This results in output like:
      
      2012-05-09 14:18:45.136+0000: 13314: debug : virInitialize:414 : register drivers
      /home/berrange/src/virt/libvirt/src/.libs/libvirt.so.0(virInitialize+0xd6)[0x7f89188ebe86]
      /home/berrange/src/virt/libvirt/tools/.libs/lt-virsh[0x431921]
      /lib64/libc.so.6(__libc_start_main+0xf5)[0x3a21e21735]
      /home/berrange/src/virt/libvirt/tools/.libs/lt-virsh[0x40a279]
      
      2012-05-09 14:18:45.136+0000: 13314: debug : virRegisterDriver:775 : driver=0x7f8918d02760 name=Test
      /home/berrange/src/virt/libvirt/src/.libs/libvirt.so.0(virRegisterDriver+0x6b)[0x7f89188ec717]
      /home/berrange/src/virt/libvirt/src/.libs/libvirt.so.0(+0x11b3ad)[0x7f891891e3ad]
      /home/berrange/src/virt/libvirt/src/.libs/libvirt.so.0(virInitialize+0xf3)[0x7f89188ebea3]
      /home/berrange/src/virt/libvirt/tools/.libs/lt-virsh[0x431921]
      /lib64/libc.so.6(__libc_start_main+0xf5)[0x3a21e21735]
      /home/berrange/src/virt/libvirt/tools/.libs/lt-virsh[0x40a279]
      
      * docs/logging.html.in: Document new syntax
      * configure.ac: Check for execinfo.h
      * src/util/logging.c, src/util/logging.h: Add support for
        stack traces
      * tests/testutils.c: Adapt to API change
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      54856395
  19. 14 5月, 2012 1 次提交
    • D
      Release of libvirt-0.9.12 · a25d5cfd
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in: updates for the release
      * po/*.po: pushed new sources and synchronized new languages translations
      a25d5cfd
  20. 10 5月, 2012 1 次提交
  21. 09 5月, 2012 1 次提交
    • O
      numad: Check numactl-devel if compiled with numad support · b0f32445
      Osier Yang 提交于
      Since now we pre-set memory policy using libnuma to fully
      drive numad, it needs to check numactl-devel if "with_numad"
      is "yes".
      
      configure with groups "--with-numad=yes --with-numactl=yes",
      "--with-numad=no --with-numactl=yes", "--with-numad=yes
      --with-numactl=yes" works fine after the change.
      b0f32445
  22. 04 5月, 2012 1 次提交
    • S
      build: support libnl-3 · 60fb8a22
      Serge Hallyn 提交于
      configure.ac: check for libnl-3 in addition to libnl-1
      
      src/Makefile.am: link against libnl when needed
      
      src/util/virnetlink.c:
      support libnl3 api.  To minimize impact on code flow, wrap the
      differences under the virNetlink* namespace.
      
      Unfortunately libnl3 moves netlink/msg.h to
      /usr/include/libnl3/netlink/msg.h, so the LIBNL_CFLAGS need to be added
      to a bunch of places where they weren't needed with libnl1.
      Signed-off-by: NSerge Hallyn <serge.hallyn@canonical.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      60fb8a22
  23. 28 4月, 2012 1 次提交
  24. 26 4月, 2012 1 次提交
    • E
      build: fix bootstrap on RHEL · bae13129
      Eric Blake 提交于
      Commit 8fe455fd tried to work around
      a regression introduced in upstream gnulib that requires gettext 0.18
      or newer on all projects using bootstrap, by making libvirt require
      gettext 0.18.  But this fails on RHEL 6.2, which still ships gettext
      0.17.  Revert that change, and instead, import the latest round of
      gnulib updates that fix that problem properly.
      
      If you have already built in the window where libvirt required 0.18,
      be aware that incremental updates may run into problems: this is
      because 'autopoint --force' will not downgrade m4/po.m4 back to an
      older version, but it must be downgraded back to 0.17 levels to work
      with this patch.  You may either manually remove that file then rerun
      bootstrap, or it may prove easier to just clean up all non-git files
      to start from a clean slate.
      
      * bootstrap.conf: Revert minimum gettext back to 0.17.
      * configure.ac: Likewise.
      * .gnulib: Update to latest, for bootstrap fixes.
      * bootstrap: Resync from gnulib.
      bae13129
  25. 24 4月, 2012 1 次提交
    • P
      build: Fix version of gettext macros · 8fe455fd
      Peter Krempa 提交于
      Commit c9cd419c added copying of the
      makefile for translation files from gnulib. The makefile from gnulib is
      of version 0.18 but the build configuration cretes macros from version
      0.17 which breaks the build with message:
      
      *** error: gettext infrastructure mismatch: using a Makefile.in.in from
      gettext version 0.18 but the autoconf macros are from gettext version
      0.17
      8fe455fd
  26. 20 4月, 2012 1 次提交
    • D
      The policy kit and HAL node device drivers both require a · 2223ea98
      Daniel P. Berrange 提交于
      DBus connection. The HAL device code further requires that
      the DBus connection is integrated with the event loop and
      provides such glue logic itself.
      
      The forthcoming FirewallD integration also requires a
      dbus connection with event loop integration. Thus we need
      to pull the current event loop glue out of the HAL driver.
      
      Thus we create src/util/virdbus.{c,h} files. This contains
      just one method virDBusGetSystemBus() which obtains a handle
      to the single shared system bus instance, with event glue
      automagically setup.
      2223ea98
  27. 15 4月, 2012 1 次提交
  28. 05 4月, 2012 1 次提交
  29. 03 4月, 2012 1 次提交
    • D
      Release of libvirt 0.9.11 · 782afa98
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in: update for the release
      * po/*.po*: updated a number of languages translation including new
        indian languages and regenerated
      782afa98
  30. 28 3月, 2012 2 次提交
    • D
      Enable all warnings permanently & default to -Werror for GIT builds · 851117bd
      Daniel P. Berrange 提交于
      Given that we auto-detect whether each -Wxxxx flag is supported by
      GCC, and we are warning-free and use automake silent rules, there
      is no compelling reason to allow compile warnings to be disabled.
      
      Replace the --enable-compile-warnings flag with a simpler
      --enable-werror flag, which defaults to 'yes' if building
      from GIT, or 'no' if building from tar.gz
      
      This helps ensure that everyone writing patches for libvirt will
      take care to fix their warning problems before submitting for
      review
      
      * autobuild.sh: Force -Werror
      * configure.ac: Update for LIBVIRT_COMPILE_WARNINGS macro change
      * m4/virt-compile-warnings.m4: Permanently enable all warnings,
        auto-enable Werror for GIT builds
      851117bd
    • D
      Enable build of test suite programs by default for GIT checkouts · 3a2fc277
      Daniel P. Berrange 提交于
      Add a new flag '--with-test-suite' to configure to control whether
      the test suite binaries are built by default. ie built with a
      plain 'make', as opposed to delayed until 'make check'
      
      For builds from tar.gz tests will not be built by default. For
      builds from GIT, tests with be on by default, to try and ensure
      that patch developers don't accidentally break the test suites
      without noticing.
      
      * configure.ac: Add --with-test-suite
      * tests/Makefile.am: Use noinst_PROGRAMS instead of check_PROGRAMS
        if building tests by default. Consolidate setting of TESTS and
        {noinst,check}_PROGRAMS to avoid duplication
      3a2fc277
  31. 27 3月, 2012 1 次提交
    • D
      Detect location fo selinux mount point · eb8f31c1
      Daniel P. Berrange 提交于
      The SELinux mount point moved from /selinux to /sys/fs/selinux
      when systemd came along.
      
      * configure.ac: Probe for SELinux mount point
      * src/lxc/lxc_container.c: Use SELinux mount point determined
        by configure.ac
      eb8f31c1
  32. 24 3月, 2012 1 次提交
  33. 15 3月, 2012 1 次提交
    • O
      qemu: Support numad · 0f8e7ae3
      Osier Yang 提交于
      numad is an user-level daemon that monitors NUMA topology and
      processes resource consumption to facilitate good NUMA resource
      alignment of applications/virtual machines to improve performance
      and minimize cost of remote memory latencies. It provides a
      pre-placement advisory interface, so significant processes can
      be pre-bound to nodes with sufficient available resources.
      
      More details: http://fedoraproject.org/wiki/Features/numad
      
      "numad -w ncpus:memory_amount" is the advisory interface numad
      provides currently.
      
      This patch add the support by introducing a new XML attribute
      for <vcpu>. e.g.
      
        <vcpu placement="auto">4</vcpu>
        <vcpu placement="static" cpuset="1-10^6">4</vcpu>
      
      The returned advisory nodeset from numad will be printed
      in domain's dumped XML. e.g.
        <vcpu placement="auto" cpuset="1-10^6">4</vcpu>
      
      If placement is "auto", the number of vcpus and the current
      memory amount specified in domain XML will be used for numad
      command line (numad uses MB for memory amount):
        numad -w $num_of_vcpus:$current_memory_amount / 1024
      
      The advisory nodeset returned from numad will be used to set
      domain process CPU affinity then. (e.g. qemuProcessInitCpuAffinity).
      
      If the user specifies both CPU affinity policy (e.g.
      (<vcpu cpuset="1-10,^7,^8">4</vcpu>) and placement == "auto"
      the specified CPU affinity will be overridden.
      
      Only QEMU/KVM drivers support it now.
      
      See docs update in patch for more details.
      0f8e7ae3
  34. 27 2月, 2012 1 次提交
    • P
      util: Add helpers for safe domain console operations · 3f4238d7
      Peter Krempa 提交于
      This patch adds a set of functions used in creating console streams for
      domains using PTYs and ensures mutually exclusive access to the PTYs.
      
      If mutually exclusive access is not used, two clients may open the same
      console, which results in corruption on both clients as both of them
      race to read data from the PTY.
      
      Two approaches are used to ensure this:
      1) Internal data structure holding open PTYs.
              This is used internally and enables the user to forcibly
              terminate another console connection eg. when somebody leaves
              the console open on another host.
      
      2) UUCP style lock files:
              This uses UUCP lock files according to the  FHS
              ( http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES )
              to check if other programs (like minicom) are not using the pty
              device of the console.
      
              This feature is disabled by default and may be enabled using
              configure parameter
              --with-console-lock-files=/path/to/lock/file/directory
              or --with-console-lock-files=auto (which tries to infer the
              location from OS used (currently only linux).
      
              On usual linux systems, normal users may not write to the
              /var/lock directory containing the locks. This poses problems
              while in session mode. If the current user has no access to the
              lockfile directory, check for presence of the file is still
              done, but no lock file is created. This does NOT result in an
              error.
      3f4238d7