1. 31 8月, 2012 4 次提交
    • 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
    • J
      Fix xen driver following changes to make it stateful · f781e276
      Jim Fehlig 提交于
      Recent work to improve support for loadable driver modules introduced
      a regression in the xen driver.  The legacy xen driver is now a
      stateful, libvirtd driver but was not being registered when building
      without driver modules.
      
      A slight behavior change was also noted in the xen drivers when
      built as driver modules.  Previously, explicitly specifying a
      connection URI was not necessary, but now
      
      Compiled against library: libvirt 0.10.0
      Using library: libvirt 0.10.0
      Using API: QEMU 0.10.0
      error: failed to get the hypervisor version
      error: internal error Cannot find suitable emulator for x86_64
      
      The xen drivers need to be registered before the qemu driver since
      the qemu driver will return success with a null connection URI.
      This ordering is safe since the xen drivers will decline when not
      running the xen kernel.
      f781e276
    • 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
  2. 30 8月, 2012 11 次提交
    • 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
    • L
      network: get vlan info for Open vSwitch interfaces from proper source · b3bd5d6c
      Laine Stump 提交于
      This bug was revealed by the crash described in
      
        https://bugzilla.redhat.com/show_bug.cgi?id=852383
      
      The vlan info pointer sent to virNetDevOpenvswitchAddPort should never
      be non-NULL unless there is at least one tag. The factthat such a vlan
      info pointer was receveid pointed out that a caller was passing the
      wrong pointer. Instead of sending &net->vlan, the result of
      virDomainNetGetActualVlan(net) should be sent - that function will
      look for vlan info in net->data.network.actual->vlan, and in cany case
      return NULL instead of a pointer if the vlan info it finds has no
      tags.
      
      Aside from causing the crash, sending a hardcoded &net->vlan has the
      effect of ignoring vlan info from a <network> or <portgroup> config.
      b3bd5d6c
    • D
      Small cleanup on previous patch · 3219cc32
      Daniel Veillard 提交于
      As pointed by Eric Blake
      3219cc32
    • K
      Fix a crash when using Open vSwitch virtual ports · 5e465df6
      Kyle Mestery 提交于
      Fixup buffer usage when handling VLANs. Also fix the logic
      used to determine if the virNetDevVlanPtr is valid or not.
      Fixes crashes in the latest code when using Open vSwitch
      virtualports.
      Signed-off-by: NKyle Mestery <kmestery@cisco.com>
      5e465df6
    • O
      qemu: Sort the numa params only when it affects the live config · 20b780ae
      Osier Yang 提交于
      As the next boot doesn't have to worry about the previous numa
      params setting (there is no).
      20b780ae
    • D
      Fix configuration of QEMU security drivers · d0c0e79a
      Daniel P. Berrange 提交于
      If no 'security_driver' config option was set, then the code
      just loaded the 'dac' security driver. This is a regression
      on previous behaviour, where we would probe for a possible
      security driver. ie default to SELinux if available.
      
      This changes things so that it 'security_driver' is not set,
      we once again do probing. For simplicity we also always
      create the stack driver, even if there is only one driver
      active.
      
      The desired semantics are:
      
       - security_driver not set
           -> probe for selinux/apparmour/nop
           -> auto-add DAC driver
       - security_driver set to a string
           -> add that one driver
           -> auto-add DAC driver
       - security_driver set to a list
           -> add all drivers in list
           -> auto-add DAC driver
      
      It is not allowed, or possible to specify 'dac' in the
      security_driver config param, since that is always
      enabled.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d0c0e79a
  3. 29 8月, 2012 14 次提交
  4. 28 8月, 2012 7 次提交
    • O
      conf: Fix the problem which cause libvirtd to crash · a22909d5
      Osier Yang 提交于
      * src/conf/domain_conf.c: Use STREQ_NULLABLE instead of STREQ,
      as def->seclables[i]->model could be NULL.
      a22909d5
    • M
      build: define 'inline' iff HAVE_LIBNL1 · 500c2468
      Michal Privoznik 提交于
      Previous commit 0b4b53bb defined 'inline' to prevent broken build on
      systems with libnl1 headers. However, it broke build on systems with
      libnl3 headers. Therefore we must make that fix conditional.
      500c2468
    • M
      docs: CPU allocation and pinning clarification · 3de747c9
      Martin Kletzander 提交于
      There was a request for clarifying this part of the
      documentation. This also fixes a case used with CPU.
      3de747c9
    • E
      build: work with older libnl1 headers · 0b4b53bb
      Eric Blake 提交于
      Ubuntu 10.04 shipped with out-of-the-box libnl1 headers, which
      assumed the old gcc semantics of 'extern inline' as a C89 extension:
      the function will _always_ be inline if it is used, and that
      it may be declared extern inline in headers without a definition,
      as long as the definition occurs before any use.  But when C99
      added 'extern inline' as a mandatory feature of the language, with
      slightly different semantics than gcc (the function MUST have
      external linkage, and the inline definition MUST be present
      alongside any declaration, where the compiler can then choose
      which of the two versions to use), this rendered the use of
      'inline' in libnl's header obsolete.  Most distros already solved
      this by removing 'inline' (the resulting 'extern' is correct,
      regardless of gcc semantics), and libnl-3 does not have the
      problem (where it has switched to 'static inline' instead, again
      with the definition present, and again, our hack will result in
      plain 'static' with no ill effects).  But for the case of building
      out of the box, we hack around the broken Ubuntu header.
      
      * src/util/virnetlink.h: Work around libnl issue.
      0b4b53bb
    • M
      qemu: Fix define logic · 9eee40cc
      Michal Privoznik 提交于
      With current flow in qemudDomainDefine we might lose data
      when updating an existing domain. We parse given XML and
      overwrite the configuration.  Then we try to save the new
      config. However, this step may fail and we don't perform any
      roll back.  In fact, we remove the domain from the list of
      domains held up by qemu driver. This is okay as long as the
      domain was brand new one.
      9eee40cc
    • M
      qemu_agent: Switch to virReportSystemError() on system error · 3e0cc630
      Michal Privoznik 提交于
      Currently, if a syscall in qemu_agent.c fails we report an internal
      error even though we should be reporting a system error.
      3e0cc630
    • M
      Introduce new VIR_ERR_AGENT_UNRESPONSIVE error code · aa3e8bd4
      Michal Privoznik 提交于
      Currently, when guest agent is configured but not responsive
      (e.g. due to appropriate service not running in the guest)
      we return VIR_ERR_INTERNAL_ERROR. Both are wrong. Therefore
      we need to introduce new error code to reflect this case.
      aa3e8bd4
  5. 27 8月, 2012 4 次提交