1. 20 6月, 2013 2 次提交
    • J
      lxc: Resolve issue with GetScheduler APIs for non running domain · f90b0249
      John Ferlan 提交于
      As a consequence of the cgroup layout changes from commit 'cfed9ad4', the
      lxcDomainGetSchedulerParameters[Flags]()' and lxcGetSchedulerType() APIs
      failed to return data for a non running domain.  This can be seen through
      a 'virsh schedinfo <domain>' command which returns:
      
      Scheduler      : Unknown
      error: Requested operation is not valid: cgroup CPU controller is not mounted
      
      Prior to that change a non running domain would return:
      
      Scheduler      : posix
      cpu_shares     : 0
      vcpu_period    : 0
      vcpu_quota     : 0
      emulator_period: 0
      emulator_quota : 0
      
      This patch will restore the capability to return configuration only data
      for a non running domain regardless of whether cgroups are available.
      (cherry picked from commit 38ada092)
      f90b0249
    • J
      qemu: Resolve issue with GetScheduler APIs for non running domain · 245fc93c
      John Ferlan 提交于
      As a consequence of the cgroup layout changes from commit '632f78ca', the
      qemuDomainGetSchedulerParameters[Flags]()' and qemuGetSchedulerType() APIs
      failed to return data for a non running domain.  This can be seen through
      a 'virsh schedinfo <domain>' command which returns:
      
      Scheduler      : Unknown
      error: Requested operation is not valid: cgroup CPU controller is not mounted
      
      Prior to that change a non running domain would return:
      
      Scheduler      : posix
      cpu_shares     : 0
      vcpu_period    : 0
      vcpu_quota     : 0
      emulator_period: 0
      emulator_quota : 0
      
      This patch will restore the capability to return configuration only data
      for a non running domain regardless of whether cgroups are available.
      (cherry picked from commit b2375453)
      245fc93c
  2. 18 6月, 2013 4 次提交
  3. 04 6月, 2013 3 次提交
  4. 03 6月, 2013 3 次提交
  5. 01 6月, 2013 6 次提交
    • O
      conf: Generate address for scsi host device automatically · cdb97895
      Osier Yang 提交于
      With unknown good reasons, the attribute "bus" of scsi device
      address is always set to 0, same for attribute "target". (See
      virDomainDiskDefAssignAddress).
      
      Though we might need to change the algorithm to honor "bus"
      and "target" too, that's a different issue. The address generator
      for scsi host device in this patch just follows the unknown
      good reasons, only considering the "controller" and "unit".
      It walks through all scsi controllers and their units, to see
      if the address $controller:0:0:$unit can be used (if not used
      by any disk or scsi host device yet), if found one, it sits on
      it, otherwise, it creates a new controller (actually the controller
      is implicitly created by someone else), and sits on
      $new_controller:0:0:0 instead.
      cdb97895
    • L
      qemu: prevent termination of guests w/hostdev on driver reconnect · 2ea45647
      Laine Stump 提交于
      This should resolve:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=959191
      
      The problem was that qemuUpdateActivePciHostdevs was returning 0
      (success) when no hostdevs were present, but would otherwise return -1
      (failure) even when it completed successfully. It is only called from
      qemuProcessReconnect(), and when qemuProcessReconnect got back an
      error, it would not only stop reconnecting, but would terminate the
      guest qemu process "to remove danger of it ending up running twice if
      user tries to start it again later".
      
      (This bug was introduced in commit 011cf7ad, which was pushed between
      v1.0.2 and v1.0.3, so all maintenance branches from v1.0.3 up to 1.0.5
      will need this one line patch applied.)
      2ea45647
    • G
      vbox: define DYNLIB_NAME for kFreeBSD · aeef20e9
      Guido Günther 提交于
      Similar to what Eric did for Cygwin it helps at least to compile
      without --without-vbox
      aeef20e9
    • E
      build: skip qemu in tests when !WITH_QEMU · 3d2b9715
      Eric Blake 提交于
      A mingw build (where the qemu driver is not built, so WITH_QEMU
      is undefined) failed with:
      
      In file included from ../../src/qemu/qemu_command.h:30:0,
                       from ../../tests/testutilsqemu.h:4,
                       from ../../tests/networkxml2xmltest.c:14:
      ../../src/qemu/qemu_conf.h:53:4: error: #error "Port me"
      
      But since testutilsqemu.c is already conditional, the header
      should be likewise.
      
      * tests/testutilsqemu.h: Make content conditional.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      3d2b9715
    • D
      Introduce virFilePrintf() as a portable fprintf() · a2619962
      Daniel P. Berrange 提交于
      We can't use GNULIB's fprintf-posix due to licensing
      incompatibilities. We do already have a portable
      formatting via virAsprintf() which we got from GNULIB
      though. We can use to create a virFilePrintf() function.
      
      But really gnulib could just provide a 'fprintf'
      module, that depended on just its 'asprintf' module.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      a2619962
    • J
      fae2505e
  6. 31 5月, 2013 9 次提交
  7. 30 5月, 2013 7 次提交
    • E
      build: port qemu to cygwin · 19a7f9ff
      Eric Blake 提交于
      A cygwin build of the qemu driver fails with:
      
      qemu/qemu_process.c: In function 'qemuPrepareCpumap':
      qemu/qemu_process.c:1803:31: error: 'CPU_SETSIZE' undeclared (first use in this function)
      
      CPU_SETSIZE is a Linux extension in <sched.h>; a bit more portable
      is using sysconf if _SC_NPROCESSORS_CONF is defined (several platforms
      have it, including Cygwin).  Ultimately, I would have preferred to
      use gnulib's 'nproc' module, but it is currently under an incompatible
      license.
      
      * src/qemu/qemu_conf.h (QEMUD_CPUMASK_LEN): Provide definition on
      cygwin.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      19a7f9ff
    • E
      build: use correct rpc.h for lockd · d671121d
      Eric Blake 提交于
      On cygwin, the build failed with:
      
      In file included from ./rpc/virnetmessage.h:24:0,
                       from ./rpc/virnetclient.h:29,
                       from locking/lock_driver_lockd.c:31:
      ./rpc/virnetprotocol.h:9:21: fatal error: rpc/rpc.h: No such file or directory
      
      * src/Makefile.am (lockd_la_CFLAGS): Add XDR_CFLAGS.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d671121d
    • E
      build: work around broken sasl header · 1be3dfdf
      Eric Blake 提交于
      Compilation on cygwin failed due to a bug in the sasl headers
      present on that platform (libsasl2-devel 2.1.26):
      
      In file included from rpc/virnetserverclient.c:27:0:
      /usr/include/sasl/sasl.h:230:38: error: expected declaration specifiers or '...' before 'size_t'
      
      Upstream is aware of their bug:
      https://bugzilla.cyrusimap.org/show_bug.cgi?id=3759
      
      * src/rpc/virnetserverclient.c (includes): Ensure size_t is
      defined before using sasl.h.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1be3dfdf
    • E
      build: fix typo in earlier commit · 1cd97c7a
      Eric Blake 提交于
      Bummer, I committed, then fixed a typo, then tested, and forgot to
      amend the commit before pushing 7d21d6b6.
      
      * src/rpc/virnettlscontext.c (includes): Use correct spelling.
      1cd97c7a
    • C
      virsh: migrate: Don't disallow --p2p and --migrateuri · 5e1de4fc
      Cole Robinson 提交于
      Because it's a valid combination. p2p still uses a separate channel
      for qemu migration, so there's value in letting the user specify a manual
      migrate URI for overriding auto-port, or libvirt's FQDN lookup.
      
      What _isn't_ allowed is --migrateuri and TUNNELLED, since there is
      no separate migration channel. Disallow that instead
      5e1de4fc
    • C
      qemu: migration: error if tunnelled + storage specified · 98bbda00
      Cole Robinson 提交于
      Since as the code indicates it doesn't work yet, so let's be
      explicit about it.
      98bbda00
    • C
      qemu: migration: Improve p2p error if we can't open conn · 5751fc4f
      Cole Robinson 提交于
      By actually showing the Open() error to the user
      5751fc4f
  8. 29 5月, 2013 6 次提交
    • E
      build: fix build without libvirtd · fd8fa33b
      Eric Blake 提交于
      Building when configured --with-libvirtd=no fails with:
      
      In file included from ../src/qemu/qemu_command.h:30:0,
                       from testutilsqemu.h:4,
                       from networkxml2xmltest.c:14:
      ../src/qemu/qemu_conf.h:175:5: error: expected specifier-qualifier-list before 'virStateInhibitCallback'
      
      * src/libvirt_internal.h (virStateInhibitCallback): Move outside
      of conditional.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      fd8fa33b
    • E
      build: fix build with newer gnutls · 7d21d6b6
      Eric Blake 提交于
      Building with gnutls 3.2.0 (such as shipped with current cygwin) fails
      with:
      
      rpc/virnettlscontext.c: In function 'virNetTLSSessionGetKeySize':
      rpc/virnettlscontext.c:1358:5: error: implicit declaration of function 'gnutls_cipher_get_key_size' [-Wimplicit-function-declaration]
      
      Yeah, it's stupid that gnutls broke API by moving their declaration
      into a new header without including that header from the old one,
      but it's easy enough to work around, all without breaking on gnutls
      1.4.1 (hello RHEL 5) that lacked the new header.
      
      * configure.ac (gnutls): Check for <gnutls/crypto.h>.
      * src/rpc/virnettlscontext.c (includes): Include additional header.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      7d21d6b6
    • O
      storage_conf: Use uid_t/gid_t instead of int to cast the value · 6c89768d
      Osier Yang 提交于
      And error out if the casted value is not same with the original
      one, which prevents the bug on platform(s) where uid_t/gid_t
      has different size with long.
      6c89768d
    • O
      storage_conf: Improve error messages · ec2b81c6
      Osier Yang 提交于
      virStoragePoolDefParseSource:
        * Better error message
      
      virStoragePoolObjLoad:
        * Break the line line
      ec2b81c6
    • O
      storage_conf: Use NULLSTR instead · 1c6fe3fa
      Osier Yang 提交于
      1c6fe3fa
    • O
      storage_conf: Improve the memory deallocation of virStorageVolDefParseXML · 107130cc
      Osier Yang 提交于
      Changes:
        * Add a new goto label "error"
        * Free the strings at "cleanup"
        * Remove the unnecessary frees
      107130cc