1. 17 1月, 2016 1 次提交
  2. 09 12月, 2015 1 次提交
  3. 30 11月, 2015 3 次提交
    • M
      conf: Split virDomainObjList into a separate file · 90f3c0d7
      Michal Privoznik 提交于
      Our domain_conf.* files are big enough. Not only they contain XML
      parsing code, but they served as a storage of all functions whose
      name is virDomain prefixed. This is just wrong as it gathers not
      related functions (and modules) into one big file which is then
      harder to maintain. Split virDomainObjList module into a separate
      file called virdomainobjlist.[ch].
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      90f3c0d7
    • 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
    • E
      virt-admin: Introduce first working skeleton · 64095787
      Erik Skultety 提交于
      This patch introduces virt-admin client which is based on virsh client,
      but had to reimplement several methods to meet virt-admin specific needs
      or remove unnecessary virsh specific logic.
      64095787
  4. 26 11月, 2015 4 次提交
    • D
      logging: add client for virtlogd daemon · 37ed4224
      Daniel P. Berrange 提交于
      Add the virLogManager API which allows for communication with
      the virtlogd daemon to RPC program. This provides the client
      side API to open log files for guest domains.
      
      The virtlogd daemon is setup to auto-spawn on first use when
      running unprivileged. For privileged usage, systemd socket
      activation is used instead.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      37ed4224
    • D
      logging: introduce log handling protocol · 19e5db4a
      Daniel P. Berrange 提交于
      Define a new RPC protocol for the virtlogd daemon that provides
      for handling of logs. The initial RPC method defined allows a
      client to obtain a file handle to use for writing to a log
      file for a guest domain. The file handle passed back will not
      actually refer to the log file, but rather an anonymous pipe.
      The virtlogd daemon will forward I/O between them, ensuring
      file rotation happens when required.
      
      Initially the log setup is hardcoded to cap log files at
      128 KB, and keep 3 backups when rolling over, which gives
      a max usage of 512 KB per guest.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      19e5db4a
    • D
      Import stripped down virtlockd code as basis of virtlogd · 323a329b
      Daniel P. Berrange 提交于
      Copy the virtlockd codebase across to form the initial virlogd
      code. Simple search & replace of s/lock/log/ and gut the remote
      protocol & dispatcher. This gives us a daemon that starts up
      and listens for connections, but does nothing with them.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      323a329b
    • D
      util: add APIs for reading/writing from/to rotating files · 910e65d9
      Daniel P. Berrange 提交于
      Add virRotatingFileReader and virRotatingFileWriter objects
      which allow reading & writing from/to files with automation
      rotation to N backup files when a size limit is reached. This
      is useful for guest logging when a guaranteed finite size
      limit is required. Use of external tools like logrotate is
      inadequate since it leaves the possibility for guest to DOS
      the host in between invokations of logrotate.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      910e65d9
  5. 04 11月, 2015 1 次提交
  6. 06 10月, 2015 2 次提交
  7. 02 10月, 2015 1 次提交
  8. 02 9月, 2015 1 次提交
  9. 26 8月, 2015 1 次提交
    • I
      lxc: Inherit namespace feature · c27553b6
      ik.nitk 提交于
      This patch adds feature for lxc containers to inherit namespaces.
      This is very similar to what lxc-tools or docker provides.  Look
      for "man lxc-start" and you will find that you can pass command
      args as [ --share-[net|ipc|uts] name|pid ]. Or check out docker
      networking option in which you can give --net=container:NAME_or_ID
      as an option for sharing +namespace.
      
      >From this patch you can add extra libvirt option to share
      namespace in following way.
      
       <lxc:namespace>
         <lxc:sharenet type='netns' value='red'/>
         <lxc:shareipc type='pid' value='12345'/>
         <lxc:shareuts type='name' value='container1'/>
       </lxc:namespace>
      
      The netns option is specific to sharenet. It can be used to
      inherit from existing network namespace.
      
      Co-authored: Daniel P. Berrange <berrange@redhat.com>
      c27553b6
  10. 14 8月, 2015 1 次提交
    • E
      tools: Introduce new client generic module vsh · 834c5720
      Erik Skultety 提交于
      In order to share as much virsh' logic as possible with upcomming
      virt-admin client we need to split virsh logic into virsh specific and
      client generic features.
      
      Since majority of virsh methods should be generic enough to be used by
      other clients, it's much easier to rename virsh specific data to virshX
      than doing this vice versa. It moved generic virsh commands (including info
      and opts structures) to generic module vsh.c.
      
      Besides renaming methods and structures, this patch also involves introduction
      of a client specific control structure being referenced as private data in the
      original control structure, introduction of a new global vsh Initializer,
      which currently doesn't do much, but there is a potential for added
      functionality in the future.
      Lastly it introduced client hooks which are especially necessary during
      client connecting phase.
      834c5720
  11. 05 8月, 2015 1 次提交
  12. 03 8月, 2015 1 次提交
  13. 02 7月, 2015 1 次提交
  14. 19 6月, 2015 1 次提交
  15. 17 6月, 2015 1 次提交
  16. 16 6月, 2015 5 次提交
    • 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
    • M
      Add libvirt-admin library · 55e0c840
      Martin Kletzander 提交于
      Initial scratch of the admin library.  It has its own virAdmConnectPtr
      that inherits from virAbstractConnectPtr and thus trivially supports
      error reporting.
      
      There's pkg-config file added and spec-file adjusted as well.
      
      Since the library should be "minimalistic" and not depend on any other
      library, the list of files is especially crafted for it.  Most of them
      could've been put to it's own sub-libraries that would be LIBADD'd to
      libvirt_util, libvirt_net_rpc and libvirt_setuid_rpc_client to minimize
      the number of object files being built, but that's a refactoring that
      isn't the orginal aim of this commit.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      55e0c840
    • M
      Move daemon-related parts of virNetServer to virNetDaemon · fa142073
      Martin Kletzander 提交于
      This allows to have more servers in one daemon which helps isolating
      some resources.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      fa142073
  17. 01 6月, 2015 1 次提交
  18. 04 5月, 2015 1 次提交
  19. 29 4月, 2015 1 次提交
    • M
      qemuBlockJobSync*: introduce sync block job helpers · 89a5e25d
      Michael Chapman 提交于
      qemuBlockJobSyncBegin and qemuBlockJobSyncEnd delimit a region of code
      where block job events are processed "synchronously".
      qemuBlockJobSyncWait and qemuBlockJobSyncWaitWithTimeout wait for an
      event generated by a block job.
      
      The Wait* functions may be called multiple times while the synchronous
      block job is active. Any pending block job event will be processed by
      only when Wait* or End is called.  disk->blockJobStatus is reset by
      these functions, so if it is needed a pointer to a
      virConnectDomainEventBlockJobStatus variable should be passed as the
      last argument. It is safe to pass NULL if you do not care about the
      block job status.
      
      All functions assume the VM object is locked. The Wait* functions will
      unlock the object for as long as they are waiting. They will return -1
      and report an error if the domain exits before an event is received.
      
      Typical use is as follows:
      
        virQEMUDriverPtr driver;
        virDomainObjPtr vm; /* locked */
        virDomainDiskDefPtr disk;
        virConnectDomainEventBlockJobStatus status;
      
        qemuBlockJobSyncBegin(disk);
      
        ... start block job ...
      
        if (qemuBlockJobSyncWait(driver, vm, disk, &status) < 0) {
            /* domain died while waiting for event */
            ret = -1;
            goto error;
        }
      
        ... possibly start other block jobs
            or wait for further events ...
      
        qemuBlockJobSyncEnd(driver, vm, disk, NULL);
      
      To perform other tasks periodically while waiting for an event:
      
        virQEMUDriverPtr driver;
        virDomainObjPtr vm; /* locked */
        virDomainDiskDefPtr disk;
        virConnectDomainEventBlockJobStatus status;
        unsigned long long timeout = 500 * 1000ull; /* milliseconds */
      
        qemuBlockJobSyncBegin(disk);
      
        ... start block job ...
      
        do {
            ... do other task ...
      
            if (qemuBlockJobSyncWaitWithTimeout(driver, vm, disk,
                                                timeout, &status) < 0) {
                /* domain died while waiting for event */
                ret = -1;
                goto error;
            }
        } while (status == -1);
      
        qemuBlockJobSyncEnd(driver, vm, disk, NULL);
      Signed-off-by: NMichael Chapman <mike@very.puzzling.org>
      89a5e25d
  20. 02 4月, 2015 1 次提交
  21. 25 3月, 2015 2 次提交
  22. 18 3月, 2015 1 次提交
  23. 06 3月, 2015 1 次提交
    • D
      Refresh translations from Zanata · d196444c
      Daniel P. Berrange 提交于
      Delete .po files which contain zero translated strings. Refresh
      the .pot file and pull down latest translations from Zanata.
      
      When refreshing the libvirt.pot, it can be pushed to zanata
      and .po files resynchonized using
      
       # cd po
       # rm libvirt.pot
       # make libvirt.pot
       # zanata-cli push
       # zanata-cli pull
      
      Note there is no need for 'make update-po', as long as you do
      a zanata push, immediately followed by zanata pull, as the
      Zanata server will ensure the .po files downloaded match the
      just pushed .pot file.
      
      Note at time of writing, it is strongly recommended to only
      use the zanata Java client binary (zanata-cli), and not the
      python client binary (zanata). This is because the moderately
      large size of the libvirt pot file is causing errors when the
      python client tries to push, which have been known to result
      in the loss of all translations on the server, as well as also
      preventing uploading of .po files themselves :-(
      d196444c
  24. 02 3月, 2015 1 次提交
  25. 23 2月, 2015 1 次提交
  26. 21 2月, 2015 1 次提交
    • P
      conf: Move numatune_conf to numa_conf · fcee64e7
      Peter Krempa 提交于
      For a while now there are two places that gather information about NUMA
      related guest configuration. While the XML can't be changed we can at
      least store the data in one place in the definition.
      
      Rename the numatune_conf.[ch] files to numa_conf as later patches will
      move the rest of the definitions from the cpu definition to this one.
      fcee64e7
  27. 27 1月, 2015 1 次提交
  28. 26 1月, 2015 1 次提交
    • D
      systemd: fix build without dbus · d13b586a
      Daniel P. Berrange 提交于
      The virDBusMethodCall method has a DBusError as one of its
      parameters. If the caller wants to pass a non-NULL value
      for this, it immediately makes the calling code require
      DBus at build time. This has led to breakage of non-DBus
      builds several times. It is desirable that only the virdbus.c
      file should need WITH_DBUS conditionals, so we must ideally
      remove the DBusError parameter from the method.
      
      We can't simply raise a libvirt error, since the whole point
      of this parameter is to give the callers a way to check if
      the error is one they want to ignore, without having the logs
      polluted with an error message. So, we add a virErrorPtr
      parameter which the caller can then either ignore or raise
      using the new virReportErrorObject method.
      
      This new method is distinct from virSetError in that it
      ensures the logging hooks are run.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d13b586a
  29. 16 1月, 2015 1 次提交