1. 24 12月, 2010 22 次提交
    • E
      qemu: add -incoming fd:n capability checking · abff0290
      Eric Blake 提交于
      * src/qemu/qemu_capabilities.h (QEMUD_CMD_FLAG_MIGRATE_QEMU_FD):
      New enum value.
      * src/qemu/qemu_capabilities.c (qemuCapsComputeCmdFlags): Populate
      flags according to qemu version.
      * tests/qemuhelptest.c (mymain): Adjust test.
      abff0290
    • J
      spec: Enable ESX driver on RHEL · 40dbbd6e
      Jiri Denemark 提交于
      40dbbd6e
    • D
      spec: Automatically turn on cgconfig service · 318a4f6b
      Daniel P. Berrange 提交于
      A number of the libvirt APIs require the use of cgroups. This is not
      enabled by default on a RHEL6 install. After discussion with cgroups
      team, it was decided that upon installation of the libvirt RPM, we
      should automatically turn on the cgroups service. This will activate a
      default configuration that turns on all cgroups controllers libvirt
      requires for full operation.
      318a4f6b
    • J
      bridge: Fix uninitialized variable · 0ecac8aa
      Jiri Denemark 提交于
      0ecac8aa
    • L
      Replace setuid/setgid/initgroups with virSetUIDGID() · f42cf7cb
      Laine Stump 提交于
      This patch fixes https://bugzilla.redhat.com/show_bug.cgi?id=664406
      
      If qemu is run as a different uid, it has been unable to access mode
      0660 files that are owned by a different user, but with a group that
      the qemu is a member of (aside from the one group listed in the passwd
      file), because initgroups() is not being called prior to the
      exec. initgroups will change the group membership of the process (and
      its children) to match the new uid.
      
      To make this happen, the setregid()/setreuid() code in
      qemuSecurityDACSetProcessLabel has been replaced with a call to
      virSetUIDGID(), which does both of those, plus calls initgroups.
      
      Similar, but not identical, code in qemudOpenAsUID() has been replaced
      with virSetUIDGID(). This not only consolidates the functionality to a
      single location, but also potentially fixes some as-yet unreported
      bugs.
      f42cf7cb
    • L
      new virSetUIDGID() utility function · d596c6dc
      Laine Stump 提交于
      virSetUIDGID() sets both the real and effective group and user of the
      process, and additionally calls initgroups() to assure that the
      process joins all the auxiliary groups that the given uid is a member
      of.
      d596c6dc
    • L
      Preserve errno across calls to error reporting functions & VIR_FREE · 17e19add
      Laine Stump 提交于
      There are cases when we want log an error message, and possibly free
      some memory as part of the cleanup, while still preserving errno for a
      caller, but the functions that log errors, and virFree (VIR_FREE) make
      system calls that will clear errno. This patch preserves errno during
      those most basic functions (corresponding to virReportSystemError(),
      virReportOOMError(), networkReportError(), etc, as well as
      virStrError()). It does *not preserve errno across calls to higher
      level items such as virDispatchError(), as it's assumed the caller is
      all finished with any need for errno by the time it dispatches the
      error.
      17e19add
    • L
      Run radvd for virtual networks with IPv6 addresses · 8090a568
      Laine Stump 提交于
      Running an instance of the router advertisement daemon (radvd) allows
      guests using the virtual network to automatically acquire an IPv6
      address and default route. Note that acquiring an address only works
      for networks with a prefix length of exactly 64 - radvd is still run
      in other circumstances, and still advertises routes, but autoconf will
      not work because it requires exactly 64 bits of address info from the
      network prefix.
      
      This patch avoids a race condition with the pidfile by manually
      daemonizing radvd rather than allowing it to daemonize itself, then
      creating our own pidfile (in addition to radvd's own file, which is
      unnecessary, but there is no way to tell radvd to not create it). This
      is accomplished by exec'ing it with "--debug 1" in the commandline,
      and using virCommand's features to fork, create a pidfile, and detach
      from the newly forked process.
      8090a568
    • L
      Turn on IPv6 support in the bridge_driver.c virtual network driver · 6ccce752
      Laine Stump 提交于
      At this point everything is already in place to make IPv6 happen, we just
      need to add a few rules, remove some checks for IPv4-only, and document
      the changes to the XML on the website.
      6ccce752
    • L
      Update iptables.c to also support ip6tables. · 537e65e7
      Laine Stump 提交于
      All of the iptables functions eventually call down to a single
      bottom-level function, and fortunately, ip6tables syntax (for all the
      args that we use) is identical to iptables format (except the
      addresses), so all we need to do is:
      
      1) Get an address family down to the lowest level function in each
         case, either implied through an address, or explicitly when no
         address is in the parameter list, and
      
      2) At the lowest level, just decide whether to call "iptables" or
         "ip6tables" based on the family.
      
      The location of the ip6tables binary is determined at build time by
      autoconf. If a particular target system happens to not have ip6tables
      installed, any attempts to run it will generate an error, but that
      won't happen unless someone tries to define an IPv6 address for a
      network. This is identical behavior to IPv4 addresses and iptables.
      537e65e7
    • L
      Support multiple IP addresses on one network in bridge_driver.c · ad48dfa1
      Laine Stump 提交于
      This patch reorganizes the code in bridge_driver.c to account for the
      concept of a single network with multiple IP addresses, without adding
      in the extra variable of IPv6. A small bit of code has been
      temporarily added that checks all given addresses to verify they are
      IPv4 - this will be removed when full IPv6 support is turned on.
      ad48dfa1
    • L
      Change virtual network XML parsing/formatting to support IPv6 · a950dd2a
      Laine Stump 提交于
      This commit adds support for IPv6 parsing and formatting to the
      virtual network XML parser, including moving around data definitions
      to allow for multiple <ip> elements on a single network, but only
      changes the consumers of this API to accommodate for the changes in
      API/structure, not to add any actual IPv6 functionality. That will
      come in a later patch - this patch attempts to maintain the same final
      functionality in both drivers that use the network XML parser - vbox
      and "bridge" (the Linux bridge-based driver used by the qemu
      hypervisor driver).
      
      * src/libvirt_private.syms: Add new private API functions.
      * src/conf/network_conf.[ch]: Change C data structure and
        parsing/formatting.
      * src/network/bridge_driver.c: Update to use new parser/formatter.
      * src/vbox/vbox_tmpl.c: update to use new parser/formatter
      * docs/schemas/network.rng: changes to the schema -
        * there can now be more than one <ip> element.
        * ip address is now an ip-addr (ipv4 or ipv6) rather than ipv4-addr
        * new optional "prefix" attribute that can be used in place of "netmask"
        * new optional "family" attribute - "ipv4" or "ipv6"
          (will default to ipv4)
        * define data types for the above
      * tests/networkxml2xml(in|out)/nat-network.xml: add multiple <ip> elements
        (including IPv6) to a single network definition to verify they are being
        correctly parsed and formatted.
      a950dd2a
    • L
      make the <dhcp> element optional in network.rng · 008abeee
      Laine Stump 提交于
      In practice this has always been optional, but the RNG has shown it as
      mandatory, and since all the examples for make check had it, it was
      never noticed. One of the existing test cases has been changed to
      check for this.
      
      I also noticed that the dhcp/host/ip was still defined as <text/>,
      but should really be <ref name='ipv4-addr'/>
      008abeee
    • L
      Replace brSetInetAddress/brSetInetNetmask with brAddInetAddress · 20718b8b
      Laine Stump 提交于
      brSetInetAddress can only set a single IP address on the bridge, and
      uses a method (ioctl(SIOCSETIFADDR)) that only works for IPv4. Replace
      it and brSetInetNetmask with a single function that uses the external
      "ip addr add" command to add an address/prefix to the interface - this
      supports IPv6, and allows adding multiple addresses to the interface.
      
      Although it isn't currently used in the code, we also add a
      brDelInetAddress for completeness' sake.
      
      Also, while we're modifying bridge.c, we change brSetForwardDelay and
      brSetEnableSTP to use the new virCommand API rather than the
      deprecated virRun, and also log an error message in bridge_driver.c if
      either of those fail (previously the failure would be completely
      silent).
      20718b8b
    • L
      Make virtual network netmasks optional · 4713f074
      Laine Stump 提交于
      When a netmask isn't specified for an IPv4 address, one can be implied
      based on what network class range the address is in. The
      virNetworkDefPrefix function does this for us, so netmask isn't
      required.
      4713f074
    • L
      Pass prefix rather than netmask into iptables functions · b23d417c
      Laine Stump 提交于
      IPv6 will use prefix exclusively, and IPv4 will also optionally be
      able to use it, and the iptables functions really need a prefix
      anyway, so use the new virNetworkDefPrefix() function to send prefixes
      into iptables functions instead of netmasks.
      
      Also, in a couple places where a netmask is actually needed, use the
      new private API function for it rather than getting it directly. This
      will allow for cases where no netmask or prefix is specified (it
      returns the default for the current class of network.)
      b23d417c
    • L
      Consistently return 0 on success, -1 on failure in bridge_driver.c · 6e3e6db1
      Laine Stump 提交于
      Some functions in this file were returning 1 on success and 0 on
      failure, and others were returning 0 on success and -1 on
      failure. Switch them all to return the libvirt-preferred 0/-1.
      6e3e6db1
    • L
      Fix logging of failed iptables commands · cf731189
      Laine Stump 提交于
      The functions in iptables.c all return -1 on failure, but all their
      callers (which all happen to be in bridge_driver.c) assume that they
      are returning an errno, and the logging is done accordingly. This
      patch fixes all the error checking and logging to assume < 0 is an
      error, and nothing else.
      cf731189
    • L
      New virNetworkDef utility functions · 8322863f
      Laine Stump 提交于
      Later patches will add the possibility to define a network's netmask
      as a prefix (0-32, or 0-128 in the case of IPv6). To make it easier to
      deal with definition of both kinds (prefix or netmask), add two new
      functions:
      
      virNetworkDefNetmask: return a copy of the netmask into a
      virSocketAddr. If no netmask was specified in the XML, create a
      default netmask based on the network class of the virNetworkDef's IP
      address.
      
      virNetworkDefPrefix: return the netmask as numeric prefix (or the
      default prefix for the network class of the virNetworkDef's IP
      address, if no netmask was specified in the XML)
      8322863f
    • L
      New virSocketAddr utility functions · 1ab80f32
      Laine Stump 提交于
      virSocketPrefixToNetmask: Given a 'prefix', which is the number of 1
      bits in a netmask, fill in a virSocketAddr object with a netmask as an
      IP address (IPv6 or IPv4).
      
      virSocketAddrMask: Mask off the host bits in one virSocketAddr
      according to the netmask in another virSocketAddr.
      
      virSocketAddrMaskByPrefix, Mask off the host bits in a virSocketAddr
      according to a prefix (number of 1 bits in netmask).
      
      VIR_SOCKET_FAMILY: return the family of a virSocketAddr
      1ab80f32
    • W
      fix syntax error in configure.ac · 9a4af303
      Wen Congyang 提交于
      When I run configure, I receive some syntax error.
      
      .....
      checking where to find <rpc/rpc.h>... none
      checking for library containing dlopen... -ldl
      /configure: line 52500: test: =: unary operator expected
      /configure: line 52766: test: =: unary operator expected
      checking linux/kvm.h usability... yes
      checking linux/kvm.h presence... yes
      .....
      Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
      9a4af303
    • M
      docs: Make VMware Workstation / Player page appear in the menu · e1cee108
      Matthias Bolte 提交于
      By adding it to sitemap.html.in. Also <ul> can't be nested in <p>.
      e1cee108
  2. 23 12月, 2010 8 次提交
  3. 22 12月, 2010 9 次提交
    • H
      Fix memory leak in virsh · 29f92d64
      Hu Tao 提交于
      29f92d64
    • J
      docs: fixed typo, added table of contents · c207b6d9
      Justin Clift 提交于
      c207b6d9
    • M
      Distribute libvirt_vmx.syms · a5b36323
      Matthias Bolte 提交于
      This fixes the build from a tarball and makes autobuild.sh
      work again.
      
      This should actually have been part of this earlier commit:
      
        esx: Move VMX handling code out of the driver directory
        42b2f35d
      
      Reported by Eric Blake.
      a5b36323
    • M
      vmware: Fix undefine symbol with loadable drivers enabled · e2c13e03
      Matthias Bolte 提交于
      All other drivers are explicitly linked to gnulib. The VMware
      driver lacked this, resulting in mdir_name being an undefine
      symbol.
      
      Explicitly link the VMware driver to gnulib to fix this.
      e2c13e03
    • M
      esx: Move VMX handling code out of the driver directory · 42b2f35d
      Matthias Bolte 提交于
      Now the VMware driver doesn't depend on the ESX driver anymore.
      
      Add a WITH_VMX option that depends on WITH_ESX and WITH_VMWARE.
      Also add a libvirt_vmx.syms file.
      
      Move some escaping functions from esx_util.c to vmx.c.
      
      Adapt the test suite, ESX and VMware driver to the new code layout.
      42b2f35d
    • M
      esx: Fix cluster resource lookup when connecting to a vCenter · 8cd4ca45
      Matthias Bolte 提交于
      Connecting to a ESX(i) server that is part of a cluster failed
      when the connection also involved a vCenter.
      
      Accept ClusterComputeResource type in addition to ComputeResource
      type in the object lookup function.
      
      Reported by Guillaume Le Louët.
      8cd4ca45
    • E
      maint: avoid space-tab · 831aaf4a
      Eric Blake 提交于
      * daemon/Makefile.am: Avoid spurious space before tabs.
      * src/Makefile.am: Likewise.
      * examples/dominfo/Makefile.am: Likewise.
      * examples/domsuspend/Makefile.am: Likewise.
      * tools/Makefile.am: Likewise.
      * src/datatypes.h (VIR_CONNECT_MAGIC): Likewise.
      * src/internal.h (TODO): Likewise.
      * src/qemu/qemu_monitor.h (QEMU_MONITOR_MIGRATE): Likewise.
      * src/xen/xen_hypervisor.c (XEN_V2_OP_GETAVAILHEAP): Likewise.
      * src/xen/xs_internal.h: Likewise.
      831aaf4a
    • E
      command: avoid hanging on daemon processes · c7f28dec
      Eric Blake 提交于
      * src/util/command.c (virCommandRun): Don't capture output on
      daemons.
      * tests/commandtest.c (test18): Expose the bug.
      Reported by Laine Stump.
      c7f28dec
    • E
      build: skip vmware driver when building for RHEL · 973ada0e
      Eric Blake 提交于
      * libvirt.spec.in: Provide vmware conditionals.
      973ada0e
  4. 21 12月, 2010 1 次提交