1. 09 8月, 2019 2 次提交
  2. 07 8月, 2019 2 次提交
  3. 27 7月, 2019 1 次提交
    • E
      backup: Introduce virDomainCheckpoint APIs · 0d44788f
      Eric Blake 提交于
      Introduce a bunch of new public APIs related to backup checkpoints.
      Checkpoints are modeled heavily after virDomainSnapshotPtr (both
      represent a point in time of the guest), although a snapshot exists
      with the intent of rolling back to that state, while a checkpoint
      exists to make it possible to create an incremental backup at a later
      time.  We may have a future hypervisor that can completely manage
      checkpoints without libvirt metadata, but the first two planned
      hypervisors (qemu and test) both always use libvirt for tracking
      metadata relations between checkpoints, so for now, I've deferred
      the counterpart of virDomainSnapshotHasMetadata for a separate
      API addition at a later date if there is ever a need for it.
      
      Note that until we allow snapshots and checkpoints to exist
      simultaneously on the same domain (although the actual prevention of
      this will be in a separate patch for the sake of an easier revert down
      the road), that it is not possible to branch out to create more than
      one checkpoint child to a given parent, although it may become
      possible later when we revert to a snapshot that coincides with a
      checkpoint.  This also means that for now, the decision of which
      checkpoint becomes the parent of a newly created one is the only
      checkpoint with no child (so while there are APIs for dealing with a
      current snapshot, we do not need those for checkpoints).  We may end
      up exposing a notion of a current checkpoint later, but it's easier to
      add stuff when proven needed than to blindly support it now and wish
      we hadn't exposed it.
      
      The following map shows the API relations to snapshots, with new APIs
      on the right:
      
      Operate on a domain object to create/redefine a child:
      virDomainSnapshotCreateXML          virDomainCheckpointCreateXML
      
      Operate on a child object for lifetime management:
      virDomainSnapshotDelete             virDomainCheckpointDelete
      virDomainSnapshotFree               virDomainCheckpointFree
      virDomainSnapshotRef                virDomainCheckpointRef
      
      Operate on a child object to learn more about it:
      virDomainSnapshotGetXMLDesc         virDomainCheckpointGetXMLDesc
      virDomainSnapshotGetConnect         virDomainCheckpointGetConnect
      virDomainSnapshotGetDomain          virDomainCheckpointGetDomain
      virDomainSnapshotGetName            virDomainCheckpiontGetName
      virDomainSnapshotGetParent          virDomainCheckpiontGetParent
      virDomainSnapshotHasMetadata        (deferred for later)
      virDomainSnapshotIsCurrent          (no counterpart, see note above)
      
      Operate on a domain object to list all children:
      virDomainSnapshotNum                (no counterparts, these are the old
      virDomainSnapshotListNames           racy interfaces)
      virDomainSnapshotListAllSnapshots   virDomainListAllCheckpoints
      
      Operate on a child object to list descendents:
      virDomainSnapshotNumChildren        (no counterparts, these are the old
      virDomainSnapshotListChildrenNames   racy interfaces)
      virDomainSnapshotListAllChildren    virDomainCheckpointListAllChildren
      
      Operate on a domain to locate a particular child:
      virDomainSnapshotLookupByName       virDomainCheckpointLookupByName
      virDomainSnapshotCurrent            (no counterpart, see note above)
      virDomainHasCurrentSnapshot         (no counterpart, old racy interface)
      
      Operate on a snapshot to roll back to earlier state:
      virDomainSnapshotRevert             (no counterpart, instead checkpoints
                                           are used in incremental backups via
      				     XML to virDomainBackupBegin)
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      0d44788f
  4. 17 5月, 2019 1 次提交
    • D
      src: don't statically link code that's already in libvirt.so · e5df4ede
      Daniel P. Berrangé 提交于
      Various binaries are statically linking to libvirt_util.la and
      other intermediate libraries we build. These intermediate libs
      all get built into the main libvirt.so shared library eventually,
      so we can dynamically link to that instead and reduce the on disk
      footprint.
      
      In libvirt-daemon RPM:
      
                  virtlockd: 1.6 MB -> 153 KB
                   virtlogd: 1.6 MB -> 157 KB
           libvirt_iohelper: 937 KB -> 23 KB
      
      In libvirt-daemon-driver-network RPM:
      
       libvirt_leaseshelper: 940 KB -> 26 KB
      
      In libvirt-daemon-driver-storage-core RPM:
      
         libvirt_parthelper: 926 KB -> 21 KB
      
      IOW, about 5.6 MB total space saving in a build done on Fedora 30
      x86_64 architecture.
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      e5df4ede
  5. 11 4月, 2019 1 次提交
    • D
      build-aux: ensure all scripts are included in EXTRA_DIST · d5cbf85f
      Daniel P. Berrangé 提交于
      Few of the scripts in build-aux are included in EXTRA_DIST. This is not
      a serious problem since they are primarily tools intended for developers
      upstream, and downstream builds won't need them. Having them missing,
      however, complicates downstream patching because it means patches that
      are auto-exported from git will fail to apply if they include a change
      to a file in build-aux/.  By bundling all these scripts in the dist we
      make patching more straightforward.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      d5cbf85f
  6. 10 4月, 2019 2 次提交
  7. 16 3月, 2019 2 次提交
  8. 15 3月, 2019 1 次提交
  9. 14 3月, 2019 2 次提交
  10. 16 1月, 2019 1 次提交
  11. 10 1月, 2019 3 次提交
  12. 08 1月, 2019 2 次提交
  13. 18 12月, 2018 1 次提交
  14. 05 10月, 2018 1 次提交
    • P
      util: introduce cgroup v2 files · b4ddf5ae
      Pavel Hrdina 提交于
      Place cgroup v2 backend type before cgroup v1 to make it obvious
      that cgroup v2 is preferred implementation.
      
      Following patches will introduce support for hybrid configuration
      which will allow us to use both at the same time, but we should
      prefer cgroup v2 regardless.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      b4ddf5ae
  15. 25 9月, 2018 2 次提交
  16. 28 8月, 2018 1 次提交
  17. 13 8月, 2018 3 次提交
  18. 10 8月, 2018 1 次提交
  19. 01 8月, 2018 1 次提交
    • D
      util: avoid symbol clash between json libraries · ce3c6ef6
      Daniel P. Berrangé 提交于
      The jansson and json-glib libraries both export symbols with a json_
      name prefix and json_object_iter_next() clashes between them.
      
      Unfortunately json-glib is linked in by GTK, so any app using GTK and
      libvirt will get a clash, resulting in SEGV. This also affects the NSS
      module provided by libvirt
      
      Instead of directly linking to jansson, use dlopen() with the RTLD_LOCAL
      flag which allows us to hide the symbols from the application that loads
      libvirt or the NSS module.
      
      Some preprocessor black magic and wrapper functions are used to redirect
      calls into the dlopen resolved symbols.
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      ce3c6ef6
  20. 18 7月, 2018 1 次提交
  21. 05 6月, 2018 2 次提交
  22. 02 5月, 2018 1 次提交
  23. 24 4月, 2018 2 次提交
    • D
      build: prevent unloading of dlopen'd modules · 71feef92
      Daniel P. Berrangé 提交于
      We previously added "-z nodelete" to the build of libvirt.so to prevent
      crashes when thread local destructors run which point to a code that
      has been dlclose()d:
      
        commit 8e44e559
        Author: Daniel P. Berrange <berrange@redhat.com>
        Date:   Thu Sep 1 17:57:06 2011 +0100
      
            Prevent crash from dlclose() of libvirt.so
      
      The libvirtd loadable modules can suffer from the same problem if they
      were ever unloaded. Fortunately we don't ever call dlclose() on them,
      but lets add a second layer of protection by linking them with the
      "-z nodelete" flag. While we're doing this, lets add a third layer of
      protection by passing RTLD_NODELETE to dlopen().
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      71feef92
    • D
      build: prevent unloading of all public libraries · 419607c4
      Daniel P. Berrangé 提交于
      We previously added "-z nodelete" to the build of libvirt.so to prevent
      crashes when thread local destructors run which point to a code that
      has been dlclose()d:
      
        commit 8e44e559
        Author: Daniel P. Berrange <berrange@redhat.com>
        Date:   Thu Sep 1 17:57:06 2011 +0100
      
            Prevent crash from dlclose() of libvirt.so
      
      We forgot to copy this protection into the libvirt-qemu.so, libvirt-lxc.so
      and libvirt-admin.so libraries when we introduced them.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      419607c4
  24. 10 4月, 2018 1 次提交
  25. 15 3月, 2018 2 次提交
  26. 06 3月, 2018 1 次提交