You need to sign in or sign up before continuing.
  1. 16 6月, 2015 1 次提交
  2. 11 6月, 2015 1 次提交
  3. 12 5月, 2015 1 次提交
  4. 02 4月, 2015 2 次提交
    • J
      Do not include cpu_map.h in libvirtd.c · 95964058
      Ján Tomko 提交于
      No longer needed after commit dd477238
      95964058
    • J
      Remove unused macros · a0482396
      Ján Tomko 提交于
      In the order of appearance:
      
      * MAX_LISTEN - never used
        added by 23ad665c (qemud) and addec57 (lock daemon)
      
      * NEXT_FREE_CLASS_ID - never used, added by 07d1b6b5
      
      * virLockError - never used, added by eb8268a4
      
      * OPENVZ_MAX_ARG, CMDBUF_LEN, CMDOP_LEN
        unused since the removal of ADD_ARG_LIT in d8b31306
      
      * QEMU_NB_PER_CPU_STAT_PARAM - unused since 897808e7
      
      * QEMU_CMD_PROMPT, QEMU_PASSWD_PROMPT - unused since 1dc10a7b
      
      * TEST_MODEL_WORDSIZE - unused since c25c18f7
      
      * TEMPDIR - never used, added by 714bef5b
      
      * NSIG - workaround around old headers
        added by commit 60ed1d2a
        unused since virExec was moved by commit 02e86910
      
      * DO_TEST_PARSE - never used, added by 9afa0060
      
      * DIFF_MSEC, GETTIMEOFDAY - unused since eee6eb66
      a0482396
  5. 19 2月, 2015 1 次提交
    • P
      daemon: Fix segfault by reloading daemon right after start · 5c756e58
      Pavel Hrdina 提交于
      Libvirt could crash with segfault if user issue "service reload" right
      after "service start". One possible way to crash libvirt is to run reload
      during initialization of QEMU driver.
      
      It could happen when qemu driver will initialize qemu_driver_lock but
      don't have a time to set it's "config" and the SIGHUP arrives. The
      reload handler tries to get qemu_drv->config during "virStorageAutostart"
      and dereference it which ends with segfault.
      
      Let's ignore all reload requests until all drivers are initialized. In
      addition set driversInitialized before we enter virStateCleanup to
      ignore reload request while we are shutting down.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1179981Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      5c756e58
  6. 27 1月, 2015 2 次提交
    • J
      Fix shadowed variable warning · d0ab79e9
      Ján Tomko 提交于
      libvirtd.c: In function 'daemonSetupAccessManager':
      libvirtd.c:730:18: error: declaration of 'driver' shadows
        a global declaration [-Werror=shadow]
           const char **driver = (const char **)config->access_drivers;
                        ^
      In file included from libvirtd.c:95:0:
      ../src/node_device/node_device_driver.h:43:36: error: shadowed
        declaration is here [-Werror=shadow]
       extern virNodeDeviceDriverStatePtr driver;
                                          ^
      d0ab79e9
    • D
      Removing probing of secondary drivers · 55ea7be7
      Daniel P. Berrange 提交于
      For stateless, client side drivers, it is never correct to
      probe for secondary drivers. It is only ever appropriate to
      use the secondary driver that is associated with the
      hypervisor in question. As a result the ESX & HyperV drivers
      have both been forced to do hacks where they register no-op
      drivers for the ones they don't implement.
      
      For stateful, server side drivers, we always just want to
      use the same built-in shared driver. The exception is
      virtualbox which is really a stateless driver and so wants
      to use its own server side secondary drivers. To deal with
      this virtualbox has to be built as 3 separate loadable
      modules to allow registration to work in the right order.
      
      This can all be simplified by introducing a new struct
      recording the precise set of secondary drivers each
      hypervisor driver wants
      
      struct _virConnectDriver {
          virHypervisorDriverPtr hypervisorDriver;
          virInterfaceDriverPtr interfaceDriver;
          virNetworkDriverPtr networkDriver;
          virNodeDeviceDriverPtr nodeDeviceDriver;
          virNWFilterDriverPtr nwfilterDriver;
          virSecretDriverPtr secretDriver;
          virStorageDriverPtr storageDriver;
      };
      
      Instead of registering the hypervisor driver, we now
      just register a virConnectDriver instead. This allows
      us to remove all probing of secondary drivers. Once we
      have chosen the primary driver, we immediately know the
      correct secondary drivers to use.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      55ea7be7
  7. 15 11月, 2014 1 次提交
  8. 29 10月, 2014 1 次提交
  9. 15 9月, 2014 2 次提交
    • J
      daemon: Resolve Coverity FORWARD_NULL · 1f967758
      John Ferlan 提交于
      Coverity complains that the comparison:
      
        if (nfds && nfds > ((int)!!sock_path + (int)!!sock_path_ro))
      
      could mean 'sock_path' is NULL. Later in virNetSocketNewListenUNIX
      there's a direct dereference of path in the error path:
      
        if (path[0] != '@')
      
      A bit of sleuthing proves that upon entry to daemonSetupNetworking
      there is no way for 'sock_path' to be NULL since daemonUnixSocketPaths
      will set up 'sock_file' (although it may not set up 'sock_file_ro')
      in all 3 paths.
      
      Adjusted code to add ATTRIBUTE_NONNULL(3) on incoming path parameter and
      then fixup the comparison of nfds to be a comparison against 2 or 1
      depending on whether sock_path_ro is NULL or not.
      1f967758
    • M
      8035f2e6
  10. 12 9月, 2014 1 次提交
  11. 27 8月, 2014 1 次提交
    • M
      vbox: Register per partes · dbb4cbf5
      Michal Privoznik 提交于
      Since times when vbox moved to the daemon (due to some licensing
      issue) the subdrivers that vbox implements were registered, but not
      opened since our generic subdrivers took priority. I've tried to fix
      this in 65b7d553 but it was not correct. Apparently moving
      vbox driver registration upfront changes the default connection URI
      which makes some users sad. So, this commit breaks vbox into pieces
      and register vbox's network and storage drivers first, and vbox driver
      then at the end. This way, the vbox driver is registered in the order
      it always was, but its subdrivers are registered prior the generic
      ones.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      dbb4cbf5
  12. 25 8月, 2014 1 次提交
    • Z
      daemon: Fix option -v missing info priority log · 9eac73eb
      Zhou Yimin 提交于
      Introduce by 63fbcc69.
      
      When start libvirtd with commandline "/usr/sbin/libvirtd -d -l -v",
      we expect verbose(info level) log if neither environment variable
      nor config file about logging controls is set. But in fact we can't
      get any info priority log in the default output file.
      
      The log priority of default output is VIR_LOG_DEFAULT(VIR_LOG_WARN),
      so the info log is filtered out.
      To record info priority log we must parse option -v before setting the
      default output.
      
      After this patch, we get all verbose log in the default output file.
      Signed-off-by: NZhou Yimin <zhouyimin@huawei.com>
      9eac73eb
  13. 22 8月, 2014 1 次提交
  14. 18 8月, 2014 1 次提交
    • M
      daemon: Fix driver registration ordering · 65b7d553
      Michal Privoznik 提交于
      There are some stateless drivers which implement subdrivers
      (typically vbox and its own network and storage subdrivers). However,
      as of ba5f3c7c the vbox driver lives in the daemon, not the
      client library. This means, in order for vbox (or any stateless domain
      driver) to use its subdrivers, it must register before the general
      drivers. Later, when the virConnectOpen function goes through the
      subdrivers, stateless drivers are searched first. If the connection
      request is aiming at stateless driver, it will be opened. Otherwise
      the generic subdriver is opened.
      
      The other change done in this commit is moving interface module load a
      bit earlier to match the ordering in case libvirt is built without
      driver modules.
      Reported-by: NTaowei Luo <uaedante@gmail.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      65b7d553
  15. 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
  16. 07 8月, 2014 1 次提交
  17. 25 4月, 2014 4 次提交
  18. 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
  19. 25 3月, 2014 1 次提交
  20. 18 3月, 2014 4 次提交
  21. 12 3月, 2014 1 次提交
  22. 11 3月, 2014 1 次提交
  23. 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
  24. 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
  25. 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
  26. 21 10月, 2013 1 次提交
  27. 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
  28. 18 9月, 2013 2 次提交
  29. 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
  30. 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