1. 09 8月, 2019 1 次提交
    • D
      remote: stop trying to print help as giant blocks of text · d5f0c1b6
      Daniel P. Berrangé 提交于
      The remote daemon tries to print out its help text in a couple of giant
      blocks of text. This has already lead to duplication of the text for the
      privileged vs unprivileged execution mode. With the introduction of more
      daemons, this text is going to be duplicated many more times with small
      variations. This is very unfriendly to translators as they have to
      translate approximately the same text many times with small tweaks.
      
      Splitting the text up into individual strings to print means that each
      piece will only need translating once. It also gets rid of all the
      layout information from the translated strings, so avoids the problem of
      translators breaking formatting by mistake.
      Reviewed-by: NChristophe de Dinechin <dinechin@redhat.com>
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      d5f0c1b6
  2. 19 7月, 2019 1 次提交
  3. 12 7月, 2019 2 次提交
  4. 21 6月, 2019 2 次提交
    • D
      remote: delete the avahi mDNS support · 5a148ce8
      Daniel P. Berrangé 提交于
      Libvirtd has long had integration with avahi for advertising libvirtd
      using mDNS when TCP/TLS listening is enabled. For a long time the
      virt-manager application had support for auto-detecting libvirtds
      on the local network using mDNS, but this was removed last year
      
        commit fc8f8d5d7e3ba80a0771df19cf20e84a05ed2422
        Author: Cole Robinson <crobinso@redhat.com>
        Date:   Sat Oct 6 20:55:31 2018 -0400
      
          connect: Drop avahi support
      
          Libvirtd can advertise itself over avahi. The feature is disabled by
          default though and in practice I hear of no one actually using it
          and frankly I don't think it's all that useful
      
          The 'Open Connection' wizard has a disproportionate amount of code
          devoted to this feature, but I don't think it's useful or worth
          maintaining, so let's drop it
      
      I've never heard of any other applications having support for using
      mDNS to detect libvirtd instances. Though it is theoretically possible
      something exists out there, it is clearly going to be a niche use case
      in the virt ecosystem as a whole.
      
      By removing avahi integration we can cut down the dependency chain for
      the basic libvirtd install and reduce our code maint burden.
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      5a148ce8
    • D
      remote: drop code for migrating config files from pre-XDG dir layout · e10310d6
      Daniel P. Berrangé 提交于
      The unprivileged libvirtd daemon switched to use the XDG dir layout in
      the 0.9.13 release, and included code for moving config files from the
      old location. The chances of someone upgrading libvirt from <= 0.9.12
      directly to libvirt >= 5.5.0 is close enough to zero that we can
      reasonably drop the back compat code.
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      e10310d6
  5. 12 4月, 2019 1 次提交
  6. 06 3月, 2019 1 次提交
  7. 04 2月, 2019 2 次提交
  8. 18 12月, 2018 1 次提交
  9. 14 12月, 2018 1 次提交
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  10. 20 9月, 2018 1 次提交
  11. 13 8月, 2018 1 次提交
  12. 01 8月, 2018 1 次提交
  13. 27 6月, 2018 1 次提交
  14. 05 6月, 2018 1 次提交
  15. 25 4月, 2018 2 次提交
  16. 24 4月, 2018 1 次提交
  17. 23 3月, 2018 1 次提交
    • D
      remote: remove some __sun conditionals · da1ade7a
      Daniel P. Berrangé 提交于
      The libvirtd daemon has some arbitrary logic to drop privileges, but
      only on Solaris platforms. This was added during Xen days, when Xen was
      the only driver running in libvirtd. There's no expectation or testing
      that this works with the new libxl stack, nor whether dropping
      privileges breaks any of the secondary drivers. Finally, we'll be
      splitting drivers out into their own independant daemons, so this won't
      be applicable to libvirtd in future anyway.
      
      The remote driver client meanwhile arbitrarily disables daemon
      auto-spawn when connecting as non-root, breaking a key feature of
      libvirt unprivileged connections.
      
      Since we've not had any contributions for Solaris since circa 2012
      and we don't do any CI testing we should consider this platform
      unmaintained and thus reasonable to remove this cruft. If someone steps
      forward to maintain Solaris again, this code would need re-evaluating to
      come up with something more targetted.
      
      There's various __sun conditionals in the Xen driver code, but those are
      not touched. This is all for the legacy Xen driver, which will be
      entirely removed at some point in future, so not benefit to hacking out
      just the Solaris parts.
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      da1ade7a
  18. 16 3月, 2018 1 次提交
  19. 13 3月, 2018 1 次提交
    • J
      libvirtd: fix potential deadlock when reloading · 33c6eb96
      Jim Fehlig 提交于
      It is possible to deadlock libvirtd when concurrently starting a domain
      and restarting the daemon. Threads involved in the deadlock are
      
      Thread 4 (Thread 0x7fc13b53e700 (LWP 64084)):
      /lib64/libpthread.so.0
          at util/virthread.c:154
          at qemu/qemu_monitor.c:1083
          cmd=0x7fc110017700, scm_fd=-1, reply=0x7fc13b53d318) at
      qemu/qemu_monitor_json.c:305
      cmd=0x7fc110017700,
          reply=0x7fc13b53d318) at qemu/qemu_monitor_json.c:335
          at qemu/qemu_monitor_json.c:1298
          at qemu/qemu_monitor.c:1697
          vm=0x7fc110003d00, asyncJob=QEMU_ASYNC_JOB_START) at qemu/qemu_process.c:1763
      vm=0x7fc110003d00,
          asyncJob=6, logCtxt=0x7fc1100089c0) at qemu/qemu_process.c:1835
          vm=0x7fc110003d00, asyncJob=6, logCtxt=0x7fc1100089c0) at
      qemu/qemu_process.c:2180
      driver=0x7fc12004e1e0,
          vm=0x7fc110003d00, asyncJob=QEMU_ASYNC_JOB_START, incoming=0x0, snapshot=0x0,
          vmop=VIR_NETDEV_VPORT_PROFILE_OP_CREATE, flags=17) at qemu/qemu_process.c:6111
      driver=0x7fc12004e1e0,
          vm=0x7fc110003d00, updatedCPU=0x0, asyncJob=QEMU_ASYNC_JOB_START,
      migrateFrom=0x0,
          migrateFd=-1, migratePath=0x0, snapshot=0x0,
      vmop=VIR_NETDEV_VPORT_PROFILE_OP_CREATE,
          flags=17) at qemu/qemu_process.c:6334
          xml=0x7fc110000ed0 "<!--\nWARNING: THIS IS AN AUTO-GENERATED FILE.
      CHANGES TO IT ARE LIKELY TO BE\nOVERWRITTEN AND LOST. Changes to this xml
      configuration should be made using:\n  virsh edit testvv\nor other
      applicati"..., flags=0) at qemu/qemu_driver.c:1776
      ...
      
      Thread 1 (Thread 0x7fc143c66880 (LWP 64081)):
      /lib64/libpthread.so.0
          at util/virthread.c:122
      conf/nwfilter_conf.c:159
      sig=0x7ffe0a831e30,
          opaque=0x0) at remote/remote_daemon.c:724
          opaque=0x558c5328b230) at rpc/virnetdaemon.c:654
          at util/vireventpoll.c:508
      rpc/virnetdaemon.c:858
      remote/remote_daemon.c:1496
      (gdb) thr 1
      [Switching to thread 1 (Thread 0x7fc143c66880 (LWP 64081))]
      /lib64/libpthread.so.0
      (gdb) f 1
          at util/virthread.c:122
      122	    pthread_rwlock_wrlock(&m->lock);
      (gdb) p updateLock
      $1 = {lock = {__data = {__lock = 0, __nr_readers = 1, __readers_wakeup = 0,
            __writer_wakeup = 0, __nr_readers_queued = 0, __nr_writers_queued = 1,
      __writer = 0,
            __shared = 0, __rwelision = 0 '\000', __pad1 = "\000\000\000\000\000\000",
            __pad2 = 0, __flags = 0},
          __size = "\000\000\000\000\001", '\000' <repeats 15 times>, "\001",
      '\000' <repeats 34 times>, __align = 4294967296}}
      
      Reloading of the nwfilter driver is stuck waiting for a write lock, which
      already has a reader (from qemuDomainCreateXML) in the critical section.
      Since the reload occurs in the context of the main event loop thread,
      libvirtd becomes deadlocked. The deadlock can be avoided by offloading
      the reload work to a thread.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      33c6eb96
  20. 22 2月, 2018 1 次提交
  21. 31 1月, 2018 2 次提交
  22. 13 12月, 2017 1 次提交
  23. 18 11月, 2017 3 次提交
    • J
      libvirtd: Fix order of cleanup processing · 2f3054c2
      John Ferlan 提交于
      Current cleanup processing is ad-hoc at best - it's led to a couple of
      strange and hard to diagnose timing problems and crashes.
      
      So rather than perform cleanup in a somewhat random order, let's
      perform cleanup in the exact opposite order of startup.
      
      NB: It is possible that virNetlinkEventServerStart fails and we jump
      to cleanup before driversInitialized has been set. That could leave
      things inconsistent; however, resolution of that possibility is perhaps
      more trouble than it's worth to handle.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      2f3054c2
    • J
      libvirtd: Alter order of virNetDaemonNew · 723cadd9
      John Ferlan 提交于
      Let's be sure we can get a Daemon object before the server object.
      This is a more "orderly" way to do things since the svr object would
      be added to the dmn object afterwards.
      723cadd9
    • J
      libvirtd: Move pid_file_fd setup to before run_dir · b5726b7e
      John Ferlan 提交于
      Once we have forked the daemon successfully, let's claim the pidfile
      immediately rather than waiting for setup of run_dir.
      b5726b7e
  24. 28 8月, 2017 1 次提交
    • E
      daemon: logging: Fix --verbose option being ignored by the daemon · b988f794
      Erik Skultety 提交于
      Commit 94c465d0 refactored the logging setup phase but introduced an
      issue, where the daemon ignores verbose mode when there are no outputs
      defined and the default must be used. The problem is that the default
      output was determined too early, thus ignoring the potential '--verbose'
      option taking effect. This patch postpones the creation of the default
      output to the very last moment when nothing else can change. Since the
      default output is only created during the init phase, it's safe to leave
      the pointer as NULL for a while, but it will be set eventually, thus not
      affecting runtime.
      Patch also adjusts both the other daemons.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1442947Signed-off-by: NErik Skultety <eskultet@redhat.com>
      b988f794
  25. 27 7月, 2017 1 次提交
  26. 05 7月, 2017 1 次提交
  27. 13 6月, 2017 2 次提交
  28. 02 6月, 2017 1 次提交
  29. 16 3月, 2017 1 次提交
  30. 21 2月, 2017 1 次提交
    • P
      daemon: Refactor connection driver module loading · 633b7592
      Peter Krempa 提交于
      Pass the registration function name to virDriverLoadModule so that we
      can later call specific functions if necessary (e.g. for testing
      purposes). This gets rid of the rather ugly automatic name generator and
      unifies the code to load/initialize the modules.
      
      It's also clear which registration function gets called.
      633b7592
  31. 09 2月, 2017 1 次提交
  32. 15 12月, 2016 1 次提交