1. 09 5月, 2016 8 次提交
  2. 06 5月, 2016 17 次提交
  3. 05 5月, 2016 7 次提交
    • M
      virNetServerClientNewPostExecRestart: Avoid align problems · b17e610e
      Michal Privoznik 提交于
      I've noticed this while trying to compile libvirt on my arm box.
      
        CC       rpc/libvirt_net_rpc_server_la-virnetserverclient.lo
      rpc/virnetserverclient.c: In function 'virNetServerClientNewPostExecRestart':
      rpc/virnetserverclient.c:516:45: error: cast increases required alignment of target type [-Werror=cast-align]
                                                   (long long *) &timestamp) < 0) {
                                                   ^
      cc1: all warnings being treated as errors
      
      Problem is, @timestap is defined as time_t which is 32 bits long,
      and we are typecasting it to long long which is 64bits long.
      Solution is to make @timestamp type of long long. At the same
      time, we can make @conn_time in _virNetServerClient struct long
      long too. There is no need for it to be type of time_t.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b17e610e
    • M
      virNetServerClientNewPostExecRestart: Drop useless typecasts · 2a3a2c2f
      Michal Privoznik 提交于
      In this function, @id is defined as unsigned long long. When
      passing this variable to virJSONValueObjectGetNumberUlong(),
      well address of this variable, it's typecasted to ull*. There
      is no need for that. It's a same story with @nrequests_max.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      2a3a2c2f
    • J
      virjson: Make pretty format more compact · 7197e5fd
      Jiri Denemark 提交于
      json_reformat uses two spaces for when indenting nested objects, let's
      do the same. The result of virJSONValueToString will be exactly the same
      as json_reformat would produce.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      7197e5fd
    • J
      666d7805
    • J
      qemu: Make virQEMUCapsNewForBinary usable from tests · b0b8517e
      Jiri Denemark 提交于
      virQEMUCapsNewForBinary unconditionally loads data from cache and probes
      using both QMP and -help parsing, which is suboptimal when we want to
      use it in tests.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      b0b8517e
    • R
      bhyve: implement domainShutdown · 9e0bb1c8
      Roman Bogorodskiy 提交于
      Bhyve supports ACPI shutdown by issuing SIGTERM signal to a bhyve
      process.
      
      Add the bhyveDomainShutdown() function and virBhyveProcessShutdown()
      helper function that just sends SIGTERM to VM's bhyve process. If
      a guest supports ACPI shutdown then process will be terminated and
      this event will be noticed by the bhyve monitor code that will handle
      setting proper status and clean up VM's resources by calling
      virBhyveProcessStop().
      9e0bb1c8
    • R
      bhyve: drop virProcessKillPainfully() from destroy · c35c2fe7
      Roman Bogorodskiy 提交于
      Current implementation of domainDestroy for bhyve calls
      virProcessKillPainfully() for the bhyve process and then
      executes "bhyvectl --destroy".
      
      This is wrong for two reasons:
      
       * bhyvectl --destroy alone is sufficient because it terminates
         the process
       * virProcessKillPainfully() first sends SIGTERM and after few
         attempts sends SIGKILL. As SIGTERM triggers ACPI shutdown that
         we're not interested in, it creates an unwanted side effect in
         domainDestroy.
      
      Also, destroy monitor only after "bhyvectl --destroy" command succeeded
      to avoid a case when the command fails and domain remains running, but
      not being monitored anymore.
      c35c2fe7
  4. 04 5月, 2016 6 次提交
    • E
      admin: Add a check to reject negative argument for number of typed params · ca0d4514
      Erik Skultety 提交于
      Since nparams can be technically negative, it is a good practice throughout
      our code to check if nparams actually has a non-negative value. The same effect
      would be achieved by converting our internal typed params serializer argument
      to 'unsigned' type, but it definitely would not be the path of least resistance.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      ca0d4514
    • J
      qemu: Add 'iothread' to command line for supported controller · d0b58459
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1286709
      
      Now that we have all the pieces in place, we can add the 'iothread=#' to
      the command line for the (two) controllers that support it (virtio-scsi-pci
      and virtio-scsi-ccw). Add the tests as well...
      d0b58459
    • J
      qemu: Use switch for qemuCheckIOThreads · ade5dae2
      John Ferlan 提交于
      Rather than an if statement, use a switch.
      
      The switch will also catch the illegal usage of 'iothread' with some other
      kind of unsupported bus configuration.
      ade5dae2
    • J
      conf: Add support for virtio-scsi iothreads · e0d0e530
      John Ferlan 提交于
      Add the ability to add an 'iothread' to the controller which will be how
      virtio-scsi-pci and virtio-scsi-ccw iothreads have been implemented in qemu.
      
      Describe the new functionality and add tests to parse/validate that the
      new attribute can be added.
      e0d0e530
    • J
      conf: Move virDomainControllerModelTypeToString · a3aa2005
      John Ferlan 提交于
      Move virDomainControllerModelTypeToString closer to it's counterpart
      virDomainControllerModelTypeFromString.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      a3aa2005
    • J
      qemu: Add capability for virtio-scsi iothreads · e2faa976
      John Ferlan 提交于
      An iothread for virtio-scsi is a property of the controller. Add a lookup
      of the 'virtio-scsi-pci' and 'virtio-scsi-ccw' device properties and parse
      the output.  For both, support for the iothread was added in qemu 2.4
      while support for virtio-scsi in general was added in qemu 1.4.
      
      Modify the various mock capabilities replies (by hand) to reflect the
      when virtio-scsi was supported and then specifically when the iothread
      property was added. For versions prior to 1.4, use the no device error
      return for virtio-scsi. For versions 1.4 to before 2.4, add some data
      for virtio-scsi-pci even though it isn't complete we're not looking for
      anything specific there anyway. For 2.4 to 2.6, add a more complete reply.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      e2faa976
  5. 03 5月, 2016 2 次提交
    • E
      admin: Introduce virAdmClientGetInfo API · 4a0e9108
      Erik Skultety 提交于
      Expose a public API to retrieve some identity and connection information about
      a client connected to the specified server on daemon. The identity info
      retrieved is mostly connection transport dependent, i.e. there won't be any
      socket address returned for a local (UNIX socket) connection, while on the
      other hand, when connected through TLS or unencrypted TCP, obviously no UNIX
      process identification will be present in the returned data. All supported
      values that can be returned in typed params are exposed and documented in
      include/libvirt/libvirt-admin.h
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      4a0e9108
    • E
      virnetserverclient: Add an internal method to retrieve client's identity · 8420a53e
      Erik Skultety 提交于
      This method just aggregates various client object attributes, like socket
      address, connection type (RO/RW), and some TCP/TLS/UNIX identity in an atomic
      manner.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      8420a53e