1. 13 8月, 2014 1 次提交
    • P
      daemon: Limit default log level to journald to VIR_LOG_INFO · c018efa8
      Peter Krempa 提交于
      Libvirt is really chatty when the DEBUG log level is enabled. When a
      host uses journald we'd enable debug logging to journald when only
      specifying the debug log level. As journald may employ rate throttling
      this would lock up the daemon until it's able to flush all debug
      messages.
      
      This patch changes the default log level to VIR_LOG_INFO when using the
      default (unconfigured) log output to journald.
      
      To still allow debug logging to journald the user now has to explicitly
      specify journald as a log output with priority 1 in the "log_outputs"
      configuration option. This patch also changes the config file template
      to be explicit about this change and notify the user about the possible
      consequence of debug logging into journald.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1121955
      c018efa8
  2. 07 8月, 2014 1 次提交
  3. 25 4月, 2014 4 次提交
  4. 04 4月, 2014 1 次提交
    • N
      Fix Memory Leak in daemon/libvirtd.c · 34542473
      Nehal J Wani 提交于
      Fixes leak introduced by e562e82f
      
      ==4937== 64 bytes in 1 blocks are definitely lost in loss record 270 of 405
      ==4937==    at 0x4A06BE0: realloc (vg_replace_malloc.c:662)
      ==4937==    by 0x6FA41C4: __vasprintf_chk (vasprintf_chk.c:90)
      ==4937==    by 0x50C8D29: virVasprintfInternal (stdio2.h:199)
      ==4937==    by 0x50C8E3A: virAsprintfInternal (virstring.c:362)
      ==4937==    by 0x11D01A: main (libvirtd.c:1170)
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      34542473
  5. 25 3月, 2014 1 次提交
  6. 18 3月, 2014 4 次提交
  7. 12 3月, 2014 1 次提交
  8. 11 3月, 2014 1 次提交
  9. 04 3月, 2014 1 次提交
    • E
      util: make it easier to grab only regular process exit · c72e76c3
      Eric Blake 提交于
      Right now, a caller waiting for a child process either requires
      the child to have status 0, or must use WIFEXITED() and friends
      itself.  But in many cases, we want the middle ground of treating
      fatal signals as an error, and directly accessing the normal exit
      value without having to use WEXITSTATUS(), in order to easily
      detect an expected non-zero exit status.  This adds the middle
      ground to the low-level virProcessWait; the next patch will add
      it to virCommand.
      
      * src/util/virprocess.h (virProcessWait): Alter signature.
      * src/util/virprocess.c (virProcessWait): Add parameter.
      (virProcessRunInMountNamespace): Adjust caller.
      * src/util/vircommand.c (virCommandWait): Likewise.
      * src/util/virfile.c (virFileAccessibleAs): Likewise.
      * src/lxc/lxc_container.c (lxcContainerHasReboot)
      (lxcContainerAvailable): Likewise.
      * daemon/libvirtd.c (daemonForkIntoBackground): Likewise.
      * tools/virt-login-shell.c (main): Likewise.
      * tools/virsh-domain.c (cmdLxcEnterNamespace): Likewise.
      * tests/testutils.c (virtTestCaptureProgramOutput): Likewise.
      * tests/commandtest.c (test23): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      c72e76c3
  10. 19 2月, 2014 1 次提交
    • R
      bhyve: add a basic driver · 0eb4a5f4
      Roman Bogorodskiy 提交于
      At this point it has a limited functionality and is highly
      experimental. Supported domain operations are:
      
        * define
        * start
        * destroy
        * dumpxml
        * dominfo
      
      It's only possible to have only one disk device and only one
      network, which should be of type bridge.
      0eb4a5f4
  11. 03 12月, 2013 1 次提交
    • M
      daemon: Run virStateCleanup conditionally · a602e90b
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1033061
      
      Currently, initialization of drivers is done in a separate thread. This
      is done for several reasons: a driver that is initialized may require
      running event loop, it may take ages to initialize driver (e.g. due to
      autostarting domains). While the thread is spawn and run, the main()
      continues its execution. However, if something goes bad, or the event
      loop is just exited (e.g. due to a --timeout or SIGINT) we try to
      cleanup all the drivers. So we have two threads running Initialize() and
      Cleanup() concurrently. This may result in accessing stale pointers -
      e.g. netcf driver will free() itself in stateCleanup callback, while the
      init thread may come, open a dummy connection in order to autostart some
      domains and voilà: do_open() iterates over interface drivers and
      accesses stale netcf driver.
      
      The fix consists in not running stateCleanup if the init thread is still
      running.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a602e90b
  12. 21 10月, 2013 1 次提交
  13. 19 9月, 2013 1 次提交
    • C
      daemon: Remove more hardcoded paths from help output · 15333222
      Christophe Fergeau 提交于
      A previous patch used existing #define for the various files in /etc/pki
      instead of hardcoding them in the help output. However I missed that
      remote_driver.h contains #define for more paths that are present
      in the daemon help output.
      This commit uses the existing constants for the path to the
      configuration file and to the libvirt sockets.
      15333222
  14. 18 9月, 2013 2 次提交
  15. 13 8月, 2013 1 次提交
    • D
      Properly handle -h / -V for --help/--version aliases in virtlockd/libvirtd · 63ba687f
      Daniel P. Berrange 提交于
      The virtlockd/libvirtd daemons had listed '?' as the short option
      for --help. getopt_long uses '?' for any unknown option. We want
      to be able to distinguish unknown options (which use EXIT_FAILURE)
      from correct usage of help (which should use EXIT_SUCCESS). Thus
      we should use 'h' as a short option for --help. Also add this to
      the man page docs
      
      The virtlockd/libvirtd daemons did not list any short option
      for the --version arg. Add -V as a valid short option, since
      -v is already used for --verbose.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      63ba687f
  16. 05 8月, 2013 1 次提交
    • M
      Introduce max_queued_clients · 1199edb1
      Michal Privoznik 提交于
      This configuration knob lets user to set the length of queue of
      connection requests waiting to be accept()-ed by the daemon. IOW, it
      just controls the @backlog passed to listen:
      
        int listen(int sockfd, int backlog);
      1199edb1
  17. 10 7月, 2013 1 次提交
  18. 24 6月, 2013 1 次提交
  19. 16 5月, 2013 1 次提交
    • D
      Move VirtualBox driver into libvirtd · ba5f3c7c
      Daniel P. Berrange 提交于
      Change the build process & driver initialization so that the
      VirtualBox driver is built into libvirtd, instead of libvirt.so
      This change avoids the VirtualBox GPLv2-only license causing
      compatibility problems with libvirt.so which is under the
      GPLv2-or-later license.
      
      NB this change prevents use of the VirtualBox driver on the
      Windows platform, until such time as libvirtd can be made
      to work there.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      ba5f3c7c
  20. 05 5月, 2013 1 次提交
  21. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  22. 17 4月, 2013 1 次提交
    • O
      cleanup: Remove the duplicate header · bc95be5d
      Osier Yang 提交于
      Detected by a simple Shell script:
      
      for i in $(git ls-files -- '*.[ch]'); do
          awk 'BEGIN {
              fail=0
          }
          /# *include.*\.h/{
              match($0, /["<][^">]*[">]/)
              arr[substr($0, RSTART+1, RLENGTH-2)]++
          }
          END {
              for (key in arr) {
                  if (arr[key] > 1) {
                      fail=1
                      printf("%d %s\n", arr[key], key)
                  }
              }
              if (fail == 1)
                  exit 1
          }' $i
      
          if test $? != 0; then
              echo "Duplicate header(s) in $i"
          fi
      done;
      
      A later patch will add the syntax-check to avoid duplicate
      headers.
      bc95be5d
  23. 17 1月, 2013 1 次提交
  24. 16 1月, 2013 1 次提交
  25. 14 1月, 2013 1 次提交
  26. 11 1月, 2013 1 次提交
  27. 09 1月, 2013 1 次提交
  28. 21 12月, 2012 6 次提交