1. 18 1月, 2013 9 次提交
    • J
      esx: No need to check for objectSpec · ea79a49f
      John Ferlan 提交于
      Coverity complains that the objectSpec != NULL check was unnecessary because
      there was no way to get to the label with objectSpec = NULL.
      ea79a49f
    • J
      e44d2400
    • D
      Followup fix for integer wraparound in port allocator · 55599102
      Daniel P. Berrange 提交于
      Change iterator variable datatype to int
      55599102
    • V
      qemu: Double mutex unlock in qemuDomainModifyDeviceFlags · 56fd5134
      Viktor Mihajlovski 提交于
      The driver mutex was unlocked in qemuDomainModifyDeviceFlags before
      entering qemuDomainObjBeginJobWithDriver where it will be unlocked once
      more leaving it in an undefined state. The result was that two
      threads were simultaneously looking up the domain hash table during
      multiple parallel device attach/detach operations.
      Luckily this triggered a virHashIterationError.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      56fd5134
    • R
      fixed xt_physdev warning when defining ip(6)tables rules · 65fb9d49
      Reinier Schoof 提交于
      When starting a VM, /var/log/messages was spammed with the following message:
       xt_physdev: using --physdev-out in the OUTPUT, FORWARD and POSTROUTING chains for non-bridged traffic is not supported anymore.
      
      With each extra VM I start, the messages get amplified
      exponentially. This results in longer starting times every new VM,
      relative the the previously started VM. When I ran a test with
      starting 100 equal VM's, the first VM started in about 2 seconds, the
      100th VM took 48 seconds to start. I'm running a vanilla 3.7.1 kernel,
      but I have the same issue on VM hosts with kernel 3.2.28 or 3.2.0,
      running libvirt 0.9.12 and 0.9.8 respectively.
      
      Looking into the warning, it seemed that iptables need an extra argument,
      --physdev-is-bridged, in commands like:
       iptables -A libvirt-out -m physdev --physdev-is-bridged --physdev-out vnet99 -g FP-vnet99
      
      With that, the warnings in /var/log/messages are gone and running the
      test again proved the 100th VM started in 3.8 seconds.
      65fb9d49
    • L
      conf: don't fail to parse <boot> when parsing a single device · 877dab6c
      Laine Stump 提交于
      This resolves:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=895294
      
      The symptom was that attempts to modify a network device using
      virDomainUpdateDeviceFlags() would fail if the original device had a
      <boot> element (e.g. "<boot order='1'/>"), even if the updated device
      had the same <boot> element. Instead, the following error would be logged:
      
        cannot modify network device boot index setting
      
      It's true that it's not possible to change boot order (internally
      known as bootIndex) of a live device; qemuDomainChangeNet checks for
      that, but the problem was that the information it was checking was
      incorrect.
      
      Explanation:
      
      When a complete domain is parsed, a global (to the domain) "bootMap"
      is passed down to the parse for each device; the bootMap is used to
      make sure that devices don't have conflicting settings for their boot
      orders.
      
      When a single device is parsed by itself (as in the case of
      virDomainUpdateDeviceFlags), there is no global bootMap that would be
      appropriate to send, so NULL is sent instead. However, although the
      lowest level function that parses just the boot order *does* simply
      skip the sanity check in that case, the next higher level
      "virDomainDeviceInfoParseXML" function refuses to call down to the
      lower "virDomainDeviceBootParseXML" if bootMap is NULL. So, the boot
      order is never set in the "new" device object, and when it is compared
      to the original (which does have a boot order), they don't match.
      
      The fix is to patch virDomainDeviceInfoParseXML to not care about
      bootMap, and just always call virDomainDeviceInfoBootParseXML whenever
      there is a <boot> element. When we are only parsing a single device,
      we don't care whether or not any specified boot order is consistent
      with the rest of the domain; we will always do this check later (in
      the current case, we do it by verifying that the net bootIndex exactly
      matches the old bootIndex).
      877dab6c
    • L
      network: use bandwidth from portgroup when appropriate · 7d480a46
      Laine Stump 提交于
      The bandwidth plug and unplug functions were assuming that an
      interface's bandwidth setting was always specified directly in the
      domain's <interface> definition, but that's not necessarily true - it
      could have been obtained from a <portgroup> definition in the network
      definition. This patch fixes those functions to use
      virDomainNetGetActualBandwidth(), which gets the bandwidth pointer
      from iface->data.network.actual if it exists, otherwise returns
      iface->bandwidth.
      7d480a46
    • J
      network: Resolve some issues around vlan copying · 35ed25bd
      John Ferlan 提交于
      Remove extraneous check for 'netdef' when dereferencing for vlan.nTags.
      Prior code would already check if netdef was NULL.
      
      Coverity complained about a path where the 'vlan' was potentially valid,
      but a prior checks may not have allocated 'iface->data.network.actual',
      so like other paths it needs to be allocated on the fly.
      
      Move the copying of vlan up earlier in networkAllocateActualDevice, so
      that actual.type gets properly set.
      
      Since the first assignment to vlan is redundant except in the case of
      jumping immediately to validate from the start of the function,
      eliminate its initial setting at the top of the function in favor of
      calling the helper function virDomainNetGetActualVlan() (which doesn't
      depend on the local vlan pointer being initialized) down at validate:
      Signed-off-by: NLaine Stump <laine@redhat.com>
      35ed25bd
    • D
      Fix inheritance of virNetClient · 757e3d3a
      Daniel P. Berrange 提交于
      When creating the virClass object for virNetClient, we specified
      virObject as the parent instead of virObjectLockable
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      757e3d3a
  2. 17 1月, 2013 30 次提交
  3. 16 1月, 2013 1 次提交