1. 06 9月, 2012 8 次提交
    • O
      list: Define new API virStorageListAllStoragePools · 075c754a
      Osier Yang 提交于
      This introduces a new API to list the storage pool objects,
      4 groups of flags are provided to filter the returned pools:
      
        * Active or not
      
        * Autostarting or not
      
        * Persistent or not
      
        * And the pool type.
      
      include/libvirt/libvirt.h.in: New enum virConnectListAllStoragePoolFlags;
                                    Declare the API.
      python/generator.py: Skip the generating
      src/driver.h: (virDrvConnectListAllStoragePools)
      src/libvirt.c: Implementation for the API.
      src/libvirt_public.syms: Export the symbol.
      075c754a
    • P
      esx: Add implementation for virConnectListAllDomains() · 9e0ba44f
      Peter Krempa 提交于
      ESX doesn't use the common virDomainObj implementation so this patch
      adds a separate implementation.
      
      This driver supports all currently defined filtering flags, but as with
      other drivers some combinations yield a empty result list.
      9e0ba44f
    • P
      hyperv: Add implementation for virConnectListAllDomains() · 60d0ecda
      Peter Krempa 提交于
      Hyperv doesn't use the common virDomainObj implementation so this patch
      adds a separate implementation.
      
      This driver supports all currently added flags for filtering although
      some of those don't make sense with this driver (no support yet) and
      thus produce no output when used.
      60d0ecda
    • J
      Define DYNLIB_NAME on OpenBSD. · edc67a6f
      Jasper Lievisse Adriaanse 提交于
      edc67a6f
    • E
      build: avoid check-symfile on non-Linux · ae94cf2d
      Eric Blake 提交于
      I tested both OpenBSD and cygwin; both failed 'make check' with:
      
        GEN    check-symfile
      Can't return outside a subroutine at ./check-symfile.pl line 13.
      
      Perl requires 'exit 77' instead of 'return 77' in that context,
      but even with that tweak, the build still fails, since the exit
      code of 77 is only special to explicit TESTS=foo listings, and
      not to make-only dependency rules where we are not going through
      automake's test framework.
      
      * src/check-symfile.pl: Kill bogus platform check...
      * src/Makefile.am (check-symfile): ...and replace with an automake
      conditional.
      ae94cf2d
    • 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
    • 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
  2. 05 9月, 2012 4 次提交
  3. 04 9月, 2012 2 次提交
    • 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
  4. 03 9月, 2012 3 次提交
  5. 01 9月, 2012 2 次提交
  6. 31 8月, 2012 15 次提交
    • E
      command: shell-quote when logging commands · 54e99644
      Eric Blake 提交于
      Without this patch, logged command executions can be ambiguous if
      the command contained any shell metacharacters.  This has caused
      more than one person to attempt to patch clients to add unnecessary
      quoting, without realizing that the command itself was run with
      correct args, and only the logged output was ambiguous.
      
      * src/util/command.c (virCommandToString): Add shell escapes.
      * tests/commandtest.c (test16): Test new behavior.
      * tests/commanddata/test16.log: Update expected output.
      * tests/qemuxml2argvdata/qemuxml2argv-*.args: Likewise.
      * tests/networkxml2argvdata/*.argv: Likewise.
      54e99644
    • M
      qemu: fix remote port searching · b805e342
      Martin Kletzander 提交于
      After fixing the last review comments on remote port searching (commit
      a14b4aea), the commit right after that
      wasn't modified accordingly, therefore two values weren't changed as
      they should and the configurable ports don't work as expected.
      
      This simple commit changes last two values missed and fixes the issue.
      b805e342
    • O
      util: Update the inconsistent and outdated comments · a2145fae
      Osier Yang 提交于
      The codes were updated to allow to reset the device as long as
      there is no devices/functions behind the same bus. However, the
      comments were kept without touched.
      a2145fae
    • M
      conf: Avoid formatting auto-generated DAC labels · 990e46c4
      Marcelo Cerri 提交于
      To avoid backward compatibility issues, this patch suppresses
      auto-generated DAC labels from XML. This change affects commands such as
      dumpxml and save.
      Signed-off-by: NMarcelo Cerri <mhcerri@linux.vnet.ibm.com>
      990e46c4
    • M
      conf: Fix parsing of seclabels without model · 86e205a2
      Marcelo Cerri 提交于
      With this patch libvirt tries to assign a model to a single seclabel
      when model is missing. Libvirt will look up at host's capabilities and
      assign the first model to seclabel.
      
      This patch fixes:
      
      1. The problem with existing guests that have a seclabel defined in its XML.
      2. A XML parse error when a guest is restored.
      Signed-off-by: NMarcelo Cerri <mhcerri@linux.vnet.ibm.com>
      86e205a2
    • J
      qemu: Don't ignore CPU tuning config if required cgroups are missing · 774eb45b
      Jiri Denemark 提交于
      When domain XML contains any of the elements for setting up CPU
      scheduling parameters (period, quota, emulator_period, or
      emulator_quota) we need cpu cgroup to enforce the configuration.
      However, the existing code would just ignore silently such settings if
      either cgroups were not available at all cpu cgroup was not available.
      Moreover, APIs for manipulating CPU scheduler parameters were already
      failing if cpu cgroup was not available. This patch makes cpu cgroup
      mandatory for all domains that use CPU scheduling elements in their XML.
      774eb45b
    • G
      cgroup: fix libvirtd crash caused by messed memory · fccab89d
      Guannan Ren 提交于
      The variable max_id is initialized again in the step of
      getting cpu mapping variable map2. But in the next for loop
      we still expect original value of max_id, the bug will
      crash libvirtd when using on NUMA machine with big number
      of cpus.
      fccab89d
    • G
      657fef14
    • G
      cgroup: read more data from cgroup cpuacct.usage_percpu · c402eebc
      Guannan Ren 提交于
      On NUMA machine, the length of string got from file
      cpuacct.usage_percpu is quite large, so expand the
      limit of 1024 bytes.
      
      errors like:
      Failed to read file \
      '/cgroup/cpuacct/libvirt/qemu/rhel6q/cpuacct.usage_percpu': \
      Value too large for defined data type
      c402eebc
    • S
      nwfilter: adapt IP learning for broadcasted DHCP replies · 4021b85f
      Stefan Berger 提交于
      Adapt the IP learning code to also accept broadcasted DHCP replies
      4021b85f
    • S
      nwfilter: accept broadcasted DHCP replies in DHCP snooping code · c828a746
      Stefan Berger 提交于
      Some DHCP servers send their DHCP replies to the broadcast MAC address
      rather than to the MAC address of the VM. The existing DHCP snooping
      code assumes that the reply always goes to the MAC address of the VM
      thus filtering the traffic of some DHCP servers' replies.
      
      The below patch adapts the code to
      
      1) filter DHCP replies by comparing the MAC address in the reply against
         the MAC address of the VM (held in the snoop request)
      
      2) adapts the pcap filter for traffic towards the VM to accept DHCP replies
         sent to any MAC address; for further filtering we rely on 1)
      
      3) creates initial rules that are active while waiting for DHCP replies;
         these rules now accept DHCP replies to the VM's MAC address or to the
         MAC broadcast address
      c828a746
    • S
      Implement virMacAddrIsBroadcastRaw · 46b2cafb
      Stefan Berger 提交于
      Add function for testing for Ethernet broadcast address
      46b2cafb
    • K
      Fix adding ports to OVS bridges without VLAN tags · 7b9d55e6
      Kyle Mestery 提交于
      The introduction of the new VLAN code, along with the fix
      from 5e465df6, caused the
      addition of OVS ports to fail with the following message:
      
      ovs-vsctl: 00002|vsctl|ERR|: missing column name
      
      This fix takes into account the VLAN arguments are optional,
      and correctly sets up the command line to run the "ovs-vsctl"
      command to add ports to the OVS bridge.
      Signed-off-by: NKyle Mestery <kmestery@cisco.com>
      CC: Eric Blake <eblake@redhat.com>
      7b9d55e6
    • N
      Fix issue of PF brought down if VF is 8021.Qbh and pci passthrough · 3044433f
      Nishank Trivedi 提交于
      If a 8021.Qbh network device supports SRIOV and its VF is being used
      in pci passthrough mode, when the guest is shutdown or destroyed, the
      PF inteface is also brought down. qemuDomainHostdevNetConfigRestore()
      finds out the PF for provided hostdev (which is VF) and passes it to
      virNetDevPortProfileDisassociate() as linkdev. Later, linkdev gets passed
      to virNetDevSetOnline() where the interface is brought down by clearing
      IFF_UP flag.
      
      Bringing down a PF, when only VF is being brought down is not expected
      behavior. This patch adds a check so that virNetDevSetOnline() is called
      only for PF and not if device is a VF.
      Signed-off-by: NNishank Trivedi <nistrive@cisco.com>
      3044433f
    • S
      nwfilter: loop generated too many rules · 9e995c9a
      Stefan Berger 提交于
      The loop processing the trusted DHCP server generated one too
      many rules and added one final rules that accepted responses
      from all DHCP servers. Below patch fixes this.
      9e995c9a
  7. 30 8月, 2012 6 次提交
    • P
      security: Re-apply commit ce53382b · 1497e36d
      Peter Krempa 提交于
      Recent changes in the security driver discarded changes that fixed
      labeling un-confined guests.
      1497e36d
    • P
      vcpupin: Fix returning of arrays from virDomainVcpuPinAdd · 077e7bf5
      Peter Krempa 提交于
      virDomainVcpuPinAdd does a realloc on vcpupin_list if the new vcpu pin
      definition doesn't fit into the array. The list is an array of pointers
      but the function definition didn't support returning the changed pointer
      to the caller if it was realloced. This caused segfaults if realloc
      would change the base pointer.
      077e7bf5
    • P
      qemu: Fix possible infinite loop and segfault on error path. · 40dfb525
      Peter Krempa 提交于
      virDomainVcpuPinDefCopy when the control flow reaches out of memory
      cleanup code, the flow would end in a infinite loop as the loop variable
      wasn't decremented.
      
      Also a dereference of NULL pointers was possible if allocation of the
      Vcpu pinning definiton structure failed.
      40dfb525
    • P
      qemu: Clean up security driver initialisation and config file · 46514ff7
      Peter Krempa 提交于
      Commit d0c0e79a left behind some dead
      code (hasDAC can't be efectively set to true, because
      virSecurityManagerNew fails to load the "dac" driver).
      
      This patch also enhances the condition for adding the default
      auto-detected security manager if the manager array is allocated but
      empty.
      
      Also the configuration file for qemu driver still contains reference to
      the DAC driver that can't be enabled manualy.
      46514ff7
    • J
      qemu: Revert to blocking behavior of qemuAgentCommand · 7444ccce
      Jiri Denemark 提交于
      Before commit 05447e3a, qemuAgentCommand
      blocked until it got a reply or appropriate event. When new parameter
      was added to qemuAgentCommand in the above commit, all existing callers
      of it were updated in a wrong way changing them from blocking to
      5-seconds timeout.
      7444ccce
    • J
      qemu: Remove redundant parameter from qemuAgentSend · e360a960
      Jiri Denemark 提交于
      The @timeout parameter of qemuAgentSend is both redundant and confusing.
      This patch should not result in any functional changes.
      e360a960