1. 08 6月, 2010 5 次提交
  2. 06 6月, 2010 1 次提交
  3. 05 6月, 2010 4 次提交
    • L
      Adjust block size used by dd to speed QEMU domain save operations. · 20206a4b
      Laine Stump 提交于
      See https://bugzilla.redhat.com/show_bug.cgi?id=599091
      
      Saving a paused 512MB domain took 3m47s with the old block size of 512
      bytes. Changing the block size to 1024*1024 decreased the time to 56
      seconds. (Doubling again to 2048*1024 yielded 0 improvement; lowering
      to 512k increased the save time to 1m10s, about 20%)
      20206a4b
    • L
      Fix dereference of potentially freed pointer in qemudDomainSaveFlags · 1d45e1b6
      Laine Stump 提交于
      The pointer to the xml describing the domain is saved into an object
      prior to calling VIR_REALLOC_N() to make the size of the memory it
      points to a multiple of QEMU_MONITOR_MIGRATE_TO_FILE_BS. If that
      operation needs to allocate new memory, the pointer that was saved is
      no longer valid.
      
      To avoid this situation, adjust the size *before* saving the pointer.
      
      (This showed up when experimenting with very large values of
      QEMU_MONITOR_MIGRATE_TO_FILE_BS).
      1d45e1b6
    • J
      Fixes for commit 211dd1e9 · b1eb7f2e
      Jim Fehlig 提交于
      Fixes for issues in commit 211dd1e9 noted by by Jim Meyering.
      
      1. Allocate content buffer of size content_length + 1 to ensure
         NUL-termination.
      2. Limit content buffer size to 64k
      3. Fix whitespace issue
      
      V2:
        - Add comment to clarify allocation of content buffer
        - Add ATTRIBUTE_NONNULL where appropriate
        - User NULLSTR macro
      b1eb7f2e
    • E
      autobuild.sh: avoid bashism · fc6d5b26
      Eric Blake 提交于
      * autobuild.sh: Replace 'set -o pipefail' with POSIX alternative.
      Reported by Matthias Bolte.
      fc6d5b26
  4. 04 6月, 2010 1 次提交
    • J
      Allocate buffer to hold xend response · 211dd1e9
      Jim Fehlig 提交于
      There are cases when a response from xend can exceed 4096 bytes, in
      which case anything beyond 4096 is ignored. This patch changes the
      current fixed-size, stack-allocated buffer to a dynamically allocated
      buffer based on Content-Length in HTTP header.
      211dd1e9
  5. 03 6月, 2010 4 次提交
    • D
      Update nodedev scsi_host data before use · 2874a683
      David Allan 提交于
      * It appears that the udev event for HBA creation arrives before the
        associated sysfs data is fully populated, resulting in bogus data
        for the nodedev entry until the entry is refreshed.  This problem is
        particularly troublesome when creating NPIV vHBAs because it results
        in libvirt failing to find the newly created adapter and waiting for
        the full timeout period before erroneously failing the create
        operation.  This patch forces an update before any attempt to use
        any scsi_host nodedev entry.
      2874a683
    • D
      Fix device destroy return value · d3e43bad
      David Allan 提交于
      * Set return value in error cases
      * Clarify error message when parent device is not vport capable
      d3e43bad
    • E
      phyp: Strict check when listing domains · a5b7965a
      Eduardo Otubo 提交于
      a5b7965a
    • S
      add 802.1Qbh and 802.1Qbg handling · ca3b22bb
      Stefan Berger 提交于
      This patch that adds support for configuring 802.1Qbg and 802.1Qbh
      switches. The 802.1Qbh part has been successfully tested with real
      hardware. The 802.1Qbg part has only been tested with a (dummy)
      server that 'behaves' similarly to how we expect lldpad to 'behave'.
      
      The following changes were made during the development of this patch:
      
       - Merging Scott's v13-pre1 patch
       - Fixing endptr related bug while using virStrToLong_ui() pointed out
         by Jim Meyering
       - Addressing Jim Meyering's comments to v11
       - requiring mac address to the vpDisassociateProfileId() function to
         pass it further to the 802.1Qbg disassociate part (802.1Qbh untouched)
       - determining pid of lldpad daemon by reading it from /var/run/libvirt.pid
         (hardcode as is hardcode alson in lldpad sources)
       - merging netlink send code for kernel target and user space target
         (lldpad) using one function nlComm() to send the messages
       - adding a select() after the sending and before the reading of the
         netlink response in case lldpad doesn't respond and so we don't hang
       - when reading the port status, in case of 802.1Qbg, no status may be
         received while things are 'in progress' and only at the end a status
         will be there.
       - when reading the port status, use the given instanceId and vf to pick
         the right IFLA_VF_PORT among those nested under IFLA_VF_PORTS.
       - never sending nor parsing IFLA_PORT_SELF type of messages in the
         802.1Qbg case
       - iterating over the elements in a IFLA_VF_PORTS to pick the right
         IFLA_VF_PORT by either IFLA_PORT_PROFILE and given profileId
         (802.1Qbh) or IFLA_PORT_INSTANCE_UUID and given instanceId (802.1Qbg)
         and reading the current status in IFLA_PORT_RESPONSE.
       - recycling a previous patch that adds functionality to interface.c to
         - get the vlan identifier on an interface
         - get the flags of an interface and some convenience function to
           check whether an interface is 'up' or not (not currently used here)
       - adding function to determine the root physical interface of an
         interface. For example if a macvtap is linked to eth0.100, it will
         find eth0. Also adding a function that finds the vlan on the 'way to
         the root physical interface'
       - conveying the root physical interface name and index in case of 802.1Qbg
       - conveying mac address of macvlan device and vlan identifier in
         IFLA_VFINFO_LIST[ IFLA_VF_INFO[ IFLA_VF_MAC(mac), IFLA_VF_VLAN(vlan) ] ]
         to (future) lldpad via netlink
        - To enable build with --without-macvtap rename the
          [dis|]associatePortProfileId functions, prepend 'vp' before their
          name and make them non-static functions.
        - Renaming variable multicast to nltarget_kernel and inverting
          the logic
        - Addressing Jim Meyering's comments; this also touches existing
          code for example for correcting indentation of break statements or
          simplification of switch statements.
        - Renamed occurrencvirVirtualPortProfileDef to virVirtualPortProfileParamses
        - 802.1Qbg part prepared for sending a RTM_SETLINK and getting
          processing status back plus a subsequent RTM_GETLINK to
          get IFLA_PORT_RESPONSE.
          Note: This interface for 802.1Qbg may still change
        - [David Allan] move getPhysfn inside IFLA_VF_PORT_MAX to avoid
      compiler
          warning when latest if_link.h isn't available
        - move from Stefan's 802.1Qb{g|h} XML v8 to v9
        - move hostuuid and vf index calcs to inside doPortProfileOp8021Qbh
        - remove debug fprintfs
        - use virGetHostUUID (thanks Stefan!)
        - fix compile issue when latest if_link.h isn't available
        - change poll timeout to 10s, at 1/8 intervals
           - if polling times out, log msg and return -ETIMEDOUT
        - Add Stefan's code for getPortProfileStatus
        - Poll for up to 2 secs for port-profile status, at 1/8 sec intervals:
           - if status indicates error, abort openMacvtapTap
           - if status indicates success, exit polling
           - if status is "in-progress" after 2 secs of polling, exit
             polling loop silently, without error
      
      My patch finishes out the 802.1Qbh parts, which Stefan had mostly complete.
      I've tested using the recent kernel updates for VF_PORT netlink msgs and
      enic for Cisco's 10G Ethernet NIC.  I tested many VMs, each with several
      direct interfaces, each configured with a port-profile per the XML.  VM-to-VM,
      and VM-to-external work as expected.  VM-to-VM on same host (using same NIC)
      works same as VM-to-VM where VMs are on diff hosts.  I'm able to change
      settings on the port-profile while the VM is running to change the virtual
      port behaviour.  For example, adjusting a QoS setting like rate limit.  All
      VMs with interfaces using that port-profile immediatly see the effect of the
      change to the port-profile.
      
      I don't have a SR-IOV device to test so source dev is a non-SR-IOV device,
      but most of the code paths include support for specifing the source dev and
      VF index.  We'll need to complete this by discovering the PF given the VF
      linkdev.  Once we have the PF, we'll also have the VF index.  All this info-
      mation is available from sysfs.
      ca3b22bb
  6. 02 6月, 2010 8 次提交
  7. 29 5月, 2010 5 次提交
    • J
      build: make cpp indentation conform · f9a4df5a
      Jim Meyering 提交于
      * src/storage/storage_backend.h (VIR_STORAGE_VOL_OPEN_DEFAULT):
      Adjust s/#define/# define/, and align continued lines.
      f9a4df5a
    • C
      storage: Check for invalid storage mode before opening · 4a1abb3f
      Cole Robinson 提交于
      If a directory pool contains pipes or sockets, a pool start can fail or hang:
      
      https://bugzilla.redhat.com/show_bug.cgi?id=589577
      
      We already try to avoid these special files, but only attempt after
      opening the path, which is where the problems lie. Unify volume opening
      into helper functions, which use the proper open() flags to avoid error,
      followed by fstat to validate storage mode.
      
      Previously, virStorageBackendUpdateVolTargetInfoFD attempted to enforce the
      storage mode check, but allowed callers to detect this case and silently
      continue. In practice, only the FS backend was using this feature, the rest
      were treating unknown mode as an error condition. Unfortunately the InfoFD
      function wasn't raising an error message here, so error reporting was
      busted.
      
      This patch adds 2 functions: virStorageBackendVolOpen, and
      virStorageBackendVolOpenModeSkip. The latter retains the original opt out
      semantics, the former now throws an explicit error.
      
      This patch maintains the previous volume mode checks: allowing specific
      modes for specific pool types requires a bit of surgery, since VolOpen
      is called through several different helper functions.
      
      v2: Use ATTRIBUTE_NONNULL. Drop stat check, just open with
          O_NONBLOCK|O_NOCTTY.
      
      v3: Move mode check logic back to VolOpen. Use 2 VolOpen functions with
          different error semantics.
      
      v4: Make second VolOpen function more extensible. Didn't opt to change
          FS backend defaults, this can just be to fix the original bug.
      
      v5: Prefix default flags with VIR_, use ATTRIBUTE_RETURN_CHECK
      4a1abb3f
    • S
      macvtap: cannot support target device name · ca1b7cc8
      Stefan Berger 提交于
      Since the macvtap device needs active tear-down and the teardown logic
      is based on the interface name, it can happen that if for example 1 out
      of 3 interfaces was successfully created, that during the failure path
      the macvtap's target device name is used to tear down an interface that
      is doesn't own (owned by another VM).
      
      So, in this patch, the target interface name is reset so that there is
      no target interface name and the interface name is always cleared after
      a tear down.
      ca1b7cc8
    • D
      Improve nodedev parent/child relationships · 8b46a7bb
      David Allan 提交于
      * If a nodedev has a parent that we don't want to display, we should
        continue walking up the udev device tree to see if any of its
        earlier ancestors are devices that we display.  It makes the tree
        much nicer looking than having a whole lot of devices hanging off
        the root node.
      8b46a7bb
    • J
      Fix libvirt-guests init script · 1a5c465e
      Jiri Denemark 提交于
      Firstly, the init script has to touch its file under /var/lock/subsys
      when started, otherwise the system would think it's not running and
      won't stop it during shutdown.
      
      Secondly, for some reason there is a policy to automatically enable
      init scripts when they are installed, so let the specfile do this. We
      also need to start the init script to ensure it will be stopped during
      the first shutdown after installing the package.
      
      Also $LISTFILE should be enclosed by quotes everywhere as suggested by
      Eric.
      1a5c465e
  8. 28 5月, 2010 8 次提交
    • J
      maint: new syntax-check rule to ensure that AUTHORS stays in sync · 208b2ad8
      Jim Meyering 提交于
      * cfg.mk (sc_check_AUTHOR_list): New rule.
      * .mailmap: New file, to tell git log how to map email addresses.
      208b2ad8
    • P
      hooks: fix typo · 55945841
      Paolo Smiraglia 提交于
      * src/util/hooks.c (virHookLxcOp): Use correct bound.
      55945841
    • E
      build: silence cppi warning, clarify vbox headers · 6456eef8
      Eric Blake 提交于
      These files are borrowed from upstream release versions, and should
      not need further edits in the context of libvirt (instead, a new
      upstream vbox release would entail adding a new header file).  We do
      not re-generate these files as part of libvirt, nor do we want to lose
      our minor edits (such as cppi cleanups).
      
      * src/vbox/vbox_CAPI_v2_2.h: Clarify file origins.
      * src/vbox/vbox_CAPI_v3_0.h: Likewise.
      * src/vbox/vbox_CAPI_v3_1.h: Likewise.
      * src/vbox/vbox_CAPI_v3_2.h: Likewise.  Reindent with cppi.
      6456eef8
    • C
      network: bridge: Don't start network if it collides with host routing · a83fe2c2
      Cole Robinson 提交于
      Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=235961
      
      If using the default virtual network, an easy way to lose guest network
      connectivity is to install libvirt inside the VM. The autostarted
      default network inside the guest collides with host virtual network
      routing. This is a long standing issue that has caused users quite a
      bit of pain and confusion.
      
      On network startup, parse /proc/net/route and compare the requested
      IP+netmask against host routing destinations: if any matches are found,
      refuse to start the network.
      
      v2: Drop sscanf, fix a comment typo, comment that function could use
          libnl instead of /proc
      
      v3: Consider route netmask. Compare binary data rather than convert to
          string.
      
      v4: Return to using sscanf, drop inet functions in favor of virSocket,
          parsing safety checks. Don't make parse failures fatal, in case
          expected format changes.
      
      v5: Try and continue if we receive unexpected. Delimit parsed lines to
          prevent scanning past newline
      a83fe2c2
    • E
      maint: update AUTHORS with recent contributors · 1be3f095
      Eric Blake 提交于
      git shortlog $(git log -1 --format=%H AUTHORS).. | grep -v "^ "
      
      then add missing entries to AUTHORS.
      
      * AUTHORS: Update.
      1be3f095
    • C
      xen: Fix chardev listen sexpr formatting · 953809db
      Cole Robinson 提交于
      'listen' isn't a valid qemu-dm option, as reported a long time ago here:
      
      https://bugzilla.redhat.com/show_bug.cgi?id=492958
      
      Matches the near identical logic in qemu_conf.c
      
      v2: When parsing sexpr, only match on ",server", rather than
          full ',server,nowait'.
      953809db
    • C
      xen: Remove unused function · 7842e544
      Cole Robinson 提交于
      Signed-off-by: NCole Robinson <crobinso@redhat.com>
      7842e544
    • D
      v2 of Cole's wlan support · 07f6c3a9
      David Allan 提交于
      * Incorporated Jim's feedback (v1 & v2)
      
      * Moved case of DEVTYPE == "wlan" up as it's definitive that we have a network interface.
      
      * Made comment more detailed about the wired case to explain better
        how it differentiates between wired network interfaces and USB
        devices.
      07f6c3a9
  9. 27 5月, 2010 4 次提交
    • М
      Add docs on drive <serial> element · dafd354d
      Марк Коренберг 提交于
      * docs/formatdomain.html.in: Document <serial> element within
        <disk> and fix typo on <driver/> element
      dafd354d
    • M
      esx: Simplify goto usage · 041aac86
      Matthias Bolte 提交于
      Eliminate almost all backward jumps by replacing this common pattern:
      
      int
      some_random_function(void)
      {
          int result = 0;
          ...
      
        cleanup:
          <unconditional cleanup code>
          return result;
      
        failure:
          <cleanup code in case of an error>
          result = -1;
          goto cleanup
      }
      
      with this simpler pattern:
      
      int
      some_random_function(void)
      {
          int result = -1;
          ...
          result = 0;
      
        cleanup:
          if (result < 0) {
              <cleanup code in case of an error>
          }
      
          <unconditional cleanup code>
          return result;
      }
      
      Add a bool success variable in functions that don't have a int result
      that can be used for the new pattern.
      
      Also remove some unnecessary memsets in error paths.
      041aac86
    • J
      Support for VirtualBox version 3.2 · 8b0cd876
      Jean-Baptiste Rouault 提交于
      8b0cd876
    • M
      Use printf instead of echo -e in libvirt.spec.in · fa0bb9f6
      Matthias Bolte 提交于
      make rpm created dummy tests containing '-e #!/bin/sh' for me.
      fa0bb9f6