1. 21 5月, 2019 1 次提交
  2. 14 12月, 2018 2 次提交
    • D
      remote: check & report OOM in make_nonnull_XXX methods · dc54b3ec
      Daniel P. Berrangé 提交于
      The make_nonnull_XXX methods can all fail due to OOM but this was being
      silently ignored and thus also not checked by callers. Make the methods
      propagate errors and use ATTRIBUTE_RETURN_CHECK to force callers to deal
      with it.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      dc54b3ec
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  3. 31 1月, 2018 3 次提交
  4. 05 9月, 2017 1 次提交
  5. 15 12月, 2016 4 次提交
  6. 19 5月, 2016 2 次提交
    • E
      admin: Introduce virAdmServerSetClientLimits · 8b1f0469
      Erik Skultety 提交于
      Opposite operation to virAdmServerGetClientLimits. Understandably though,
      setting values for current number of clients connected or still waiting
      for authentication does not make sense, since changes to these values are event
      dependent, i.e. a client connects - counter is increased. Thus only the limits
      to maximum clients connected and waiting for authentication can be set. Should
      a request for other controls to be set arrive (provided such a setting will
      be first introduced to the config), the set of configuration controls can be
      later expanded (thanks to typed params). This patch also introduces a
      constraint that the maximum number of clients waiting for authentication has to
      be less than the overall maximum number of clients connected and any attempt to
      violate this constraint will be denied.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      8b1f0469
    • E
      admin: Introduce virAdmServerGetClientLimits · 509bd5d8
      Erik Skultety 提交于
      Enable retrieval of the number of maximum clients connected to all sockets
      combined, as well as the number of maximum clients waiting for authentication,
      in order to be successfully connected. These are the attributes configurable
      through libvirtd.conf, however, it could be handy to not only know values for
      these limits, but also the values for the current number of clients
      connected and number of clients currently waiting for authentication which are
      changing dynamically. This API does both, retrieves the limits as well as the
      current dynamic values.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      509bd5d8
  7. 10 5月, 2016 1 次提交
    • E
      admin: Introduce virAdmClientClose API · c22ac618
      Erik Skultety 提交于
      Once we're able to list and identify all clients connected to a specific
      server, we can then support force-closing a connection. This patch introduces
      a simple API calling virNetServerClientClose on a specific client, which
      can be later extended easily, e.g. by sending an event once the client is
      disconnected successfully.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      c22ac618
  8. 05 5月, 2016 1 次提交
    • E
      build: fix 32-bit build of admin · a4ef8057
      Eric Blake 提交于
      We can't guarantee which 64-bit type will be used in an RPC struct;
      while %lu worked on 64-bit Linux, that won't always be the type
      used on all 64-bit platforms; and certainly is not right for 32-bit:
      
      admin.c: In function 'adminDispatchClientGetInfo':
      admin.c:265:25: error: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'uint64_t {aka long long unsigned int}' [-Werror=format=]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a4ef8057
  9. 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
      admin: Introduce listing clients · ed978fa2
      Erik Skultety 提交于
      Finally add public method to retrieve the list of currently connected clients
      to a given server.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      ed978fa2
  10. 18 4月, 2016 2 次提交
    • E
      admin: Introduce virAdmServerSetThreadPoolParameters · 93ab4da5
      Erik Skultety 提交于
      Since threadpool increments the current number of threads according to current
      load, i.e. how many jobs are waiting in the queue. The count however, is
      constrained by max and min limits of workers. The logic of this new API works
      like this:
          1) setting the minimum
              a) When the limit is increased, depending on the current number of
                 threads, new threads are possibly spawned if the current number of
                 threads is less than the new minimum limit
              b) Decreasing the minimum limit has no possible effect on the current
                 number of threads
          2) setting the maximum
              a) Icreasing the maximum limit has no immediate effect on the current
                 number of threads, it only allows the threadpool to spawn more
                 threads when new jobs, that would otherwise end up queued, arrive.
              b) Decreasing the maximum limit may affect the current number of
                 threads, if the current number of threads is less than the new
                 maximum limit. Since there may be some ongoing time-consuming jobs
                 that would effectively block this API from killing any threads.
                 Therefore, this API is asynchronous with best-effort execution,
                 i.e. the necessary number of workers will be terminated once they
                 finish their previous job, unless other workers had already
                 terminated, decreasing the limit to the requested value.
          3) setting priority workers
              - both increase and decrease in count of these workers have an
                immediate impact on the current number of workers, new ones will be
                spawned or some of them get terminated respectively.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      93ab4da5
    • E
      admin: Introduce virAdmServerGethreadPoolParameters · caa16d31
      Erik Skultety 提交于
      New API to retrieve current server workerpool specs. Since it uses typed
      parameters, more specs to retrieve can be further included in the pool of
      supported ones.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      caa16d31
  11. 11 3月, 2016 2 次提交
  12. 17 2月, 2016 2 次提交
  13. 21 12月, 2015 1 次提交
    • E
      Revert "admin: Rename virAdmConnect to virAdmDaemon" · 3245e178
      Erik Skultety 提交于
      Commmit df8192aa introduced admin related rename and some minor
      (caused by automated approach, aka sed) and some more severe isues along with
      it. First reason to revert is the inconsistency with libvirt library.
      Although we deal with the daemon directly rather than with a specific
      hypervisor, we still do have a connection. That being said, contributors might
      get under the impression that AdmDaemonNew would spawn/start a new daemon
      (since it's admin API, why not...), or AdmDaemonClose would do the exact
      opposite or they might expect DaemonIsAlive report overall status of the daemon
      which definitely isn't the case.
      The second reason to revert this patch is renaming virt-admin client. The
      client tool does not necessarily have to reflect the names of the API's it's
      using in his internals. An example would be 's/vshAdmConnect/vshAdmDaemon'
      where noone can be certain of what the latter function really does. The former
      is quite expressive about some connection magic it performs, but the latter does
      not say anything, especially when vshAdmReconnect and vshAdmDisconnect were
      left untouched.
      3245e178
  14. 01 12月, 2015 1 次提交
    • M
      admin: Rename virAdmConnect to virAdmDaemon · df8192aa
      Martin Kletzander 提交于
      virAdmConnect was named after virConnect, but after some discussions,
      most of the APIs called will be working with remote daemon and starting
      them virAdmDaemon will make more sense.  Only possibly controversal name
      is CloseCallback (de)registration, and connecting to the daemon (which
      will still be Open/Close), but even this makes sense if one thinks about
      the daemon being opened and closed, e.g. as file, etc.
      
      This way all the APIs working with the daemon will start with
      virAdmDaemon prefix, they will accept virAdmDaemonPtr as first parameter
      and that will better suit with other namings as well (virDomain*,
      virAdmServer*, etc.).
      
      Because in virt-admin, the connection name does not refer to a struct
      that would have a connect in its name, also adjust 'connname' in
      clients.  And because it is not used anywhere in the vsh code, move it
      from there into each client.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      df8192aa
  15. 30 11月, 2015 1 次提交
    • E
      admin: Introduce virAdmConnectGetLibVersion · a474371f
      Erik Skultety 提交于
      Introduce a new API to get libvirt version. It is worth noting, that
      libvirt-admin and libvirt share the same version number. Unfortunately,
      our existing API isn't generic enough to be used with virAdmConnectPtr
      as well. Also this patch wires up this API to the virt-admin client
      as a generic cmdVersion command.
      a474371f
  16. 16 6月, 2015 3 次提交
    • M
      Revert "admin: Add virAdmHello function" · 2cc6c652
      Martin Kletzander 提交于
      This reverts commit 5792fabb.
      
      I mistakenly pushed it along with the Admin API series.
      2cc6c652
    • M
      admin: Add virAdmHello function · 5792fabb
      Martin Kletzander 提交于
      Just one of the simplest functions that returns string "Clients: X"
      where X is the number of connected clients to daemon's first
      subserver (the original one), so it can be tested using virsh, ipython,
      etc.
      
      The subserver is gathered by incrementing its reference
      counter (similarly to getting qemu capabilities), so there is no
      deadlock with admin subserver in this API.
      
      Here you can see how functions should be named in the client (virAdm*)
      and server (adm*).
      
      There is also a parameter @flags that must be 0, which helps testing
      proper error propagation into the client.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      5792fabb
    • M
      Add support for admin API in libvirt daemon · d5f4241b
      Martin Kletzander 提交于
      For this to pe properly separated from other protocols used by the
      server, there is second server added which allows access to the whole
      virNetDaemon to its clients.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      d5f4241b