1. 25 5月, 2020 4 次提交
  2. 20 5月, 2020 7 次提交
  3. 13 5月, 2020 6 次提交
  4. 12 5月, 2020 1 次提交
    • P
      conf: Sanitize handling of <auth> and <encryption> placement for disks · 6bde2a1e
      Peter Krempa 提交于
      Modern way to store <auth> and <encryption> of a <disk> is under
      <source>. This was added to mirror how <backingStore> handles these and
      in fact they are relevant to the source rather than to any other part of
      the disk. Historically we allowed them to be directly under <disk> and
      we need to keep compatibility.
      
      This wasn't a problem until introduction of -blockdev in qemu using of
      <auth> or <encryption> plainly wouldn't work with backing chains.
      
      Now that it works in backing chains and can be moved back and forth
      using snapshots/block-commit we need to ensure that the original
      placement is properly kept even if the source changes.
      
      To achieve the above semantics we need to store the preferred placement
      with the disk definition rather than the storage source definitions and
      also ensure that the modern way is chosen when the VM started with
      <source/encryption> only in the backing store.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1822878Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      6bde2a1e
  5. 11 5月, 2020 1 次提交
  6. 06 5月, 2020 1 次提交
    • A
      tests: Introduce virhostdevmock · eea5d63a
      Andrea Bolognani 提交于
      We need this for all tests that use virHostdevManager, because
      during creation of this object for unprivileged connections
      like those used in the test suite we would end up writing inside
      the user's home directory.
      
      That's bad manners in general, but when running the test suite
      inside a purposefully constrained environment such as the one
      exposed by pbuilder, it turns into an outright test failure:
      
        Could not initialize HostdevManager - operation failed: Failed
        to create state dir '/nonexistent/.cache/libvirt/hostdevmgr'
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      eea5d63a
  7. 05 5月, 2020 2 次提交
  8. 27 4月, 2020 4 次提交
  9. 23 4月, 2020 4 次提交
  10. 20 4月, 2020 4 次提交
    • M
      Avoid unnecessary error messages handling udev events · 72d99b09
      Mark Asselstine 提交于
      The udev monitor thread "udevEventHandleThread()" will lag the
      actual/real view of devices in sysfs as it serially processes udev
      monitor events. So for instance if you were to run the following cmd
      to create a new veth pair and rename one of the veth endpoints
      
      you might see the following monitor events and real world that looks like
      
                                           time
      			              |    create v0 sysfs entry
      wake udevEventHandleThread            |    create v1 sysfs entry
      udev_monitor_receive_device(v1-add)   |    move v0 sysfs to v2
      udevHandleOneDevice(v1)               |
      udev_monitor_receive_device(v0-add)   |
      udevHandleOneDevice(v0)               | <--- error msgs in virNetDevGetLinkInfo()
      udev_monitor_receive_device(v2-move)  |      as v0 no longer exists
      udevHandleOneDevice(v2)               |
                                           \/
      
      As you can see the changes in sysfs can take place well before we get
      to act on the events in the udevEventHandleThread(), so by the time we
      get around to processing the v0 add event, the sysfs entry has been
      moved to v2.
      
      To work around this we check if the sysfs entry is valid before
      attempting to read it and don't bother trying to read link info if
      not. This is safe since we will never read sysfs entries earlier than
      it existing, ie. if the entry is not there it has either been removed
      in the time since we enumerated the device or something bigger is
      busted, in either case, no sysfs entry, no link info. In the case
      described above we will eventually get the link info as we work
      through the queue of monitor events and get to the 'move' event.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1557902Signed-off-by: NMark Asselstine <mark.asselstine@windriver.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NMartin Kletzander <mkletzan@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      72d99b09
    • M
      virnetdev.c: Use g_auto*() · 281f445b
      Michal Privoznik 提交于
      While I'm at it, use more g_autofree and g_autoptr() in this
      file. This also fixes a possible mem-leak in
      virNetDevGetVirtualFunctions().
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      281f445b
    • M
      virNetDevSwitchdevFeature: Make failure to get 'family_id' non-fatal · 423664a6
      Michal Privoznik 提交于
      I've just got a new machine and I'm still converging on the
      kernel config. Anyway, since I don't have enabled any of SRIO-V
      drivers, my kernel doesn't have NET_DEVLINK enabled (i.e.
      virNetDevGetFamilyId() returns 0). But this makes nodedev driver
      ignore all interfaces, because when enumerating all devices via
      udev, the control reaches virNetDevSwitchdevFeature() eventually
      and subsequently virNetDevGetFamilyId() which 'fails'. Well, it's
      not really a failure - the virNetDevSwitchdevFeature() stub
      simply returns 0.
      
      Also, move the call a few lines below, just around the place
      where it's needed.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      423664a6
    • M
      virNetDevGetFamilyId: Change signature · ca616274
      Michal Privoznik 提交于
      Introduced in v3.8.0-rc1~96, the virNetDevGetFamilyId() gets
      netlink family ID for passed family name (even though it's used
      only for getting "devlink" ID). Nevertheless, the function
      returns 0 on an error or if no family ID was found. This makes it
      harder for a caller to distinguish these two. Change the retval
      so that a negative value is returned upon error, zero is no ID
      found (but no error encountered) and a positive value is returned
      on successful translation.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      ca616274
  11. 18 4月, 2020 1 次提交
  12. 17 4月, 2020 1 次提交
    • J
      util: Fix virDaemonForkIntoBackground · 36e12529
      Jiri Denemark 提交于
      This commit partially reverts
      
          commit c360ea28
          Refs: v6.2.0-rc1-1-gc360ea28
          Author:     Rafael Fonseca <r4f4rfs@gmail.com>
          AuthorDate: Fri Mar 27 18:40:47 2020 +0100
          Commit:     Michal Prívozník <mprivozn@redhat.com>
          CommitDate: Mon Mar 30 09:48:22 2020 +0200
      
          util: virdaemon: fix compilation on mingw
      
          The daemons are not supported on Win32 and therefore were not compiled
          in that platform. However, with the daemon code sharing, all the code in
          utils *is* compiled and it failed because `waitpid`, `fork`, and
          `setsid` are not available. So, as before, let's not build them on
          Win32 and make the code more portable by using existing vir* wrappers.
      
      Not compiling virDaemonForkIntoBackground on Win32 is good, but the
      second part of the original patch incorrectly replaced waitpid and fork
      with our virProcessWait and virFork APIs. These APIs are more than just
      simple wrappers and we don't want any of the extra functionality.
      Especially virFork would reset any setup made before
      virDaemonForkIntoBackground is called, such as logging, signal handling,
      etc.
      
      As a result of the change the additional fix in v6.2.0-67-ga87e4788
      (util: virdaemon: fix waiting for child processes) is no longer
      needed and it is effectively reverted by this commit.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      36e12529
  13. 14 4月, 2020 1 次提交
  14. 08 4月, 2020 1 次提交
  15. 30 3月, 2020 2 次提交