1. 02 8月, 2010 3 次提交
  2. 01 8月, 2010 1 次提交
  3. 31 7月, 2010 5 次提交
    • M
      Update ID after stopping a domain · e670d394
      Matthias Bolte 提交于
      e670d394
    • J
      openvzDomainCreateWithFlags: set domain id to the correct value · fd81a097
      Jean-Baptiste Rouault 提交于
      When an openvz domain is defined with virDomainDefineXML,
      domain id is set to -1. A call to virDomainGetInfo after
      starting the domain would then fail because this invalid
      id is passed to openvzGetProcessInfo.
      fd81a097
    • E
      storage: kill dead stores · 549b8399
      Eric Blake 提交于
      Found by clang.  Clang complained that virStorageBackendProbeTarget
      could dereference NULL if backingStoreFormat was NULL, but since all
      callers passed a valid pointer, I added attributes instead of null
      checks.
      
      * src/storage/storage_backend.c
      (virStorageBackendQEMUImgBackingFormat): Kill dead store.
      * src/storage/storage_backend_fs.c (virStorageBackendProbeTarget):
      Likewise.  Skip null checks, by adding attributes.
      549b8399
    • E
      qemu: kill some dead stores · 68e4be71
      Eric Blake 提交于
      Spotted by clang.
      
      * src/qemu/qemu_monitor.c (qemuMonitorClose): Kill dead store.
      * src/qemu/qemu_driver.c (qemudDomainSaveImageStartVM): Likewise.
      68e4be71
    • E
      network: kill dead store · c52b90ed
      Eric Blake 提交于
      * src/network/bridge_driver.c (networkDefine): Kill dead store.
      c52b90ed
  4. 30 7月, 2010 15 次提交
    • M
      xenapi: Update ID after starting a domain · 2f5097f3
      Matthias Bolte 提交于
      2f5097f3
    • M
      esx: Update ID after starting a domain · 6139b274
      Matthias Bolte 提交于
      6139b274
    • C
      Fix DMI uuid parsing. · 435fa6d7
      Chris Lalancette 提交于
      valgrind was complaining that virUUIDParse was depending on
      an uninitialized value.  Indeed it was; virSetHostUUIDStr()
      didn't initialize the dmiuuid buffer to 0's, meaning that
      anything after the string read from /sys was uninitialized.
      Clear out the dmiuuid buffer before use, and make sure to
      always leave a \0 at the end.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      435fa6d7
    • D
      Do not activate boot=on on devices when not using KVM · e7da8722
      Daniel Veillard 提交于
        Basically the 'boot=on' boot selection device is something present in
      KVM but not in upstream QEmu, as a result if we boot a QEmu domain
      without KVM acceleration we must disable boot=on ... even if the front
      end kvm binary expose that capability in the help page.
      
      * src/qemu/qemu_conf.c: in qemudBuildCommandLine if -no-kvm
        is passed, then deactivate QEMUD_CMD_FLAG_DRIVE_BOOT
      e7da8722
    • C
      Fix a memory leak in the qemudBuildCommandLine. · 4313e1b9
      Chris Lalancette 提交于
      ADD_ARG_LIT should only be used for literal arguments,
      since it duplicates the memory.  Since virBufferContentAndReset
      is already allocating memory, we should only use ADD_ARG.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      4313e1b9
    • M
      esx: Fix freeing of heterogeneous lists · 5cff36e3
      Matthias Bolte 提交于
      Always call the free function of the base type. The base type
      function then dynamically dispatches the call to the free function
      for the actual type.
      5cff36e3
    • M
      c38e2f7a
    • M
      esx: Improve blocked task detection and fix race condition · 25e34b70
      Matthias Bolte 提交于
      esxVI_WaitForTaskCompletion can take a UUID to lookup the
      corresponding domain and check if the current task for it
      is blocked by a question. It calls another function to do
      this: esxVI_LookupAndHandleVirtualMachineQuestion looks up
      the VirtualMachine and checks for a question. If there is
      a question it calls esxVI_HandleVirtualMachineQuestion to
      handle it.
      
      If there was no question or it has been answered the call
      to esxVI_LookupAndHandleVirtualMachineQuestion returns 0.
      If any error occurred during the lookup and answering
      process -1 is returned. The problem with this is, that -1
      is also returned when there was no error but the question
      could not be answered. So esxVI_WaitForTaskCompletion cannot
      distinguish between this two situations and reports that a
      question is blocking the task even when there was actually
      another problem.
      
      This inherent problem didn't surface until vSphere 4.1 when
      you try to define a new domain. The driver tries to lookup
      the domain that is just in the process of being registered.
      There seems to be some kind of race condition and the driver
      manages to issue a lookup command before the ESX server was
      able to register the domain. This used to work before.
      
      Due to the return value problem described above the driver
      reported a false error message in that case.
      
      To solve this esxVI_WaitForTaskCompletion now takes an
      additional occurrence parameter that describes whether or
      not to expect the domain to be existent. Also add a new
      parameter to esxVI_LookupAndHandleVirtualMachineQuestion
      that allows to distinguish if the call returned -1 because
      of an actual error or because the question could not be
      answered.
      25e34b70
    • E
      esx: silence spurious compiler warning · 2c216d95
      Eric Blake 提交于
      * src/esx/esx_vi_types.c (_DESERIALIZE_NUMBER)
      (ESX_VI__TEMPLATE__DESERIALIZE_NUMBER): Add range check to shut up
      gcc 4.5.0 regarding long long.
      2c216d95
    • E
      build: distribute libvirt_qemu.syms · 701f356a
      Eric Blake 提交于
      * src/Makefile.am (EXTRA_DIST): Ensure 'make distcheck' and
      'rpmbuild' can reproduce a build.
      * daemon/Makefile.am (DAEMON_SOURCES): Likewise.
      701f356a
    • E
      build: restore operation of bit-rotted 'make cov' · e7064aa6
      Eric Blake 提交于
      './autobuild.sh' with lcov installed discovered that our
      coverage support has been bit-rotting for a while.  This
      restores it back to a successful state, although I have
      not yet spent any time looking through the resulting files to
      look for low-hanging fruit in the unit test coverage front.
      
      * configure.ac: Clear COMPILER_FLAGS at right place.
      * Makefile.am (cov): Newer genhtml no longer likes plain -s.
      * m4/compiler-flags.m4 (gl_COMPILER_FLAGS): Don't AC_SUBST
      COMPILER_FLAGS; it is a shell variable for use in configure only.
      * src/Makefile.am (AM_CFLAGS, AM_LDFLAGS): New variables, to make
      it easier to provide global flag additions.  Use throughout, to
      uniformly apply coverage flags.
      * .gitignore: Globally ignore gcov output.
      * daemon/.gitignore: Simplify.
      * src/.gitignore: Likewise.
      * tests/.gitignore: Likewise.
      e7064aa6
    • E
      xen: fix logic bug · 08ae41e9
      Eric Blake 提交于
      The recent switch to enable -Wlogical-op paid off again.
      gcc 4.5.0 (rawhide) is smarter than 4.4.4 (Fedora 13).
      
      * src/xen/xend_internal.c (xenDaemonAttachDeviceFlags)
      (xenDaemonUpdateDeviceFlags, xenDaemonDetachDeviceFlags): Use
      correct operator.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      08ae41e9
    • E
      build: fix 'make syntax-check' failure · d580eafc
      Eric Blake 提交于
      src/lxc/veth.c:150:        VIR_DEBUG(_("Failed to delete '%s' (%d)"),
      src/lxc/veth.c:188:            VIR_DEBUG(_("Failed to disable '%s' (%d)"),
      maint.mk: do not mark these strings for translation
      
      * src/lxc/veth.c (vethDelete, vethInterfaceUpOrDown): Don't
      translate VIR_DEBUG.
      d580eafc
    • R
      lxc: Fix return values of veth.c functions · 938f2dbd
      Ryota Ozaki 提交于
      Previously, the functions in src/lxc/veth.c could sometimes return
      positive values on failure rather than -1. This made accurate error
      reporting difficult, and led to one failure to catch an error in a
      calling function.
      
      This patch makes all the functions in veth.c consistently return 0 on
      success, and -1 on failure. It also fixes up the callers to the veth.c
      functions where necessary.
      
      Note that this patch may be related to the bug:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=607496.
      
      It will not fix the bug, but should unveil what happens.
      
      * po/POTFILES.in - add veth.c, which previously had no translatable strings
      * src/lxc/lxc_controller.c
      * src/lxc/lxc_container.c
      * src/lxc/lxc_driver.c    - fixup callers to veth.c, and remove error logs,
                                  as they are now done in veth.c
      * src/lxc/veth.c - make all functions consistently return -1 on error.
      * src/lxc/veth.h - use ATTRIBUTE_NONNULL to protect against NULL args.
      938f2dbd
    • L
      Eliminate memory leak in xenUnifiedDomainInfoListFree · 1999e4f8
      Laine Stump 提交于
      This fixes a leak described in
      
         https://bugzilla.redhat.com/show_bug.cgi?id=590073
      
      xenUnifiedDomainInfoList has a pointer to a list of pointers to
      xenUnifiedDomain. We were freeing up all the domains, but neglecting
      to free the list.
      
      This was found by Paolo Bonzini <pbonzini@redhat.com>.
      1999e4f8
  5. 29 7月, 2010 9 次提交
  6. 28 7月, 2010 7 次提交
    • G
      fix handling of PORT_PROFILE_RESPONSE_INPROGRESS netlink message · e4fb6a3c
      Gerhard Stenzel 提交于
      During function test of the 802.1Qbg implementation in lldpad we came
      across a small problem in the handling of the netlink message
      corresponding to PORT_PROFILE_RESPONSE_INPROGRESS. This should not
      result in returning the default rc=1.
      
      - src/util/macvtap.c: fix getPortProfileStatus() to return 0 in that
        case and also fix an indentation problem
      e4fb6a3c
    • E
      maint: fix comment typos · 40a0e82c
      Eric Blake 提交于
      * src/network/bridge_driver.c
      (networkAddMasqueradingIptablesRules): Fix spelling and grammar.
      40a0e82c
    • C
    • E
      maint: turn on gcc logical-op checking · 40e973dd
      Eric Blake 提交于
      This would have detected the bug in commit 38ad33931 (Aug 09), which
      we missed until commit f828ca35 (Jul 10); over 11 months later.
      
      However, on Fedora 13, it also triggers LOTS of warnings from
      the libcurl-devel header for two files:
      
      esx/esx_vi.c: In function 'esxVI_CURL_Perform':
      esx/esx_vi.c:232: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op]
      esx/esx_vi.c:232: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op]
      esx/esx_vi.c:232: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op]
      ...
      xenapi/xenapi_driver.c: In function 'call_func':
      xenapi/xenapi_driver.c:1872: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op]
      xenapi/xenapi_driver.c:1872: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op]
      xenapi/xenapi_driver.c:1872: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op]
      ...
      
      libcurl allows to disable the type-checking code that triggers those
      warnings, along with the reduction in type-safety of calls to some
      libcurl functions. I figure this is worth the improved compiler
      checking throughout the rest of libvirt.
      
      * acinclude.m4 (--enable-compile-warnings=error): Add -Wlogical-op.
      * configure.ac: Add -DCURL_DISABLE_TYPECHECK to LIBCURL_CFLAGS to
      avoid compilation warning.
      
      Suggested by Daniel P. Berrange.
      Tweaked by Matthias Bolte.
      40e973dd
    • E
      libvirt-guests: add reload, condrestart · e5360d0b
      Eric Blake 提交于
      Optional per LSB, but required by Fedora:
      https://fedoraproject.org/wiki/Packaging/SysVInitScript
      
      * daemon/libvirt-guests.init.in (main): Add more required
      commands.
      e5360d0b
    • E
      libvirt-guests: enhance status · c629a288
      Eric Blake 提交于
      LSB and https://fedoraproject.org/wiki/Packaging/SysVInitScript
      require status to output something useful, rather than just use
      the exit code.
      
      * daemon/libvirt-guests.init.in (rh_status): Break into new routine,
      and provide output.
      (usage): Document status.
      c629a288
    • E
      libvirt-guests: detect invalid arguments · 592277bc
      Eric Blake 提交于
      Reject extra arguments.
      Return the correct status for unknown arguments, as mandated by
      https://fedoraproject.org/wiki/Packaging/SysVInitScript
      Add --help, as a permitted extension.
      
      * daemon/libvirt-guests.init.in (usage): New function.  Use it in
      more places, and return correct value.
      592277bc