1. 20 11月, 2014 1 次提交
  2. 15 11月, 2014 1 次提交
  3. 07 11月, 2014 1 次提交
  4. 29 10月, 2014 1 次提交
    • E
      maint: avoid static zero init in helpers · ff99c791
      Eric Blake 提交于
      C guarantees that static variables are zero-initialized.  Some older
      compilers (and also gcc -fno-zero-initialized-in-bss) create larger
      binaries if you explicitly zero-initialize a static variable.
      
      * src/conf/nwfilter_conf.c: Fix initialization.
      * src/cpu/cpu_x86.c: Likewise.
      * src/interface/interface_backend_netcf.c: Likewise.
      * src/locking/lock_daemon.c: Likewise.
      * src/locking/lock_driver_lockd.c: Likewise.
      * src/locking/lock_driver_sanlock.c: Likewise.
      * src/network/bridge_driver.c: Likewise.
      * src/node_device/node_device_udev.c: Likewise.
      * src/nwfilter/nwfilter_learnipaddr.c: Likewise.
      * src/rpc/virnetserver.c: Likewise.
      * src/security/security_selinux.c
      (virSecuritySELinuxGenSecurityLabel): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ff99c791
  5. 25 9月, 2014 1 次提交
    • M
      virnetserver: Raise log level of max_clients related messages · cb5de655
      Michal Privoznik 提交于
      We have these configuration knobs, like max_clients and
      max_anonymous_clients. They limit the number of clients
      connected.  Whenever the limit is reached, the daemon stops
      accepting new ones and resumes if one of the connected clients
      disconnects. If that's the case, a debug message is printed into
      the logs. And when the daemon starts over to accept new clients
      too. However, the problem is the messages have debug priority.
      This may be unfortunate, because if the daemon stops accepting
      new clients all of a sudden, and users don't have debug logs
      enabled they have no idea what's going on. Raise the messages
      level to INFO at least.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      cb5de655
  6. 24 9月, 2014 1 次提交
  7. 17 9月, 2014 1 次提交
  8. 15 9月, 2014 1 次提交
  9. 09 9月, 2014 1 次提交
  10. 05 9月, 2014 1 次提交
    • E
      maint: use consistent if-else braces in remaining spots · d194d6e7
      Eric Blake 提交于
      I'm about to add a syntax check that enforces our documented
      HACKING style of always using matching {} on if-else statements.
      
      This patch focuses on all remaining problems, where there weren't
      enough issues to warrant splitting it further.
      
      * src/remote/remote_driver.c (doRemoteOpen): Correct use of {}.
      * src/security/virt-aa-helper.c (vah_add_path, valid_path, main):
      Likewise.
      * src/rpc/virnetsocket.c (virNetSocketNewConnectLibSSH2):
      Likewise.
      * src/esx/esx_vi_types.c (esxVI_Type_FromString): Likewise.
      * src/uml/uml_driver.c (umlDomainDetachDevice): Likewise.
      * src/util/viralloc.c (virShrinkN): Likewise.
      * src/util/virbuffer.c (virBufferURIEncodeString): Likewise.
      * src/util/virdbus.c (virDBusCall): Likewise.
      * src/util/virnetdev.c (virNetDevValidateConfig): Likewise.
      * src/util/virnetdevvportprofile.c
      (virNetDevVPortProfileGetNthParent): Likewise.
      * src/util/virpci.c (virPCIDeviceIterDevices)
      (virPCIDeviceWaitForCleanup)
      (virPCIDeviceIsBehindSwitchLackingACS): Likewise.
      * src/util/virsocketaddr.c (virSocketAddrGetNumNetmaskBits):
      Likewise.
      * src/util/viruri.c (virURIParseParams): Likewise.
      * daemon/stream.c (daemonStreamHandleAbort): Likewise.
      * tests/testutils.c (virtTestResult): Likewise.
      * tests/cputest.c (cpuTestBaseline): Likewise.
      * tools/virsh-domain.c (cmdDomPMSuspend): Likewise.
      * tools/virsh-host.c (cmdNodeSuspend): Likewise.
      * src/esx/esx_vi_generator.py (Type.generate_typefromstring):
      Tweak generated code.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d194d6e7
  11. 04 9月, 2014 1 次提交
  12. 01 9月, 2014 1 次提交
    • C
      Fix connection to already running session libvirtd · 0f03ca6d
      Christophe Fergeau 提交于
      Since 1b807f92, connecting with virsh to an already running session
      libvirtd fails with:
      $ virsh list --all
      error: failed to connect to the hypervisor
      error: no valid connection
      error: Failed to connect socket to
      '/run/user/1000/libvirt/libvirt-sock': Transport endpoint is already
      connected
      
      This is caused by a logic error in virNetSocketNewConnectUnix: even if
      the connection to the daemon socket succeeded, we still try to spawn the
      daemon and then connect to it.
      This commit changes the logic to not try to spawn libvirtd if we
      successfully connected to its socket.
      
      Most of this commit is whitespace changes, use of -w is recommended to
      look at it.
      0f03ca6d
  13. 29 8月, 2014 1 次提交
    • J
      virnetserverservice: Resolve Coverity ARRAY_VS_SINGLETON · e387f4c1
      John Ferlan 提交于
      Coverity complained about the following:
      
      (3) Event ptr_arith:
         Performing pointer arithmetic on "cur_fd" in expression "cur_fd++".
      130             return virNetServerServiceNewFD(*cur_fd++,
      
      The complaint is that pointer arithmetic taking place instead of the
      expected auto increment of the variable...  Adding some well placed
      parentheses ensures our order of operation.
      e387f4c1
  14. 27 8月, 2014 1 次提交
  15. 26 8月, 2014 1 次提交
    • E
      maint: drop spurious semicolons · 28de556d
      Eric Blake 提交于
      I noticed a line 'int nparams = 0;;' in remote_dispatch.h, and
      tracked down where it was generated.  While at it, I found a
      couple of other double semicolons.  Additionally, I noticed that
      commit df0b57a9 left a stale reference to the file name
      remote_dispatch_bodies.h.
      
      * src/conf/numatune_conf.c (virDomainNumatuneNodeParseXML): Drop
      empty statement.
      * tests/virdbustest.c (testMessageStruct, testMessageSimple):
      Likewise.
      * src/rpc/gendispatch.pl (remote_dispatch_bodies.h): Likewise, and
      update stale comments.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      28de556d
  16. 23 8月, 2014 1 次提交
    • J
      virnetsocket: Resolve Coverity RESOURCE_LEAK · cc1bbbbe
      John Ferlan 提交于
      Since '1b807f92' - Coverity complains that in the error paths of
      both virFork() and virProcessWait() that the 'passfd' will not be closed.
      Added the VIR_FORCE_CLOSE(passfd) and initialized it to -1.
      
      Also noted that variable 'buf' was never really used - so I removed it
      cc1bbbbe
  17. 22 8月, 2014 3 次提交
  18. 20 8月, 2014 1 次提交
  19. 03 7月, 2014 1 次提交
    • J
      Use virBufferCheckError everywhere we report OOM error · 92a8e72f
      Ján Tomko 提交于
      Replace:
      if (virBufferError(&buf)) {
          virBufferFreeAndReset(&buf);
          virReportOOMError();
          ...
      }
      
      with:
      if (virBufferCheckError(&buf) < 0)
          ...
      
      This should not be a functional change (unless some callers
      misused the virBuffer APIs - a different error would be reported
      then)
      92a8e72f
  20. 24 6月, 2014 1 次提交
    • N
      net-dhcp-leases: Implement the remote protocol · 990c3b65
      Nehal J Wani 提交于
      Implement RPC calls for virNetworkGetDHCPLeases, virNetworkGetDHCPLeasesForMAC
      
      daemon/remote.c
         * Define remoteSerializeNetworkDHCPLeases,
                  remoteDispatchNetworkGetDHCPLeases
         * Define remoteDispatchNetworkGetDHCPLeasesForMAC
         * Define helper function remoteSerializeDHCPLease
      
      src/remote/remote_driver.c
         * Define remoteNetworkGetDHCPLeases
         * Define remoteNetworkGetDHCPLeasesForMAC
         * Define helper function remoteSerializeDHCPLease
      
      src/remote/remote_protocol.x
         * New RPC procedure: REMOTE_PROC_NETWORK_GET_DHCP_LEASES
         * Define structs remote_network_dhcp_leases, remote_network_get_dhcp_leases_args,
                          remote_network_get_dhcp_leases_ret
         * New RPC procedure: REMOTE_PROC_NETWORK_GET_DHCP_LEASES_FOR_MAC
         * Define structs remote_network_dhcp_leases_for_mac, remote_network_get_dhcp_leases_for_mac_args,
                          remote_network_get_dhcp_leases_for_mac_ret
      
      src/remote_protocol-structs
         * New structs added
      
      src/rpc/gendispatch.pl
         * Add exception (s/Dhcp/DHCP) for auto-generating names of the remote functions
           in daemon/remote_dispatch.h
      990c3b65
  21. 02 6月, 2014 1 次提交
  22. 07 5月, 2014 1 次提交
  23. 29 4月, 2014 1 次提交
  24. 22 4月, 2014 1 次提交
  25. 25 3月, 2014 1 次提交
  26. 21 3月, 2014 2 次提交
    • E
      qemu: wire up RPC for qemu monitor events · e7708a1c
      Eric Blake 提交于
      These are the first async events in the qemu protocol, so this
      patch looks rather big compared to most RPC additions.  However,
      a large majority of this patch is just mechanical copy-and-paste
      from recently-added network events.  It didn't help that this
      is also the first virConnect rather than virDomain prefix
      associated with a qemu-specific API.
      
      * src/remote/qemu_protocol.x (qemu_*_domain_monitor_event_*): New
      structs and RPC messages.
      * src/rpc/gendispatch.pl: Adjust naming conventions.
      * daemon/libvirtd.h (daemonClientPrivate): Track qemu events.
      * daemon/remote.c (remoteClientFreeFunc): Likewise.
      (remoteRelayDomainQemuMonitorEvent)
      (qemuDispatchConnectDomainMonitorEventRegister)
      (qemuDispatchConnectDomainMonitorEventDeregister): New functions.
      * src/remote/remote_driver.c (qemuEvents): Handle qemu events.
      (doRemoteOpen): Register for events.
      (remoteNetworkBuildEventLifecycle)
      (remoteConnectDomainQemuMonitorEventRegister)
      (remoteConnectDomainQemuMonitorEventDeregister): New functions.
      * src/qemu_protocol-structs: Regenerate.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      e7708a1c
    • M
      7fa91525
  27. 20 3月, 2014 1 次提交
    • M
      virNetClientSetTLSSession: Restore original signal mask · 3d4b4f5a
      Michal Privoznik 提交于
      Currently, we use pthread_sigmask(SIG_BLOCK, ...) prior to calling
      poll(). This is okay, as we don't want poll() to be interrupted.
      However, then - immediately as we fall out from the poll() - we try to
      restore the original sigmask - again using SIG_BLOCK. But as the man
      page says, SIG_BLOCK adds signals to the signal mask:
      
      SIG_BLOCK
            The set of blocked signals is the union of the current set and the set argument.
      
      Therefore, when restoring the original mask, we need to completely
      overwrite the one we set earlier and hence we should be using:
      
      SIG_SETMASK
            The set of blocked signals is set to the argument set.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      3d4b4f5a
  28. 18 3月, 2014 7 次提交
  29. 10 3月, 2014 2 次提交
  30. 24 2月, 2014 1 次提交
    • M
      virNetServerRun: Notify systemd that we're accepting clients · 68954fb2
      Michal Privoznik 提交于
      Systemd does not forget about the cases, where client service needs to
      wait for daemon service to initialize and start accepting new clients.
      Setting a dependency in client is not enough as systemd doesn't know
      when the daemon has initialized itself and started accepting new
      clients. However, it offers a mechanism to solve this. The daemon needs
      to call a special systemd function by which the daemon tells "I'm ready
      to accept new clients". This is exactly what we need with
      libvirtd-guests (client) and libvirtd (daemon). So now, with this
      change, libvirt-guests.service is invoked not any sooner than
      libvirtd.service calls the systemd notify function.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      68954fb2