1. 24 11月, 2016 6 次提交
  2. 23 11月, 2016 8 次提交
    • M
      qemu: Update cgroup on chardev hotplug · 5d9c2c70
      Michal Privoznik 提交于
      Just like in the previous commit, we are not updating CGroups on
      chardev hot(un-)plug and thus leaving qemu unable to access any
      non-default device users are trying to hotplug.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      5d9c2c70
    • M
      qemu: Update cgroup on RNG hotplug · 085692c8
      Michal Privoznik 提交于
      If users try to hotplug RNG device with a backend different to
      /dev/random or /dev/urandom the whole operation fails as qemu is
      unable to access the device. The problem is we don't update
      device CGroups during the operation.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      085692c8
    • N
      qemu: agent: fix unsafe agent access · aaf2992d
      Nikolay Shirokovskiy 提交于
      qemuDomainObjExitAgent is unsafe.
      
      First it accesses domain object without domain lock.
      Second it uses outdated logic that goes back to commit 79533da1 of
      year 2009 when code was quite different. (unref function
      instead of unreferencing only unlocked and disposed object
      in case of last reference and leaved unlocking to the caller otherwise).
      Nowadays this logic may lead to disposing locked object
      i guess.
      
      Another problem is that the callers of qemuDomainObjEnterAgent
      use domain object again (namely priv->agent) without domain lock.
      
      This patch address these two problems.
      
      qemuDomainGetAgent is dropped as unused.
      aaf2992d
    • N
      qemu: drop write-only agentStart · 3c1c5678
      Nikolay Shirokovskiy 提交于
      3c1c5678
    • N
      qemu: agent: cleanup agent error flag correctly · 6ba861ae
      Nikolay Shirokovskiy 提交于
      Sometimes after domain restart agent is unavailabe even
      if it is up and running in guest. Diagnostic message is
      "QEMU guest agent is not available due to an error"
      that is 'priv->agentError' is set. Investiagion shows that
      'priv->agent' is not NULL, so error flag is set probably
      during domain shutdown process and not cleaned up eventually.
      
      The patch is quite simple - just clean up error flag unconditionally
      upon domain stop.
      
      Other hunks address other cases when error flag is not cleaned up.
      
      1. processSerialChangedEvent. We need to clean error flag
      unconditionally here too. For example if upon first 'connected' event we
      fail to connect and set error flag and then connect on second
      'connected' event then error flag will remain set erroneously
      and make agent unavailable.
      
      2. qemuProcessHandleAgentEOF. If error flag is set and we get
      EOF we need to change state (and diagnostic) from 'error' to
      'not connected'.
      6ba861ae
    • N
      qemu: agent: remove redundant check · f5109f20
      Nikolay Shirokovskiy 提交于
      f5109f20
    • N
      qemu: agent: handle agent connection errors in one place · 851ae08e
      Nikolay Shirokovskiy 提交于
      qemuConnectAgent return -1 or -2 in case of different errors.
      A. -1 is a case of unsuccessuful connection to guest agent.
      B. -2 is a case of destoyed domain during connection attempt.
      
      All qemuConnectAgent callers handle the first error the same way
      so let's move this logic into qemuConnectAgent itself. Patched
      function returns 0 in case A and -1 in case B.
      851ae08e
    • N
      libvirtd: systemd: add special target for system shutdown · 01079727
      Nikolay Shirokovskiy 提交于
      It is already discussed in "[RFC] daemon: remove hardcode dep on libvirt-guests" [1].
      
      Mgmt can use means to save/restore domains on system shutdown/boot other than
      libvirt-guests.service. Thus we need to specify appropriate ordering dependency between
      libvirtd, domains and save/restore service. This patch takes approach suggested
      in RFC and introduces a systemd target, so that ordering can be built next way:
      
      libvirtd -> domain -> virt-guest-shutdown.target -> save-restore.service.
      
      This way domains are decoupled from specific shutdown service via intermediate
      target.
      
      [1] https://www.redhat.com/archives/libvir-list/2016-September/msg01353.html
      01079727
  3. 22 11月, 2016 10 次提交
  4. 21 11月, 2016 8 次提交
  5. 18 11月, 2016 1 次提交
    • M
      Fix scheduler support check · f2bf5fbb
      Martin Kletzander 提交于
      Commit 94cc5778 tried fixing build on systems that did not have
      SCHED_BATCH or SCHED_IDLE defined.  But instead of changing it to
      conditional support, it rather completely disabled the support for
      setting any scheduler.  Since then, such old systems are not
      supported, but rather than reverting that commit, let's change that to
      the conditional support.  That way any addition to the list of
      schedulers can follow the same style so that we're consistent in the
      future.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      f2bf5fbb
  6. 16 11月, 2016 2 次提交
  7. 15 11月, 2016 5 次提交
    • P
      remote: expose a new libssh transport · 22eaee8e
      Pino Toscano 提交于
      Implement in virtNetClient and VirNetSocket the needed functions to
      expose a new libssh transport, providing all the options that the
      libssh2 transport supports.
      22eaee8e
    • P
      libssh_transport: add new libssh-based transport · 6917467c
      Pino Toscano 提交于
      Implement a new libssh transport, which uses libssh to communicate with
      remote hosts, and add all the build system stuff (search of libssh,
      private symbols, etc) to built it.
      
      This new transport supports all the common ssh authentication methods,
      making use of libvirt's auth callbacks for interaction with the user.
      6917467c
    • P
      virnetsocket: improve search for default SSH key · 24ee5dc9
      Pino Toscano 提交于
      Add a couple of helper functions to check whether one of the default
      names of SSH keys (as documented in ssh-keygen(1)) exists, and use them
      to specify a key for the libssh2 transport if none was passed.
      24ee5dc9
    • P
      virerror: add error for libssh transport · f0e7f90b
      Pino Toscano 提交于
      Add a new error domain and number for a new libssh-based transport.
      f0e7f90b
    • P
      virNetSocket: allow to not close FD · 0e9fec97
      Pino Toscano 提交于
      Add an internal variable to mark the FD as "not owned" by the
      virNetSocket, in case the internal implementation takes the actual
      ownership of the descriptor; this avoids a warning when closing the
      socket, as the FD would be invalid.
      0e9fec97