1. 21 3月, 2014 4 次提交
    • J
      conf: Introduce virDomainDeviceGetInfo API · 563a12b3
      Jiri Denemark 提交于
      The offset of virDomainDeviceInfo structure within a device definition
      varies with device type and some types do not contain the info structure
      at all. This new API makes it easier to access the info structure from a
      generic virDomainDeviceDef structure.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      563a12b3
    • E
      qemu: create object for qemu monitor events · 8059afca
      Eric Blake 提交于
      Create qemu monitor events as a distinct class to normal domain
      events, because they will be filtered differently.  For ease of
      review, the logic for filtering by event name is saved for a later
      patch.
      
      * src/conf/domain_event.c (virDomainQemuMonitorEventClass): New
      class.
      (virDomainEventsOnceInit): Register it.
      (virDomainQemuMonitorEventDispose, virDomainQemuMonitorEventNew)
      (virDomainQemuMonitorEventDispatchFunc)
      (virDomainQemuMonitorEventStateRegisterID): New functions.
      * src/conf/domain_event.h (virDomainQemuMonitorEventNew)
      (virDomainQemuMonitorEventStateRegisterID): New prototypes.
      * src/libvirt_private.syms (conf/domain_conf.h): Export them.
      8059afca
    • J
      Move functions using iscsiadm to viriscsi.c · 5e1d5dde
      Ján Tomko 提交于
      Remove the 'StorageBackend' from names of the functions and fix
      indentation.
      5e1d5dde
    • J
      Move virStorageBackendRun to vircommand · f2cc4286
      Ján Tomko 提交于
      The only storage-specific parameter is the pool object, which
      is only used for passing to the callback function.
      f2cc4286
  2. 18 3月, 2014 3 次提交
    • D
      Remove global log buffer feature entirely · c0c8c1d7
      Daniel P. Berrange 提交于
      A earlier commit changed the global log buffer so that it only
      records messages that are explicitly requested via the log
      filters setting. This removes the performance burden, and
      improves the signal/noise ratio for messages in the global
      buffer. At the same time though, it is somewhat pointless, since
      all the recorded log messages are already going to be sent to an
      explicit log output like syslog, stderr or the journal. The
      global log buffer is thus just duplicating this data on stderr
      upon crash.
      
      The log_buffer_size config parameter is left in the augeas
      lens to prevent breakage for users on upgrade. It is however
      completely ignored hereafter.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      c0c8c1d7
    • D
      Add virLogSource variables to all source files · 2835c1e7
      Daniel P. Berrange 提交于
      Any source file which calls the logging APIs now needs
      to have a VIR_LOG_INIT("source.name") declaration at
      the start of the file. This provides a static variable
      of the virLogSource type.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      2835c1e7
    • D
      Turn virLogSource into a struct instead of an enum · 098dd79e
      Daniel P. Berrange 提交于
      As part of the goal to get away from doing string matching on
      filenames when deciding whether to emit a log message, turn
      the virLogSource enum into a struct which contains a log
      "name". There will eventually be one virLogSource instance
      statically declared per source file. To minimise churn in this
      commit though, a single global instance is used.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      098dd79e
  3. 13 3月, 2014 10 次提交
  4. 12 3月, 2014 1 次提交
  5. 11 3月, 2014 2 次提交
  6. 04 3月, 2014 3 次提交
    • C
      6b4c0a63
    • E
      util: make it easier to grab only regular command exit · b9dd878f
      Eric Blake 提交于
      Auditing all callers of virCommandRun and virCommandWait that
      passed a non-NULL pointer for exit status turned up some
      interesting observations.  Many callers were merely passing
      a pointer to avoid the overall command dying, but without
      caring what the exit status was - but these callers would
      be better off treating a child death by signal as an abnormal
      exit.  Other callers were actually acting on the status, but
      not all of them remembered to filter by WIFEXITED and convert
      with WEXITSTATUS; depending on the platform, this can result
      in a status being reported as 256 times too big.  And among
      those that correctly parse the output, it gets rather verbose.
      Finally, there were the callers that explicitly checked that
      the status was 0, and gave their own message, but with fewer
      details than what virCommand gives for free.
      
      So the best idea is to move the complexity out of callers and
      into virCommand - by default, we return the actual exit status
      already cleaned through WEXITSTATUS and treat signals as a
      failed command; but the few callers that care can ask for raw
      status and act on it themselves.
      
      * src/util/vircommand.h (virCommandRawStatus): New prototype.
      * src/libvirt_private.syms (util/command.h): Export it.
      * docs/internals/command.html.in: Document it.
      * src/util/vircommand.c (virCommandRawStatus): New function.
      (virCommandWait): Adjust semantics.
      * tests/commandtest.c (test1): Test it.
      * daemon/remote.c (remoteDispatchAuthPolkit): Adjust callers.
      * src/access/viraccessdriverpolkit.c (virAccessDriverPolkitCheck):
      Likewise.
      * src/fdstream.c (virFDStreamCloseInt): Likewise.
      * src/lxc/lxc_process.c (virLXCProcessStart): Likewise.
      * src/qemu/qemu_command.c (qemuCreateInBridgePortWithHelper):
      Likewise.
      * src/xen/xen_driver.c (xenUnifiedXendProbe): Simplify.
      * tests/reconnect.c (mymain): Likewise.
      * tests/statstest.c (mymain): Likewise.
      * src/bhyve/bhyve_process.c (virBhyveProcessStart)
      (virBhyveProcessStop): Don't overwrite virCommand error.
      * src/libvirt.c (virConnectAuthGainPolkit): Likewise.
      * src/openvz/openvz_driver.c (openvzDomainGetBarrierLimit)
      (openvzDomainSetBarrierLimit): Likewise.
      * src/util/virebtables.c (virEbTablesOnceInit): Likewise.
      * src/util/viriptables.c (virIpTablesOnceInit): Likewise.
      * src/util/virnetdevveth.c (virNetDevVethCreate): Fix debug
      message.
      * src/qemu/qemu_capabilities.c (virQEMUCapsInitQMP): Add comment.
      * src/storage/storage_backend_iscsi.c
      (virStorageBackendISCSINodeUpdate): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b9dd878f
    • E
      util: make it easier to reflect child exit status · 2b4f162e
      Eric Blake 提交于
      Thanks to namespaces, we have a couple of places in the code
      base that want to reflect a child exit status, including the
      ability to detect death by a signal, back to a grandparent.
      Best to make it a reusable function.
      
      * src/util/virprocess.h (virProcessExitWithStatus): New prototype.
      * src/libvirt_private.syms (util/virprocess.h): Export it.
      * src/util/virprocess.c (virProcessExitWithStatus): New function.
      * tests/commandtest.c (test23): Test it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      2b4f162e
  7. 25 2月, 2014 1 次提交
  8. 24 2月, 2014 4 次提交
  9. 20 2月, 2014 4 次提交
  10. 19 2月, 2014 1 次提交
  11. 18 2月, 2014 4 次提交
  12. 14 2月, 2014 2 次提交
  13. 13 2月, 2014 1 次提交
    • C
      Improve virConf parse to handle LXC config format · 3daa1483
      Cédric Bosdonnat 提交于
      virConf now honours a VIR_CONF_FLAG_LXC_FORMAT flag to handle LXC
      configuration files. The differences are that property names can
      contain '.' character and values are all strings without any bounding
      quotes.
      
      Provide a new virConfWalk function calling a handler on all non-comment
      values. This function will be used by the LXC conversion code to loop
      over LXC configuration lines.
      3daa1483