Commit Graph

26 Commits

Author SHA1 Message Date
Dan Smith
df01e14bd7 Add LXC version implementation
This patch adds an implementation of the version function to the LXC driver.
The providers use the hypervisor version in a field of one of the instances,
so we need to have something meaningful here.  AFAICT, the only real option
we have (considering the limitations of the libvirt version information) is
to use the kernel version.
2008-09-03 17:21:27 +00:00
Daniel P. Berrange
da1963381b Fix QEMU domain creation by allowing virExec to preserve certain FDs 2008-08-27 11:42:52 +00:00
Dan Smith
5fb17bcc1e [LXC] Cleanup devices on container shutdown 2008-08-22 15:35:37 +00:00
Daniel P. Berrange
177c74b1fa Create lxc_controller standalone binary 2008-08-20 20:55:32 +00:00
Daniel P. Berrange
bb16f4a25d Do conditional driver config in Makefile.am, not source files 2008-08-20 20:48:35 +00:00
Daniel P. Berrange
6334cd16df Remove configFile/autostartLink vars from virDomainObj struct 2008-08-20 19:42:36 +00:00
Daniel P. Berrange
2e7a373646 Switch LXC driver over to generic domain XML processing APIs 2008-08-13 12:50:55 +00:00
Daniel P. Berrange
763dacda97 Make LXC I/O controller process a parent of the container process 2008-08-13 10:52:15 +00:00
Daniel P. Berrange
518c2144e5 Re-arrange code between LXC driver files 2008-08-13 10:25:34 +00:00
Daniel P. Berrange
e82c913680 Refactor LXC driver to pass tty/socket state directly 2008-08-13 10:14:47 +00:00
Daniel P. Berrange
b3728d7d72 Fix const-correctness of virRUn and virExec 2008-08-08 15:43:38 +00:00
Dan Smith
0240fe9d58 [LXC] Add setup/cleanup of container network interfaces 2008-06-26 16:09:48 +00:00
Dan Smith
97e1fc3734 [LXC] Add XML parsing of container network interfaces. 2008-06-26 16:08:59 +00:00
Dan Smith
99ded85f45 [LXC] Detect support for NETNS in lxc driver initialization
Allow check for containers support to be done without CLONE_NEWNET, and then
determine support on the fly by checking for iproute2 support and a
successful clone(CLONE_NEWNET).  This lets us set a flag for later, as well
as not completely disable LXC support on a system without NETNS support.
2008-06-26 16:05:02 +00:00
Daniel P. Berrange
841dd882a4 Fix misc compile warnings 2008-06-12 13:48:29 +00:00
David L. Leskovec
0d0c96722c Mon Jun 9 15:42:34 PST 2008 David L. Leskovec <dlesko@linux.vnet.ibm.com>
* src/lxc_driver.c: Make console element is output only.  Always open new
	PTY when starting a container.
	Fix string overrun when storing console name in VM def struct
2008-06-09 22:51:32 +00:00
Daniel P. Berrange
d789ef5a88 Switch over remaining driver code to use memory alloc apis 2008-06-06 11:09:57 +00:00
David L. Leskovec
0bd57cdbe1 Fix a few issues related to restart of libvirtd with containers running.
Mon May 12 23:32:21 PST 2008 David L. Leskovec <dlesko@linux.vnet.ibm.com>

	* src/lxc_driver.c: Add sanity of tty pid before kill()
	Ignore ECHILD errors during VM cleanup
	Call functions to store tty pid and cleanup tty pid file
	* src/lxc_conf.h: Add function to verify container process exists
	Add facilities to manage storing the tty forward process pid
	* src/lxc_conf.c: Add function to verify container process exists
	Call function to verify container process during config load
	Add facilities to manage storing the tty forward process pid
	Call function to load tty pid during load config
2008-06-05 06:03:00 +00:00
David L. Leskovec
94311de539 Enable libvirtd drivers to handle signals, in lxc, sigchld triggers vm cleanup
Mon May 12 23:32:21 PST 2008 David L. Leskovec <dlesko@linux.vnet.ibm.com>

	* qemud/qemud.c: get siginfo with signals, distribute to drivers that
    register a handler
	* src/driver.h: add sighandler function to state driver table
	* src/internal.h: define virStateSigDispatcher functions
	* src/libvirt.c: add __virStateSigDispatcher function
	* src/libvirt_sym.version: add __virStateSigDispatcher
	* src/lxc_driver.c: add sig handler function, cleanup vm when sigchld
    received from container process
	* src/qemu_driver.c: NULL for sig handler (no handler) in state driver
	* src/remote_internal.c: NULL for sig handler (no handler) in state driver
	* src/storage_driver.c: NULL for sig handler (no handler) in state driver
2008-05-13 06:30:58 +00:00
David L. Leskovec
6ca76333f3 *** empty log message *** 2008-05-09 07:16:30 +00:00
Jim Meyering
dc42a9d2de remove Vim and Emacs variable settings from C source files
Done with these commands:
git grep -l Local.variab|xargs \
  perl -0x3b -pi -e 's,\n+/\*\n \* vim:(.|\n)*,\n,'

git grep -l Local.variab|xargs \
  perl -0x3b -pi -e 's,\n+/\*\n \* Local variables:\n(.|\n)*,\n,'
2008-04-10 16:53:29 +00:00
Daniel Veillard
9ae41a71ac * src/Makefile.am src/lxc_conf.c src/lxc_conf.h src/lxc_container.c
src/lxc_container.h src/lxc_driver.c: Applied second set of
  linux container patches from Dave Leskovec adding start/stop
  of domains
Daniel
2008-04-10 07:30:52 +00:00
Daniel Veillard
c7d7aa1cd1 remove dandling domain/net/conn pointers from error data
* src/hash.c src/internal.h src/virterror.c: remove dandling
  domain/net/conn pointers from error data when released.
* src/lxc_driver.c: fix a NULL/0 return error mismatch
Daniel
2008-03-31 14:38:12 +00:00
Daniel Veillard
497f252015 linux countainers cleanup patches
* src/lxc_conf.c src/lxc_conf.h: cleanup patch for the conf driver
  of linux countainers, reuse XPath helpers, make string fields dynamic
  and remove a memory leak.
* src/lxc_driver.c: avoid some problems when the config directory is
  not accessible and for regression tests
Daniel
2008-03-31 12:02:12 +00:00
Daniel Veillard
425cf2e792 Linux container fixes, move driver in the daemon.
* src/lxc_conf.c src/lxc_conf.h src/lxc_driver.c src/remote_internal.c:
  applied patch from Dan Berrange to change the way the lxc driver
  works, migrating the support in the daemon, it also removes some
  compilation issues and teh way the configuration files are named.
Daniel
2008-03-27 09:34:06 +00:00
Daniel Veillard
f163895204 Initial Linux containers work
* configure.in include/libvirt/virterror.h src/Makefile.am
  src/driver.h src/lxc_conf.[ch] src/lxc_driver.[ch] src/virterror.c:
  Applied 3 patches from Dave Leskovec for intial support of
  Linux containers, configured off by default, work in progress.
* src/libvirt.c: improve virDomainCreateLinux xmlDesc description
Daniel
2008-03-21 15:03:37 +00:00