1. 16 5月, 2012 1 次提交
    • 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
  2. 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
  3. 10 5月, 2012 1 次提交
  4. 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
  5. 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
  6. 28 4月, 2012 1 次提交
  7. 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
  8. 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
  9. 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
  10. 15 4月, 2012 1 次提交
  11. 05 4月, 2012 1 次提交
  12. 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
  13. 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
  14. 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
  15. 24 3月, 2012 1 次提交
  16. 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
  17. 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
  18. 25 2月, 2012 1 次提交
    • D
      Workaround python header file insanity · 1d4c4d9d
      Daniel P. Berrange 提交于
      The /usr/include/python/pyconfig.h file pollutes the global
      namespace with a huge number of HAVE_XXX and WITH_XXX
      defines. These change what we detected in our own config.h
      In particular if you try to build without DTrace, python's
      headers turn it back on with predictable fail.
      
      THe hack to workaround this is to rename WITH_DTRACE to
      WITH_DTRACE_PROBES to avoid the namespace clash
      1d4c4d9d
  19. 22 2月, 2012 1 次提交
    • M
      configure: Define program name if not found · 2b38e59b
      Michal Privoznik 提交于
      AC_CHECK_PROG checks for program in given path. However, if it doesn't
      exists, [variable] is set to [value-if-not-found]. We don't want this
      to be the empty string in case of 'modprobe' and 'scrub' as we want to
      fallback to runtime detection.
      2b38e59b
  20. 16 2月, 2012 2 次提交
    • M
      storage: Allow runtime detection of scrub · 28608856
      Michal Privoznik 提交于
      Currently, if scrub (used for wiping algorithms) is not present
      at compile time, we don't support any other wiping algorithms than
      zeroing, even if it was installed later. Switch to runtime detection
      instead.
      28608856
    • A
      network: support Open vSwitch · df810046
      Ansis Atteka 提交于
      This patch allows libvirt to add interfaces to already
      existing Open vSwitch bridges. The following syntax in
      domain XML file can be used:
      
          <interface type='bridge'>
            <mac address='52:54:00:d0:3f:f2'/>
            <source bridge='ovsbr'/>
            <virtualport type='openvswitch'>
              <parameters interfaceid='921a80cd-e6de-5a2e-db9c-ab27f15a6e1d'/>
            </virtualport>
            <address type='pci' domain='0x0000' bus='0x00'
                                slot='0x03' function='0x0'/>
          </interface>
      
      or if libvirt should auto-generate the interfaceid use
      following syntax:
      
          <interface type='bridge'>
            <mac address='52:54:00:d0:3f:f2'/>
            <source bridge='ovsbr'/>
            <virtualport type='openvswitch'>
            </virtualport>
            <address type='pci' domain='0x0000' bus='0x00'
                                slot='0x03' function='0x0'/>
          </interface>
      
      It is also possible to pass an optional profileid. To do that
      use following syntax:
      
         <interface type='bridge'>
           <source bridge='ovsbr'/>
           <mac address='00:55:1a:65:a2:8d'/>
           <virtualport type='openvswitch'>
             <parameters interfaceid='921a80cd-e6de-5a2e-db9c-ab27f15a6e1d'
                         profileid='test-profile'/>
           </virtualport>
         </interface>
      
      To create Open vSwitch bridge install Open vSwitch and
      run the following command:
      
          ovs-vsctl add-br ovsbr
      df810046
  21. 13 2月, 2012 1 次提交
    • D
      Release of libvirt-0.9.10 · bca060a3
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in: updated for the release
      * po/*.po*: update ja, it and uk localization, fixed the ja one
      bca060a3
  22. 26 1月, 2012 1 次提交
    • M
      storage: Support different wiping algorithms · adb99a05
      Michal Privoznik 提交于
      Currently, we support only filling a volume with zeroes on wiping.
      However, it is not enough as data might still be readable by
      experienced and equipped attacker. Many technical papers have been
      written, therefore we should support other wiping algorithms.
      adb99a05
  23. 23 1月, 2012 1 次提交
    • E
      build: skip lxc with too-old glibc · 4c18acff
      Eric Blake 提交于
      Since we already require the kernel to be new enough to support
      LO_FLAGS_AUTOCLEAR, we might as well also require glibc to be
      new enough to support epoll_create1().
      
      * configure.ac (with_lxc): We require glibc 2.9 for LXC.
      Reported and tested by Philipp Hahn.
      4c18acff
  24. 11 1月, 2012 1 次提交
    • D
      Disable netcf if building without libvirtd · ba61012c
      Daniel P. Berrange 提交于
      Although the netcf interface driver can in theory be used by
      the stateless drivers, in practice none of them want to use
      it because they have different ways of dealing with interfaces.
      
      Furthermore, if you have mingw32-netcf installed, then the
      libvirt mingw32 build will fail with
      
        ../../src/interface/netcf_driver.c:644:5: error: unknown field 'close_used_without_including_unistd_h' specified in initializer
      
       * configure.ac: disable netcf if built without libvirtd
      ba61012c
  25. 07 1月, 2012 1 次提交
    • D
      Release of libvirt-0.9.9 · 2f667b56
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in: update for the release
      * po/*.po*: updated localizations from transifex and regenerated
      2f667b56
  26. 06 1月, 2012 1 次提交
    • E
      build: drop check for ANSI compiler · 307f3635
      Eric Blake 提交于
      Using automake.git (will become 1.12 someday), I got this error:
      
      configure.ac:90: error: automatic de-ANSI-fication support has been removed
      /usr/local/share/aclocal-1.11a/protos.m4:13: AM_C_PROTOTYPES is expanded from...
      configure.ac:90: the top level
      autom4te: /usr/bin/m4 failed with exit status: 1
      
      In short, pre-C89 compilers are no longer a viable portability
      target.  Besides, our code base already requires C99, so worrying
      about pre-C89 seems pointless.
      
      * configure.ac (AM_C_PROTOTYPES): Drop, since newer automake no
      longer provides it.
      307f3635
  27. 16 12月, 2011 1 次提交
    • E
      build: disable dtrace on non-Linux builds · f9d60b19
      Eric Blake 提交于
      Using dtrace (and systemtap in general) is Linux-specific.
      Running ./autobuild.sh shows that attempting a cross-build to
      target mingw was mistakenly trying to build dtrace code, merely
      because it was present on the compilation host.
      
      * configure.ac (with_dtrace): Don't attempt to use dtrace when
      doing a cross-build hosted on Linux but targetting elsewhere.
      Reported by Daniel P. Berrange.
      f9d60b19
  28. 08 12月, 2011 1 次提交
    • D
      Release of libvirt-0.9.8 · 7c6b0653
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in: updated for the release
      * po/*.po*: fetched localization update and regenerated
      7c6b0653
  29. 02 12月, 2011 1 次提交
    • D
      Fix build for platforms lacking struct ifreq · 949e1091
      Daniel P. Berrange 提交于
      This ought to fix the build if you have net/if.h but do
      not have struct ifreq
      
      * configure.ac: Check for struct ifreq in net/if.h
      * src/util/virnetdev.c: Conditionalize to avoid use of
        struct ifreq if it does not exist
      949e1091
  30. 30 11月, 2011 1 次提交
    • D
      Add internal APIs for dealing with time · 3ec12898
      Daniel P. Berrange 提交于
      The logging APIs need to be able to generate formatted timestamps
      using only async signal safe functions. This rules out using
      gmtime/localtime/malloc/gettimeday(!) and much more.
      
      Introduce a new internal API which is async signal safe.
      
        virTimeMillisNowRaw replacement for gettimeofday. Uses clock_gettime
                            where available, otherwise falls back to the unsafe
                            gettimeofday
      
        virTimeFieldsNowRaw  replacements for gmtime(), convert a timestamp
        virTimeFieldsThenRaw into a broken out set of fields. No localtime()
                             replacement is provided, because converting to
                             local time is not practical with only async signal
                             safe APIs.
      
        virTimeStringNowRaw  replacements for strftime() which print a timestamp
        virTimeStringThenRaw into a string, using a pre-determined format, with
                             a fixed size buffer (VIR_TIME_STRING_BUFLEN)
      
      For each of these there is also a version without the Raw postfix
      which raises a full libvirt error. These versions are not async
      signal safe
      
      * src/Makefile.am, src/util/virtime.c, src/util/virtime.h: New files
      * src/libvirt_private.syms: New APis
      * configure.ac: Check for clock_gettime in -lrt
      * tests/virtimetest.c, tests/Makefile.am: Test new APIs
      3ec12898
  31. 22 11月, 2011 1 次提交
    • C
      storage: Fallback to use lvchange first if lvremove fails · 3c540514
      Chang Liu 提交于
      virStorageBackendLogicalDeleteVol() could not remove the lv with error
      "could not remove open logical volume" sometimes. Generally it's caused
      by the volume is still active, even if lvremove tries to remove it with
      option "--force".
      
      This patch is to fix it by disbale the lv first using "lvchange -aln"
      and "lvremove -f" afterwards if the direct "lvremove -f" failed.
      3c540514
  32. 19 11月, 2011 1 次提交
    • D
      Add support for systemd init service · 4789fb2e
      Daniel P. Berrange 提交于
      This patch adds support for a systemd init service for libvirtd
      and libvirt-guests. The libvirtd.service is *not* written to use
      socket activation, since we want libvirtd to start on boot so it
      can do guest auto-start.
      
      The libvirt-guests.service is pretty lame, just exec'ing the
      original init script for now. Ideally we would factor out the
      functionality, into some shared tool.
      
      Instead of
      
        ./configure --with-init-script=redhat
      
      You can now do
      
        ./configure --with-init-script=systemd
      
      Or better still:
      
        ./configure --with-init-script=systemd+redhat
      
      We can also now support install of the upstart init script
      
      * configure.ac: Add systemd, and systemd+redhat options to
        --with-init-script option
      * daemon/Makefile.am: Install systemd services
      * daemon/libvirtd.sysconf: Add note about unused env variable
        with systemd
      * daemon/libvirtd.service.in: libvirtd systemd service unit
      * libvirt.spec.in: Add scripts to installing systemd services
        and migrating from legacy init scripts
      * tools/Makefile.am: Install systemd services
      * tools/libvirt-guests.init.sh: Rename to tools/libvirt-guests.init.in
      * tools/libvirt-guests.service.in: systemd service unit
      4789fb2e
  33. 10 11月, 2011 2 次提交
    • D
      Split bridge.h into three separate files · e49c9bf2
      Daniel P. Berrange 提交于
      Following the renaming of the bridge management APIs, we can now
      split the source file into 3 corresponding pieces
      
       * src/util/virnetdev.c: APIs for any type of network interface
       * src/util/virnetdevbridge.c: APIs for bridge interfaces
       * src/util/virnetdevtap.c: APIs for TAP interfaces
      
      * src/util/virnetdev.c, src/util/virnetdev.h,
        src/util/virnetdevbridge.c, src/util/virnetdevbridge.h,
        src/util/virnetdevtap.c, src/util/virnetdevtap.h: Copied
        from bridge.{c,h}
      * src/util/bridge.c, src/util/bridge.h: Split into 3 pieces
      * src/lxc/lxc_driver.c, src/network/bridge_driver.c,
        src/openvz/openvz_driver.c, src/qemu/qemu_command.c,
        src/qemu/qemu_conf.h, src/uml/uml_conf.c, src/uml/uml_conf.h,
        src/uml/uml_driver.c: Update #include directives
      e49c9bf2
    • D
      Remove usage of brctl command line tool · c1df2c14
      Daniel P. Berrange 提交于
      Convert the virNetDevBridgeSetSTP and virNetDevBridgeSetSTPDelay
      to use ioctls instead of spawning brctl.
      
      Implement the virNetDevBridgeGetSTP and virNetDevBridgeGetSTPDelay
      methods which were declared in the header but never existed
      
      * src/util/bridge.c: Convert to use bridge ioctls instead of brctl
      c1df2c14
  34. 08 11月, 2011 1 次提交
    • D
      Release of libvirt-0.9.7 · ab4823a0
      Daniel Veillard 提交于
      * confiure.ac docs/news.html.in libvirt.spec.in: update for release
      * po/*.po*: update localizations and rebuilt
      ab4823a0
  35. 05 11月, 2011 1 次提交
    • E
      build: fix linking on BSD · 9d86cbcf
      Eric Blake 提交于
      While building on FreeBSD (and after fixing a ptsname_r link error),
      I got this failure:
      
      ./.libs/libvirt_util.a(libvirt_util_la-threads.o)(.text+0x240): In function `virThreadCreate':
      util/threads-pthread.c:185: undefined reference to `pthread_create'
      
      It turns out that gnulib used only pthread_join for LIB_PTHREAD,
      but on FreeBSD, libc provides that (as a stub function); whereas
      the more complex pthread_create really does require -pthread,
      which gnulib tracked under [LT]LIBMULTITHREAD.
      
      * configure.ac (LIBS): Check LIBMULTITHREAD alongside LIB_PTHREAD.
      * src/Makefile.am (THREAD_LIBS): New variable.
      (libvirt_util_la_LIBADD, libvirt_lxc_LDADD): Use it.
      9d86cbcf
  36. 27 10月, 2011 1 次提交
  37. 25 10月, 2011 1 次提交
    • E
      build: use gnulib fdatasync · 9cf70dad
      Eric Blake 提交于
      Commit 1726a736 hacked around MacOS' lack of fdatasync, since
      gnulib did not have it at the time.  But now that we use newer
      gnulib, we can avoid the hack.
      
      * bootstrap.conf (gnulib_modules): Add fdatasync.
      * configure.ac (AC_CHECK_FUNCS_ONCE): Drop our own check.
      9cf70dad