1. 05 11月, 2018 6 次提交
    • N
      nwfilter: Instantiate active filter bindings during driver init · 67125e0d
      Nikolay Shirokovskiy 提交于
      Commit 57f5621f modified nwfilterInstantiateFilter to detect when
      a filter binding was already present before attempting to add the
      new binding and instantiate it. Additionally, the change to
      nwfilterStateInitialize to call virNWFilterBindingObjListLoadAllConfigs
      (from commit c21679fa) to load active domain filter bindings, but
      not instantiate them eventually leads to a problem for the QEMU
      driver reconnection logic after a daemon restart where the filter
      bindings would no longer be instantiated.
      
      Subsequent commit f14c37ce replaced the nwfilterInstantiateFilter
      with virDomainConfNWFilterInstantiate which uses @ignoreExists to
      detect presence of the filter and still did not restore the filter
      instantiation call when making the new nwfilter bindings logic active.
      
      Thus in order to instantiate any active domain filter, we will call
      virNWFilterBuildAll with 'false' to indicate the need to go through
      all the active bindings calling virNWFilterInstantiateFilter to
      instantiate the filter bindings.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      67125e0d
    • J
      nodedev: Document the udevEventHandleThread · 29183778
      John Ferlan 提交于
      Commit cdbe1332 neglected to document the API. So let's add some
      details about the algorithm and why it was used to help future
      readers understand the issues encountered.
      
      NB: Management of the processing udev device notification is a
      delicate balance between the udev process, the scheduler, and when
      exactly the data from/for the socket is received. The balance is
      particularly important for environments when multiple devices are
      added into the system more or less simultaneously such as is done
      for mdev or SRIOV. In these cases old libudev blocking on the udev
      recv() occurs more frequently. It's expected that future devices
      will follow similar algorithms. Even though the algorithm does
      present some challenges for older OS's (such as Centos 6), trying
      to rewrite the algorithm to fit both models would be more complex
      and involve pulling the monitor object out of the private data
      lockable object and would need to be guarded by a separate lock.
      Devising such an algorithm to work around issues with older OS's
      at the expense of more modern OS algorithms in newer event processing
      code may result in unexpected issues, so the choice is to encourage
      use of newer OS's with newer udev event processing code.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      29183778
    • M
      qemu: Dissolve qemuBuildVhostuserCommandLine in qemuBuildInterfaceCommandLine · 4de4e4bc
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1524230
      
      The qemuBuildVhostuserCommandLine builds command line for
      vhostuser type interfaces. It is duplicating some code of the
      function it is called from (qemuBuildInterfaceCommandLine)
      because of the way it's called. If we merge it into the caller
      not only we save a few lines but we also enable checks that we
      would have to duplicate otherwise (e.g. QoS availability).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      4de4e4bc
    • M
      qemuBuildInterfaceCommandLine: Reorder VIR_FREE · e7b7b617
      Michal Privoznik 提交于
      When we have variables A, B, C then there are two ways to free
      them. Either in the order they are declared or the reversed one.
      Any other ordering is confusing. In this commit I'm reordering
      calls to VIR_FREE in the reversed order.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      e7b7b617
    • M
      Post-release version bump to 4.10.0 · 18f90481
      Michal Privoznik 提交于
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      18f90481
    • D
      Libvirt release 4.9.0 · 7a10a6a5
      Daniel Veillard 提交于
      * docs/news.xml: updated for release
      Signed-off-by: NDaniel Veillard <veillard@redhat.com>
      7a10a6a5
  2. 02 11月, 2018 1 次提交
  3. 31 10月, 2018 1 次提交
  4. 30 10月, 2018 3 次提交
  5. 23 10月, 2018 2 次提交
  6. 22 10月, 2018 1 次提交
  7. 20 10月, 2018 1 次提交
  8. 19 10月, 2018 3 次提交
  9. 18 10月, 2018 2 次提交
  10. 17 10月, 2018 3 次提交
  11. 15 10月, 2018 8 次提交
  12. 12 10月, 2018 5 次提交
    • P
      util: storage: Properly parse URIs with missing trailing slash · 6e7e965d
      Peter Krempa 提交于
      The URI parser used by libvirt does not populate uri->path if the
      trailing slash is missing. The code virStorageSourceParseBackingURI
      would then not populate src->path.
      
      As only NBD network disks are allowed to have the 'name' field in the
      XML defining the disk source omitted we'd generate an invalid XML which
      we'd not parse again.
      
      Fix it by populating src->path with an empty string if the uri is
      lacking slash.
      
      As pointed out above NBD is special in this case since we actually allow
      it being NULL. The URI path is used as export name. Since an empty
      export does not make sense the new approach clears the src->path if the
      trailing slash is present but nothing else.
      
      Add test cases now to cover all the various cases for NBD and non-NBD
      uris as there was to time only 1 test abusing the quirk witout slash for
      NBD and all other URIs contained the slash or in case of NBD also the
      export name.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      6e7e965d
    • P
      util: storage: Rename '@path' argument of virStorageSourceParseBackingURI · 4471f770
      Peter Krempa 提交于
      The name is misleading. Change it to 'uristr' so that 'path' can be
      reused in the proper context later.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      4471f770
    • E
      virsh: Fix regression with duplicated error messages · 35966308
      Eric Blake 提交于
      Commit 4f4c3b13 (v3.3) fixed an issue where performing cleanup of
      libvirt objects could sometimes lose error messages, by adding code
      to copy the libvirt error into last_error prior to cleanup paths.
      However, it caused a regression: on other paths, some errors are now
      printed twice, if libvirt still remembers in its thread-local
      storage that an error was set even after virsh cleared last_error.
      For example:
      
      $ virsh -c test:///default snapshot-delete test blah
      error: Domain snapshot not found: no domain snapshot with matching name 'blah'
      error: Domain snapshot not found: no domain snapshot with matching name 'blah'
      
      Fix things by telling libvirt to discard any thread-local errors at
      the same time virsh prints an error message (whether or not the libvirt
      error is the same as what is stored in last_error).
      
      Update the virsh-undefine testsuite (partially reverting portions of
      commit b620bdee, by removing -q, to more easily pinpoint which commands
      are causing which messages), now that there is only one error message
      instead of two.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      35966308
    • O
      rpc: reproducible genprotocol output · 297ed93a
      Olaf Hering 提交于
      If the same source gets built twice ('build same source on different
      hosts at different times') the resulting files may differ.
      Fix this by sorting the hash keys before usage.
      Signed-off-by: NOlaf Hering <olaf@aepfle.de>
      297ed93a
    • J
      qemu: Remove unused qemuProcessAutostartAll · 86a6cb13
      John Ferlan 提交于
      The function was never defined in source, just the protoype.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      86a6cb13
  13. 11 10月, 2018 1 次提交
  14. 10 10月, 2018 3 次提交
    • M
      virfile: Rework virFileIsSharedFixFUSE · 1dbf6222
      Michal Privoznik 提交于
      There are couple of things wrong with the current implementation.
      The first one is that in the first loop the code tries to build a
      list of fuse.glusterfs mount points. Well, since the strings are
      allocated in a temporary buffer and are not duplicated this
      results in wrong decision made later in the code.
      
      The second problem is that the code does not take into account
      subtree mounts. For instance, if there's a fuse.gluster mounted
      at /some/path and another FS mounted at /some/path/subdir the
      code would not recognize this subdir mount.
      Reported-by: NHan Han <hhan@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
      1dbf6222
    • M
      virFileIsSharedFSType: Detect direct mount points · 98ca1d52
      Michal Privoznik 提交于
      If the given path is already a mount point (e.g. a bind mount of
      a file, or simply a direct mount point of a FS), then our code
      fails to detect that because the first thing it does is cutting
      off part after last slash '/'.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
      98ca1d52
    • M
      virfiletst: Test virFileIsSharedFS · a7b4eb7d
      Michal Privoznik 提交于
      Introduce some basic test cases for virFileIsSharedFS(). More
      will be added later. In order to achieve desired result, mocks
      for setmntent() and statfs() need to be invented because the
      first thing that virFileIsSharedFS() does is calling the latter.
      If it finds a FUSE mount it'll call the former.
      
      The mock might look a bit complicated, but in fact it's quite
      simple. The test sets LIBVIRT_MTAB env variable to hold the
      absolute path to a file containing mount table. Then, statfs()
      returns matching FS it finds, and setmntent() is there just to
      replace /proc/mounts with the file the test wants to load.
      
      Adding this test also exposed a bug we have - because we assume
      the given path points to a file we cut off what we assume is a
      file name to obtain directory path and only then we call
      statfs(). This is buggy because the passed path could be already
      a mount point.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
      a7b4eb7d