1. 10 11月, 2009 1 次提交
  2. 06 11月, 2009 1 次提交
  3. 05 11月, 2009 4 次提交
    • R
      LXC allow container to have ethN interfaces · 8db32571
      Ryota Ozaki 提交于
      Current implementation of lxc driver creates vethN named
      interface(s) in the host and passes as it is to a container.
      The reason why it doesn't use ethN is due to the limitation
      that one namespace cannot have multiple iterfaces that have
      an identical name so that we give up creating ethN named
      interface in the host for the container.
      
      However, we should be able to allow the container to have
      ethN by changing the name after clone(CLONE_NEWNET).
      
      * src/lxc/lxc_container.c src/lxc/veth.c src/lxc/veth.h: do the clone
        and then renames interfaces eth0 ... ethN to keep the interface names
        familiar in the domain
      8db32571
    • R
      LXC cleanup deep indentation in lxcDomainSetAutostart · a9cb3548
      Ryota Ozaki 提交于
      * src/lxc/lxc_driver.c: refactor lxcDomainSetAutostart() to avoid deep
        indentation of the code
      a9cb3548
    • R
      LXC messages cleanup and fix lxcError · 24e3b35c
      Ryota Ozaki 提交于
      * src/lxc/lxc_container.c src/lxc/lxc_controller.c src/lxc/lxc_driver.c
        src/lxc/veth.c: most of cleanups are just capitalizing their messages
        though, some fixes wrong error messages and awkward indentations, and
        improves error messages.
      24e3b35c
    • R
      LXC fix wrong or out-of-date function descriptions · 15941b2b
      Ryota Ozaki 提交于
      * src/lxc/lxc_container.c src/lxc/lxc_controller.c src/lxc/lxc_driver.c
        src/lxc/veth.c: fix broken function comments
      15941b2b
  4. 04 11月, 2009 1 次提交
    • C
      Improve error reporting for virConnectGetHostname calls · 517761fd
      Cole Robinson 提交于
      All drivers have copy + pasted inadequate error reporting which wraps
      util.c:virGetHostname. Move all error reporting to this function, and improve
      what we report.
      
      Changes from v1:
        Drop the driver wrappers around virGetHostname. This means we still need
        to keep the new conn argument to virGetHostname, but I think it's worth
        it.
      517761fd
  5. 03 11月, 2009 4 次提交
    • C
      Fix up NLS warnings. · 991be604
      Chris Lalancette 提交于
      When building with --disable-nls, I got a few messages like this:
      
      storage/storage_backend.c: In function 'virStorageBackendCreateQemuImg':
      storage/storage_backend.c:571: warning: format not a string literal and no format arguments
      
      Fix these up.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      991be604
    • D
      Fix return value in virStateInitialize impl for LXC · 979218cd
      Daniel P. Berrange 提交于
      The LXC driver was mistakenly returning -1 for lxcStartup()
      in scenarios that are not an error. This caused the libvirtd
      to quit for unprivileged users. This fixes the return code
      of LXC driver, and also adds a "name" field to the virStateDriver
      struct and logging to make it easier to find these problems
      in the future
      
      * src/driver.h: Add a 'name' field to state driver to allow
        easy identification during failures
      * src/libvirt.c: Log name of failed driver for virStateInit
        failures
      * src/lxc/lxc_driver.c: Don't return a failure code for
        lxcStartup() if LXC is not available on this host, simply
        disable the driver.
      * src/network/bridge_driver.c, src/node_device/node_device_devkit.c,
        src/node_device/node_device_hal.c, src/opennebula/one_driver.c,
        src/qemu/qemu_driver.c, src/remote/remote_driver.c,
        src/secret/secret_driver.c, src/storage/storage_driver.c,
        src/uml/uml_driver.c, src/xen/xen_driver.c: Fill in name
        field in virStateDriver struct
      979218cd
    • D
      Rename internal APis · fc8d1991
      Daniel P. Berrange 提交于
      Rename virDomainIsActive to virDomainObjIsActive, and
      virInterfaceIsActive to virInterfaceObjIsActive and finally
      virNetworkIsActive to virNetworkObjIsActive.
      
      * src/conf/domain_conf.c, src/conf/domain_conf.h,
        src/conf/interface_conf.h, src/conf/network_conf.c,
        src/conf/network_conf.h, src/lxc/lxc_driver.c,
        src/network/bridge_driver.c, src/opennebula/one_driver.c,
        src/openvz/openvz_driver.c, src/qemu/qemu_driver.c,
        src/test/test_driver.c, src/uml/uml_driver.c: Update for
        renamed APIs.
      fc8d1991
    • D
      Allow for a driver specific private data blob in virDomainObjPtr · 3505790b
      Daniel P. Berrange 提交于
      The virDomainObjPtr object stores state about a running domain.
      This object is shared across all drivers so it is not appropriate
      to include driver specific state here. This patch adds the ability
      to request a blob of private data per domain object instance. The
      driver must provide a allocator & deallocator for this purpose
      
      THis patch abuses the virCapabilitiesPtr structure for storing the
      allocator/deallocator callbacks, since it is already being abused
      for other internal things relating to parsing. This should be moved
      out into a separate object at some point.
      
      * src/conf/capabilities.h: Add privateDataAllocFunc and
        privateDataFreeFunc fields
      * src/conf/domain_conf.c: Invoke the driver allocators / deallocators
        when creating/freeing virDomainObjPtr instances.
      * src/conf/domain_conf.h: Pass virCapsPtr into virDomainAssignDef
        to allow access to the driver specific allocator function
      * src/lxc/lxc_driver.c, src/opennebula/one_driver.c,
        src/openvz/openvz_driver.c, src/qemu/qemu_driver.c,
        src/test/test_driver.c, src/uml/uml_driver.c: Update for
        change in virDomainAssignDef contract
      3505790b
  6. 29 10月, 2009 1 次提交
    • D
      Convert virDomainObjListPtr to use a hash of domain objects · a3adcce7
      Daniel P. Berrange 提交于
      The current virDomainObjListPtr object stores domain objects in
      an array. This means that to find a particular objects requires
      O(n) time, and more critically acquiring O(n) mutex locks.
      
      The new impl replaces the array with a virHashTable, keyed off
      UUID. Finding a object based on UUID is now O(1) time, and only
      requires a single mutex lock. Finding by name/id is unchanged
      in complexity.
      
      In changing this, all code which iterates over the array had
      to be updated to use a hash table iterator function callback.
      Several of the functions which were identically duplicating
      across all drivers were pulled into domain_conf.c
      
      * src/conf/domain_conf.h, src/conf/domain_conf.c: Change
        virDomainObjListPtr to use virHashTable. Add a initializer
        method virDomainObjListInit, and rename virDomainObjListFree
        to virDomainObjListDeinit, since its not actually freeing
        the container, only its contents. Also add some convenient
        methods virDomainObjListGetInactiveNames,
        virDomainObjListGetActiveIDs and virDomainObjListNumOfDomains
        which can be used to implement the correspondingly named
        public API entry points in drivers
      * src/libvirt_private.syms: Export new methods from domain_conf.h
      * src/lxc/lxc_driver.c, src/opennebula/one_driver.c,
        src/openvz/openvz_conf.c, src/openvz/openvz_driver.c,
        src/qemu/qemu_driver.c, src/test/test_driver.c,
        src/uml/uml_driver.c, src/vbox/vbox_tmpl.c: Update all code
        to deal with hash tables instead of arrays for domains
      a3adcce7
  7. 21 10月, 2009 2 次提交
  8. 14 10月, 2009 1 次提交
  9. 13 10月, 2009 1 次提交
  10. 09 10月, 2009 1 次提交
    • A
      LXC add augeas support for config file · e1a2fe6a
      Amy Griffis 提交于
      * src/lxc/libvirtd_lxc.aug src/lxc/test_libvirtd_lxc.aug: augeas schemas
        for lxc.conf
      * src/Makefile.am libvirt.spec.in: glue the new augeas files in
      e1a2fe6a
  11. 08 10月, 2009 3 次提交
    • A
      LXC add driver config file lxc.conf · 2dd44664
      Amy Griffis 提交于
      * src/lxc/lxc.conf: new configuration file, there is currently one
        tunable "log_with_libvirtd" that controls whether an lxc controller will
        log only to the container log file, or whether it will honor libvirtd's
        log output configuration. This provides a way to have libvirtd and its
        children log to a single file.  The default is to log to the container
        log file.
      * src/Makefile.am libvirt.spec.in: add the new file
      * src/lxc/lxc_conf.[ch] src/lxc/lxc_driver.c: read the new log value
        from the configuration file and pass the log informations when
        starting up a container.
      2dd44664
    • A
      LXC do not truncate container log files on restart · c73a0c4a
      Amy Griffis 提交于
      * src/lxc/lxc_driver.c: use O_APPEND instead of O_TRUNC when opening
        the log file on lxcVmStart()
      c73a0c4a
    • A
      LXC initialize logging configuration · 221b457e
      Amy Griffis 提交于
      * src/lxc/lxc_driver.c src/lxc/lxc_controller.c: before launching the
        lxc controller, have the lxc driver query the log settings and setup
        envp[]. This provides the advantage of honoring the actual log
        configuration instead of only what had been set in the environment.
        The lxc controller now simply has to call virLogSetFromEnv().
      221b457e
  12. 07 10月, 2009 1 次提交
    • R
      LXC implement memory control APIs · 3a05dc09
      Ryota Ozaki 提交于
      The patch implements the missing memory control APIs for lxc, i.e.,
      domainGetMaxMemory, domainSetMaxMemory, domainSetMemory, and improves
      domainGetInfo to return proper amount of used memory via cgroup.
      
      * src/libvirt_private.syms: Export virCgroupGetMemoryUsage
        and add missing virCgroupSetMemory
      * src/lxc/lxc_driver.c: Implement missing memory functions
      * src/util/cgroup.c, src/util/cgroup.h: Add the function
        to get used memory
      3a05dc09
  13. 02 10月, 2009 1 次提交
  14. 23 9月, 2009 1 次提交
    • C
      Introduce virStrncpy. · 03d777f3
      Chris Lalancette 提交于
      Add the virStrncpy function, which takes a dst string, source string,
      the number of bytes to copy and the number of bytes available in the
      dest string.  If the source string is too large to fit into the
      destination string, including the \0 byte, then no data is copied and
      the function returns NULL.  Otherwise, this function copies n bytes
      from source into dst, including the \0, and returns a pointer to the
      dst string.  This function is intended to replace all unsafe uses
      of strncpy in the code base, since strncpy does *not* guarantee that
      the buffer terminates with a \0.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      03d777f3
  15. 22 9月, 2009 2 次提交
  16. 21 9月, 2009 1 次提交
    • D
      Move LXC driver into src/lxc/ · c93125b1
      Daniel P. Berrange 提交于
      * src/lxc_conf.c, src/lxc_conf.h, src/lxc_container.c,
        src/lxc_container.h, src/lxc_controller.c, src/lxc_driver.c,
        src/lxc_driver.h, src/veth.c, src/veth.h: Move to src/lxc/
      * src/opennebula/one_driver.c: Remove bogus veth.h include
      * src/Makefile.am: Adjust for lxc paths
      * daemon/qemud.c: Adjust include for lxc
      c93125b1