1. 02 6月, 2011 12 次提交
    • D
      Add initial docs about the lock managers · 395793a8
      Daniel P. Berrange 提交于
      395793a8
    • D
      Add higher level lock API for domain objects · ad73a937
      Daniel P. Berrange 提交于
      To facilitate use of the locking plugins from hypervisor drivers,
      introduce a higher level API for locking virDomainObjPtr instances.
      In includes APIs targetted to VM startup, and hotplug/unplug
      
      * src/Makefile.am: Add domain lock API
      * src/locking/domain_lock.c, src/locking/domain_lock.h: High
        level API for domain locking
      ad73a937
    • D
      Add a 'nop' lock driver implementation. · db98851c
      Daniel P. Berrange 提交于
      To allow hypervisor drivers to assume that a lock driver impl
      will be guaranteed to exist, provide a 'nop' impl that is
      compiled into the library
      
      * src/Makefile.am: Add nop driver
      * src/locking/lock_driver_nop.c, src/locking/lock_driver_nop.h:
        Nop lock driver implementation
      * src/locking/lock_manager.c: Enable direct access of 'nop'
        driver, instead of dlopen()ing it.
      db98851c
    • D
      Basic framework for lock manager plugins · 6a943419
      Daniel P. Berrange 提交于
      Define the basic framework lock manager plugins. The
      basic plugin API for 3rd parties to implemented is
      defined in
      
        src/locking/lock_driver.h
      
      This allows dlopen()able modules for alternative locking
      schemes, however, we do not install the header. This
      requires lock plugins to be in-tree allowing changing of
      the lock manager plugin API in future.
      
      The libvirt code for loading & calling into plugins
      is in
      
        src/locking/lock_manager.{c,h}
      
      * include/libvirt/virterror.h, src/util/virterror.c: Add
        VIR_FROM_LOCKING
      * src/locking/lock_driver.h: API for lock driver plugins
        to implement
      * src/locking/lock_manager.c, src/locking/lock_manager.h:
        Internal API for managing locking
      * src/Makefile.am: Add locking code
      6a943419
    • D
      Support leases in guest XML and lock manager · 1ea83207
      Daniel P. Berrange 提交于
      A lock manager may operate in various modes. The direct mode of
      operation is to obtain locks based on the resources associated
      with devices in the XML. The indirect mode is where the app
      creating the domain provides explicit leases for each resource
      that needs to be locked. This XML extension allows for listing
      resources in the XML
      
        <devices>
           ...
           <lease>
             <lockspace>somearea</lockspace>
             <key>thequickbrownfoxjumpsoverthelazydog</key>
             <target path='/some/lease/path' offset='23432'/>
           </lease>
           ...
        </devices>
      
      The 'lockspace' is a unique identifier for the lockspace which
      the lease is associated
      
      The 'key' is a unique identifier for the resource associated
      with the lease.
      
      The 'target' is the file on disk where the leases are held.
      
      * docs/schemas/domain.rng: Add lease schema
      * src/conf/domain_conf.c, src/conf/domain_conf.h: parsing and
        formatting for leases
      * tests/qemuxml2argvdata/qemuxml2argv-lease.args,
        tests/qemuxml2argvdata/qemuxml2argv-lease.xml,
        tests/qemuxml2xmltest.c: Test XML handling for leases
      1ea83207
    • D
      Allow handshake with child process during startup · 285c2fdf
      Daniel P. Berrange 提交于
      Allow the parent process to perform a bi-directional handshake
      with the child process during fork/exec. The child process
      will fork and do its initial setup. Immediately prior to the
      exec(), it will stop & wait for a handshake from the parent
      process. The parent process will spawn the child and wait
      until the child reaches the handshake point. It will do
      whatever extra setup work is required, before signalling the
      child to continue.
      
      The implementation of this is done using two pairs of blocking
      pipes. The first pair is used to block the parent, until the
      child writes a single byte. Then the second pair pair is used
      to block the child, until the parent confirms with another
      single byte.
      
      * src/util/command.c, src/util/command.h,
        src/libvirt_private.syms: Add APIs to perform a handshake
      285c2fdf
    • E
      security: plug regression introduced in disk probe logic · b598ac55
      Eric Blake 提交于
      Regression introduced in commit d6623003 (v0.8.8) - using the
      wrong sizeof operand meant that security manager private data
      was overlaying the allowDiskFormatProbing member of struct
      _virSecurityManager.  This reopens disk probing, which was
      supposed to be prevented by the solution to CVE-2010-2238.
      
      * src/security/security_manager.c
      (virSecurityManagerGetPrivateData): Use correct offset.
      b598ac55
    • E
      tests: really fix QEMU XML-2-ARGV graphics-spice-timeout test · b43e78f7
      Eric Blake 提交于
      Alas, /usr/bin/kvm is also not directly supported by testutilsqemu.c.
      
      In fact, _any_ test that uses <cpu match=...> has to use our faked
      qemu.sh in order to properly answer the 'qemu -cpu ?' probe done
      during qemu command line building.
      
      * tests/qemuxml2argvdata/*graphics-spice-timeout*: Switch emulator, again.
      b43e78f7
    • E
      build: avoid corrupting / in RHEL 5 · c3c30d4d
      Eric Blake 提交于
      I noticed this while building from libvirt.git on RHEL 5.6:
      
      Generating internals/command.html.tmp
      mkdir: cannot create directory `/internals': Permission denied
      
      If I had been building as root instead, this pollutes /.
      
      Older autoconf lacks $(builddir), but it is rigorously equal to '.'
      in newer autoconf, so we could use '$(MKDIR_P) internals' instead.
      
      However, since internals/command.html is part of the tarball, we
      _already_ build it in $(srcdir), not $(builddir) during VPATH
      builds, so the mkdir is wasted effort!
      
      * docs/Makefile.am (internals/%.html.tmp): Drop unused mkdir.
      c3c30d4d
    • J
      tests: Add a test for correct disk device ordering · f5534a13
      Jiri Denemark 提交于
      f5534a13
    • J
      Fix order of disks and controllers · c1a98d88
      Jiri Denemark 提交于
      Commit 2d6adabd replaced qsorting disk
      and controller devices with inserting them at the right position. That
      was to fix unnecessary reordering of devices. However, when parsing
      domain XML devices are just taken in the order in which they appear in
      the XML since. Use the correct insertion algorithm to honor device
      target.
      c1a98d88
    • M
      Fix QEMU XML-2-ARGV graphics-spice-timeout test · 3bb35a52
      Matthias Bolte 提交于
      The test used an emulator that is not supported in testutilsqemu.c.
      Switch from qemu-kvm to kvm to fix this.
      3bb35a52
  2. 01 6月, 2011 13 次提交
  3. 31 5月, 2011 15 次提交
    • M
      tests: Add more complex domain scheme test data · 7693c039
      Michal Privoznik 提交于
      7693c039
    • M
      tests: Test for SPICE compression options · dbb7ebe9
      Michal Privoznik 提交于
      and check regression
      dbb7ebe9
    • M
      Ignore backward compatibility macros in apibuild.py · 1767c8d7
      Matthias Bolte 提交于
      This fixes this three warnings from the parser by allowing the parser
      to ignore some macros in the same way as it can ignore functions.
      
      Parsing ./../include/libvirt/libvirt.h
      Misformatted macro comment for _virSchedParameter
       Expecting '* _virSchedParameter:' got '* virSchedParameter:'
      Misformatted macro comment for _virBlkioParameter
       Expecting '* _virBlkioParameter:' got '* virBlkioParameter:'
      Misformatted macro comment for _virMemoryParameter
       Expecting '* _virMemoryParameter:' got '* virMemoryParameter:'
      1767c8d7
    • M
      conf: Fix incorrect spice graphic XML format on compression options · 155542a5
      Michal Privoznik 提交于
      If spice graphics has no <channel> elements, the output graphics XML
      is messed up. To prevent this, we need to end the <graphics> element
      just before adding any compression selecting elements.
      155542a5
    • D
      Fix sysinfo/virsh build problems on Win32 · ef983dfe
      Daniel P. Berrange 提交于
      The virSysinfoIsEqual method was mistakenly inside a #ifndef WIN32
      conditional.
      
      The existing virSysinfoFormat is also stubbed out on Win32, even
      though the code works without any trouble. This breaks XML output
      on Win32, so the stub is removed.
      
      virsh migrate mistakenly had some variables inside the conditional
      
      * src/util/sysinfo.c: Build virSysinfoIsEqual on Win32 and remove
        Win32 stub for virSysinfoFormat
      * tools/virsh.c: Fix variable declaration on Win32
      ef983dfe
    • J
      openvz: fix bridge devices parsing in openvzReadNetworkConf() · 07963952
      Jean-Baptiste Rouault 提交于
      strchrnul() was called on the wrong string so it returned
      the same result for each iteration.
      07963952
    • D
      Ensure hvsupport.html.in is built before HTML validation · 7cbbf61b
      Daniel P. Berrange 提交于
      In a parallel make, HTML validation tries to run before
      hvsupport.html.in has been built.
      
      * docs/Makefile.am: List hvsupport.html.in as a built source
      7cbbf61b
    • D
      Allow custom XML to be passed in during migration · 44924615
      Daniel P. Berrange 提交于
      Update the qemuDomainMigrateBegin method so that it accepts
      an optional incoming XML document. This will be validated
      for ABI compatibility against the current domain config,
      and if this check passes, will be passed back out for use
      by the qemuDomainMigratePrepare method on the target
      
      * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h,
        src/qemu/qemu_migration.c: Allow custom XML to be passed
      44924615
    • D
      Allow virsh to pass in a custom XML document for migration · ec5301cb
      Daniel P. Berrange 提交于
      Switch virsh migrate over to use virDomainMigrate2 and
      virDomainMigrateToURI2. This is still compatible with
      older libvirts, because these methods dynamically choose
      whether to perform v1, v2 or v3 migration based on declared
      RPC support from the libvirtd instances
      
      Add a --xml arg which allows the user to pass in a custom
      XML document. This XML document must be ABI compatible
      with the current *live* XML document for the running guest
      on the source host. ABI compatibility will be enforced by
      any driver supporting this function
      
      * tools/virsh.c: Add '--xml' arg to migrate command
      ec5301cb
    • D
      Add an API for comparing the ABI of two guest configurations · 08106e20
      Daniel P. Berrange 提交于
      To allow a client app to pass in custom XML during migration
      of a guest it is neccessary to ensure the guest ABI remains
      unchanged. The virDomainDefCheckABIStablity method accepts
      two virDomainDefPtr structs and compares everything in them
      that could impact the guest machine ABI
      
      * src/conf/domain_conf.c, src/conf/domain_conf.h,
        src/libvirt_private.syms: Add virDomainDefCheckABIStablity
      * src/conf/cpu_conf.c, src/conf/cpu_conf.h: Add virCPUDefIsEqual
      * src/util/sysinfo.c, src/util/sysinfo.h: Add virSysinfoIsEqual
      08106e20
    • D
      Remove unused 'target' field in virDomainHostdevDef · 0e4d4afb
      Daniel P. Berrange 提交于
      The virDomainHostdevDef struct contains a 'char *target'
      field. This is set to 'NULL' when parsing XML and never
      used / set anywhere else. Clearly it is bogus & unused
      
      * src/conf/domain_conf.c, src/conf/domain_conf.h: Remove
        target from virDomainHostdevDef
      0e4d4afb
    • O
      lxc: Seperate domain config loading · 584ce634
      Osier Yang 提交于
      This patch seperate the domain config loading just as qemu driver
      does, first loading config of running or trasient domains, then
      of persistent inactive domains. And only try to reconnect the
      monitor of running domains, so that it won't always throws errors
      saying can't connect to domain monitor.
      
      And as "virDomainLoadConfig->virDomainAssignDef->virDomainObjAssignDef",
      already do things like "vm->newDef = def", removed the codes
      in "lxcReconnectVM" that does the same work.
      584ce634
    • M
      Fix virTypedParameter alias comments · 99110a6e
      Matthias Bolte 提交于
      Remove the Domain prefix from the comments.
      99110a6e
    • M
      openvz: Automatically disable on non-Linux systems · e85a602b
      Matthias Bolte 提交于
      As OpenVZ is Linux specific.
      e85a602b
    • M
      Support maximum and current memory flags in libxl driver · bf7f7983
      Markus Groß 提交于
      Add support to set the maximum memory of the domain.
      Also add support to change the memory of the current
      state of the domain, which translates to a running
      domain or the config of the domain.
      
      Based on the code from the qemu driver.
      bf7f7983