1. 06 9月, 2012 7 次提交
    • L
      network: prevent infinite hang if ovs-vswitchd isn't running · 98e732fc
      Laine Stump 提交于
      This fixes https://bugzilla.redhat.com/show_bug.cgi?id=852984
      
      If a network or interface is configured to use Open vSwitch, but
      ovs-vswitchd (the Open vSwitch database service) isn't running, the
      ovs-vsctl add-port/del-port commands will hang indefinitely rather
      than returning an error. There is a --nowait option, but that appears
      to have no effect on add-port and del-port commands, so instead we add
      a --timeout=5 to the commands - they will retry for up to 5 seconds,
      then fail if there is no response.
      98e732fc
    • L
      build: require netcf-0.2.2 when installing on Fedora18+ · 89810fc4
      Laine Stump 提交于
      A previous patch forced libnl-3 and netcf-0.2.2 (which itself requires
      libnl-3) when *building* for Fedora 18+ (and RHEL 7+), but the
      install-time Requires: for netcf has always been implicit due to
      libvirtd linking with libnetcf.so. However, the since the API of netcf
      didn't change when it was rebuilt to use libnl-3, the internal library
      version didn't change either, making it possible (from rpm's point of
      view) to upgrade libvirt without upgrading netcf (in reality, that
      leads to a segfault - see
      https://bugzilla.redhat.com/show_bug.cgi?id=853381).
      
      The solution is to put an explicit Requires: line in libvirt's
      specfile for fedora >= 18 and rhel >= 7.
      89810fc4
    • E
      build: don't fail when xsltproc is missing · d51024ae
      Eric Blake 提交于
      On a machine without xsltproc, the build failed with:
      
      Scripting search.php
      /usr/local/bin/bash: line 1: search.php.tmp: No such file or directory
      rm: ./search.php: No such file or directory
      
      Regression introduced in commit 28183590.
      
      * docs/Makefile.am (%.php): Skip in the same conditions when the
      .tmp file is skipped.
      d51024ae
    • E
      build: avoid warnings from gcc 4.2.1 · c579d6b3
      Eric Blake 提交于
      OpenBSD ships with gcc 4.2.1, which annoyingly treats all format
      strings as though they were also attribute((nonnull)).  The two
      concepts are orthogonal, though, as evidenced by the number of
      spurious warnings it generates on uses where we know that
      virReportError specifically handles NULL instead of a format
      string; worse, since we now force -Werror on git builds, it
      prevents development builds on OpenBSD.
      
      I hate to do this, as it disables ALL format checking on older
      gcc, and therefore misses out on some useful checks (code that
      happened to compile on Linux may still have type mismatches
      when compiled on other platforms, as evidenced by the number
      of times I have fixed formatting mismatches for uid_t as found
      by warnings on Cygwin), but I don't see any other way to keep
      -Werror alive and still compile on OpenBSD.
      
      A more invasive change would be to make virReportError() mark
      its format attribute as nonnull, and fix (a lot of) fallout;
      we may end up doing that anyways as part of danpb's error
      refactoring improvements, but not today.
      
      * src/internal.h (ATTRIBUTE_FMT_PRINTF): Use preferred spellings.
      * m4/virt-compile-warnings.m4 (-Wformat): Disable on older gcc.
      c579d6b3
    • M
      qemu: don't pin all the cpus · 9f86fb93
      Martin Kletzander 提交于
      This is another fix for the emulator-pin series. When going through
      the cputune pinning settings, the current code is trying to pin all
      the CPUs, even when not all of them are specified. This causes error
      in the subsequent function which, of course, cannot find the cpu to
      pin. Since it's enough to pass the correct VCPU ID to the function,
      the fix is trivial.
      9f86fb93
    • E
      maint: avoid doubled name in syntax check failures · 60efb600
      Eric Blake 提交于
      Based on the similar gnulib commit 96ad9077.  The use of
      $(_sc_search_regexp) already injects $(ME) into any output
      messages, so a failure of these rules would look like this,
      pre-patch:
      
      maint.mk: maint.mk: use virStrToLong_*, not strtol variants
      
      * cfg.mk (sc_prohibit_strncmp, sc_prohibit_strtol)
      (sc_libvirt_unmarked_diagnostics): Drop redundant $(ME).
      60efb600
    • E
      build: use re-entrant functions in virsh · 44342a0e
      Eric Blake 提交于
      Yesterday's commit 15d2c9fa pointed out that virsh was still using
      localtime(), which is not thread-safe, even though virsh is
      definitely multi-threaded.  Even if we only ever triggered it from
      one thread, it's better safe than sorry for maintenance purposes.
      
      * cfg.mk (exclude_file_name_regexp--sc_prohibit_nonreentrant):
      Tighten the rule.
      * tools/virsh.c (vshOutputLogFile): Avoid localtime.
      (vshEditWriteToTempFile, vshEditReadBackFile, cmdCd, cmdPwd)
      (vshCloseLogFile): Avoid strerror.
      * tools/console.c (vshMakeStdinRaw): Likewise.
      * tools/virsh-domain.c (vshGenFileName): Fix spacing in previous
      patch.
      44342a0e
  2. 05 9月, 2012 7 次提交
    • D
      Remove explicit dependency on ceph RPM · 8386b304
      Daniel P. Berrange 提交于
      The libvirt storage driver uses librbd.so for its functionality.
      RPM will automatically add a dependency on the library, so there
      is no need to have an explicit dependency on the ceph RPM itself.
      This allows newer Fedora distros to avoid pulling in the huge
      ceph RPM, in favour of just having the libraries installed
      8386b304
    • J
      qemu: Do not require auth scheme in graphics events · 965ccdd1
      Jiri Denemark 提交于
      Only VNC_{{DIS,}CONNECTED,INITIALIZED} and SPICE_INITIALIZED events are
      documented to support server/auth field and even there it is marked as
      optional. Emit "" auth scheme in case QEMU didn't send it.
      965ccdd1
    • M
      conf: describe security_driver behavior · 95fbc833
      Martin Kletzander 提交于
      As a request was raised for this, I added few lines in the "Notes"
      part of the "security_driver" comments about allowed values.
      95fbc833
    • M
      docs: correct dompmwakeup description · aa698a49
      Martin Kletzander 提交于
      aa698a49
    • P
      Pass a correct pointer type to localtime_r(3). · 15d2c9fa
      Paul Eggert 提交于
      On 09/04/2012 08:20 AM, Eric Blake wrote:
      > tv_sec is required by POSIX to be
      > of type time_t; so this is a bug in the OpenBSD header
      > [for declaring it as long]
      
      Most likely this problem arose because of the patch I pushed
      in gnulib commit e07d7c40f3ca5ec410cf5aa6fa03cfe51e712039.
      Previously, gnulib required timeval's tv_sec to be
      the same size as time_t.  But now, it requires only that
      tv_sec be big enough to hold a time_t.
      
      This patch was needed for Emacs.  Without the patch, gnulib
      replaced struct timeval on OpenBSD, and this messed up
      utimens.c, and Emacs wouldn't build.
      
      Alternatively, gnulib could substitute its own struct timeval
      for the system's, wrapping every struct timeval-using function
      (gettimeofday, futimesat, futimes, lutimes, etc.  That'd be
      more work, though.  And it would introduce some performance
      issues with gettimeofday, which is supposed to be fast.
      
      I've been trying to get away from using struct timeval,
      and to use the higher-resolution struct timespec instead,
      so messing with these obsolescent interfaces has been
      lower priority for me.  But if someone wants to take the
      more-ambitious approach that'd be fine, I expect.
      
      For this particular case, though, how about if we avoid
      the problem entirely?  libvirt doesn't need to use struct
      timeval here at all.  It makes libvirt smaller and probably
      faster, and it ports to OpenBSD without messing with gnulib.
      15d2c9fa
    • E
      build: use correct libraries for clock_gettime · d74e5a4d
      Eric Blake 提交于
      On OpenBSD, clock_gettime() exists in libc rather than librt, and
      blindly linking with -lrt made the build fail.  Gnulib already
      did the work for determining which libraries to use, so we should
      reuse that work rather than doing it ourselves.
      
      * bootstrap.conf (gnulib_modules): Pull in clock-time.
      * configure.ac (RT_LIBS): Drop.
      * src/Makefile.am (libvirt_util_la_LIBADD): Use gnulib variable
      instead.
      * src/util/virtime.c (includes): Simplify.
      d74e5a4d
    • J
      afa67b77
  3. 04 9月, 2012 3 次提交
    • V
      Rename iolimit to blockio. · 72f1f220
      Viktor Mihajlovski 提交于
      After discussion with DB we decided to rename the new iolimit
      element as it creates the impression it would be there to
      limit (i.e. throttle) I/O instead of specifying immutable
      characteristics of a block device.
      This is also backed by the fact that the term I/O Limits has
      vanished from newer storage admin documentation.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      72f1f220
    • J
      qemu: Fix reboot with guest agent · 03c42a45
      Jiri Denemark 提交于
      When reboot using qemu guest agent was requested, qemu driver kept
      waiting for SHUTDOWN event from qemu. However, such event is never
      emitted during guest reboot and qemu driver would keep waiting forever.
      03c42a45
    • D
      Fix mingw64 build by using intptr_t for int->void* casts · 8675406c
      Daniel P. Berrange 提交于
      The viratomictest.c was casting from an int to a void* via a
      long. This works on Linux or Mingw32, but fails on Mingw64
      due to a pointer/integer size mis-match. Replacing 'long'
      with 'intptr_t' ensures matching type sizes
      8675406c
  4. 03 9月, 2012 4 次提交
  5. 01 9月, 2012 3 次提交
    • E
      python: don't mask libvirt errors · 63bfc598
      Eric Blake 提交于
      A user reported this crash when using python bindings:
      
        File "/home/nox/workspace/NOX/src/NOX/hooks.py", line 134, in trigger
          hook.trigger(event)
        File "/home/nox/workspace/NOX/src/NOX/hooks.py", line 33, in trigger
          self.handlers[event]()
        File "/home/nox/workspace/NOX/hooks/volatility.py", line 81, in memory_dump
          for block in Memory(self.ctx):
        File "/home/see/workspace/NOX/src/NOX/lib/libtools.py", line 179, in next
          libvirt.VIR_MEMORY_PHYSICAL)
        File "/usr/lib/python2.7/dist-packages/libvirt.py", line 1759, in memoryPeek
          ret = libvirtmod.virDomainMemoryPeek(self._o, start, size, flags)
      SystemError: error return without exception set
      
      In the python bindings, returning NULL makes python think an
      exception was thrown, while returning the None object lets the
      wrappers know that a libvirt error exists.
      
      Reported by Nox DaFox, fix suggested by Dan Berrange.
      
      * python/libvirt-override.c (libvirt_virDomainBlockPeek)
      (libvirt_virDomainMemoryPeek): Return python's None object, so
      wrapper knows to check libvirt error.
      63bfc598
    • V
      qemu: Support for Block Device IO Limits. · 277a49bc
      Viktor Mihajlovski 提交于
      Implementation of iolimits for the qemu driver with
      capability probing for block size attribute and
      command line generation for block sizes.
      Including testcase for qemuxml2argvtest.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      277a49bc
    • V
      conf: Support for Block Device IO Limits · 5cc50ad7
      Viktor Mihajlovski 提交于
      Introducing a new iolimits element allowing to override certain
      properties of a guest block device like the physical and logical
      block size.
      This can be useful for platforms with 'non-standard' disk formats
      like S390 DASD with its 4K block size.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      5cc50ad7
  6. 31 8月, 2012 16 次提交