1. 04 2月, 2019 1 次提交
  2. 18 12月, 2018 1 次提交
  3. 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
  4. 20 9月, 2018 1 次提交
  5. 13 8月, 2018 1 次提交
  6. 01 8月, 2018 1 次提交
  7. 27 6月, 2018 1 次提交
  8. 05 6月, 2018 1 次提交
  9. 25 4月, 2018 2 次提交
  10. 24 4月, 2018 1 次提交
  11. 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
  12. 16 3月, 2018 1 次提交
  13. 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
  14. 22 2月, 2018 1 次提交
  15. 31 1月, 2018 2 次提交
  16. 13 12月, 2017 1 次提交
  17. 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
  18. 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
  19. 27 7月, 2017 1 次提交
  20. 05 7月, 2017 1 次提交
  21. 13 6月, 2017 2 次提交
  22. 02 6月, 2017 1 次提交
  23. 16 3月, 2017 1 次提交
  24. 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
  25. 09 2月, 2017 1 次提交
  26. 15 12月, 2016 2 次提交
  27. 28 10月, 2016 1 次提交
    • N
      daemon: Fix crash during daemon cleanup · 85c3a182
      Nikolay Shirokovskiy 提交于
      Do not dereference the 'dmn' until after the virStateCleanup is completed.
      
      During initialization, virStateInitialize requires/uses the "dmn" as the
      argument to/for the daemonInhibitCallback functions. Thus, cleanup cannot
      dereference 'dmn' until after calling the virStateCleanup which calls the
      the daemonInhibitCallback using 'dmn'; otherwise, the following crash occurs:
      
      backtrace (shortened a bit)
      
      1  0x00007fd3a791b2e6 in virCondWait (c=<optimized out>, m=<optimized out>)
         at util/virthread.c:154
      2  0x00007fd3a791bcb0 in virThreadPoolFree (pool=0x7fd38024ee00)
         at util/virthreadpool.c:266
      3  0x00007fd38edaa00e in qemuStateCleanup () at qemu/qemu_driver.c:1116
      4  0x00007fd3a79abfeb in virStateCleanup () at libvirt.c:808
      5  0x00007fd3a85f2c9e in main (argc=<optimized out>, argv=<optimized out>)
          at libvirtd.c:1660
      
      Thread 1 (Thread 0x7fd38722d700 (LWP 32256)):
      0  0x00007fd3a7900910 in virClassIsDerivedFrom
         (klass=0xdfd36058d4853, parent=0x7fd3a8f394d0) at util/virobject.c:169
      1  0x00007fd3a7900c4e in virObjectIsClass
         (anyobj=anyobj@entry=0x7fd3a8f2f850, klass=<optimized out>)
         at util/virobject.c:365
      2  0x00007fd3a7900c74 in virObjectLock (anyobj=0x7fd3a8f2f850)
         at util/virobject.c:317
      3  0x00007fd3a7a24d5d in virNetDaemonRemoveShutdownInhibition
         (dmn=0x7fd3a8f2f850) at rpc/virnetdaemon.c:547
      4  0x00007fd38ed722cf in qemuProcessStop
         (driver=driver@entry=0x7fd380103810, vm=vm@entry=0x7fd38025b6d0,
          reason=reason@entry=VIR_DOMAIN_SHUTOFF_SHUTDOWN,
          asyncJob=asyncJob@entry=QEMU_ASYNC_JOB_NONE, flags=flags@entry=0)
         at qemu/qemu_process.c:5786
      5  0x00007fd38edd9428 in processMonitorEOFEvent
         (vm=0x7fd38025b6d0, driver=0x7fd380103810) at qemu/qemu_driver.c:4588
      6  qemuProcessEventHandler (data=<optimized out>, opaque=0x7fd380103810)
         at qemu/qemu_driver.c:4632
      7  0x00007fd3a791bb55 in virThreadPoolWorker
         (opaque=opaque@entry=0x7fd3a8f1e4c0) at util/virthreadpool.c:145
      85c3a182
  28. 10 10月, 2016 3 次提交
  29. 26 6月, 2016 1 次提交
  30. 08 6月, 2016 2 次提交
  31. 20 5月, 2016 1 次提交