1. 16 8月, 2019 6 次提交
  2. 15 8月, 2019 4 次提交
  3. 14 8月, 2019 17 次提交
  4. 13 8月, 2019 2 次提交
    • D
      qemuxml2xmltest: Redirect access to FW descriptor dirs · 92832577
      Daniel Henrique Barboza 提交于
      If /etc/qemu/firmware directory exists, but is not readable then
      qemuxml2xmltest fails. This is because once domain XML is parsed
      it is validated. For that domain capabilities are needed.
      However, when constructing domain capabilities, FW descriptors
      are loaded and this is the point where the test fails, because it
      fails to open one of the directories.
      
      Fixes: 5b9819ee domain capabilities: Expose firmware auto selection feature
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      92832577
    • L
      util: allow tap-based guest interfaces to have MAC address prefix 0xFE · a60ee914
      Laine Stump 提交于
      Back in July 2010, commit 6ea90b84 (meant to resolve
      https://bugzilla.redhat.com/571991 ) added code to set the MAC address
      of any tap device to the associated guest interface's MAC, but with
      the first byte replaced with 0xFE. This was done in order to assure
      that
      
      1) the tap MAC and guest interface MAC were different (otherwise L2
         forwarding through the tap would not work, and the kernel would
         repeatedly issue a warning stating as much).
      
      2) any bridge device that had one of these taps attached would *not*
         take on the MAC of the tap (leading to network instability as
         guests started and stopped)
      
      A couple years later, https://bugzilla.redhat.com/798467 was filed,
      complaining that a user could configure a tap-based guest interface to
      have a MAC address that itself had a first byte of 0xFE, silently
      (other than the kernel warning messages) resulting in a non-working
      configuration. This was fixed by commit 5d571045, which logged an
      error and failed the guest start / interface attach if the MAC's first
      byte was 0xFE.
      
      Although this restriction only reduces the potential pool of MAC
      addresses from 2^46 (last two bits of byte 1 must be set to 10) by
      2^32 (still 4 orders of magnitude larger than the entire IPv4 address
      space), it also means that management software that autogenerates MAC
      addresses must have special code to avoid an 0xFE prefix. Now after 7
      years, someone has noticed this restriction and requested that we
      remove it.
      
      So instead of failing when 0xFE is found as the first byte, this patch
      removes the restriction by just replacing the first byte in the tap
      device MAC with 0xFA if the first byte in the guest interface is
      0xFE. 0xFA is the next-highest value that still has 10 as the lowest
      two bits, and still
      
      2) meets the requirement of "tap MAC must be different from guest
         interface MAC", and
      
      3) is high enough that there should never be an issue of the attached
         bridge device taking on the MAC of the tap.
      
      The result is that *any* MAC can be chosen by management software
      (although it would still not work correctly if a multicast MAC (lowest
      bit of first byte set to 1) was chosen), but that's a different
      issue).
      Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: Michal Privoznik <mprivozn@redhat.com
      a60ee914
  5. 12 8月, 2019 6 次提交
  6. 10 8月, 2019 1 次提交
    • D
      build: bump min libxml2 to 2.9.1 · e4c05240
      Daniel P. Berrangé 提交于
      The various distros have the following libxml2 vesions:
      
              CentOS 7: 2.9.1
        Debian Stretch: 2.9.4
         FreeBSD Ports: 2.9.9
      Ubuntu 16.04 LTS: 2.9.3
      
      Based on this sampling, we can reasonably bump libxml2 min
      version to 2.9.1
      
      The 'query_raw' struct field was added in version 2.6.28,
      so can be assumed to exist.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      e4c05240
  7. 09 8月, 2019 4 次提交
    • M
      qemu: check if numa cell's cpu range match with cpu topology count · 38d2e033
      Maxiwell S. Garcia 提交于
      QEMU shows a warning message if partial NUMA mapping is set. This patch
      adds a warning message in libvirt when editing the XML. It must be an
      error in future, when QEMU remove this ability.
      Signed-off-by: NMaxiwell S. Garcia <maxiwell@linux.ibm.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      38d2e033
    • D
      remote: enable connecting to the per-driver daemons · b18c273a
      Daniel P. Berrangé 提交于
      Historically URIs handled by the remote driver will always connect to
      the libvirtd UNIX socket. There will now be one daemon per driver, and
      each of these has its own UNIX sockets to connect to.
      
      It will still be possible to run the traditional monolithic libvirtd
      though, which will have the original UNIX socket path.
      
      In addition there is a virproxyd daemon that doesn't run any drivers,
      but provides proxying for clients accessing libvirt over IP sockets, or
      tunnelling to the legacy libvirtd UNIX socket path.
      
      Finally when running inside a daemon, the remote driver must not reject
      connections unconditionally. For example, the QEMU driver needs to be
      able to connect to the network driver. The remote driver must thus be
      willing to handle connections even when inside the daemon, provided no
      local driver is registered.
      
      This refactoring enables the remote driver to be able to connect to the
      per-driver daemons. The URI parameter "mode" accepts the values "auto",
      "direct" and "legacy" to control which daemons are connected to.
      
      The client side libvirt.conf config file also supports a "remote_mode"
      setting which is used if the URI parameter is not set.
      
      If neither the config file or URI parameter set a mode, then "auto"
      is used, whereby the client looks to see which sockets actually exist
      right now.
      
      The remote driver will only ever spawn the per-driver daemons, or
      the legacy libvirtd. It won't ever try to spawn virtproxyd, as
      that is only there for IP based connectivity, or for access from
      legacy remote clients.
      
      If connecting to a remote host over any kind of ssh tunnel, for now we
      must assume only the legacy socket exists. A future patch will introduce
      a netcat replacement that is tailored for libvirt to make remote
      tunnelling easier.
      
      The configure arg '--with-remote-default-mode=legacy|direct' allows
      packagers to set a default at build time. If not given, it will default
      to legacy mode.
      
      Eventually the default will switch to direct mode. Distros can choose
      to do the switch earlier if desired. The main blocker is testing and
      suitable SELinux/AppArmor policies.
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      b18c273a
    • D
      remote: refactor the code for choosing the UNIX socket path · 74695569
      Daniel P. Berrangé 提交于
      The ssh, libssh, libssh2 & unix transports all need to use a UNIX socket
      path, and duplicate some of the same logic for error checking. Pull this
      out into a separate method to increase code sharing.
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      74695569
    • D
      remote: use enum helpers for parsing remote driver transport · 8b216749
      Daniel P. Berrangé 提交于
      Instead of open-coding a string -> enum conversion, use the enum helpers
      for the remote driver transport. The old code uses STRCASEEQ, so we must
      force the URI transport to lowercase for sake of back-compatibility.
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      8b216749