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.
* src/qemu_conf.c: patch from Cole Robinson to report in the
capabilities only the ones where the emulators is actually found
* po/libvirt.pot: regenerated
* src/libvirt.c: small typo fix
Daniel
* src/storage_backend.h src/storage_backend_logical.c
src/storage_conf.c src/storage_conf.h src/virsh.c:
Applied patches from David Lively to add storage source
elements needed for storage pool
* docs/formatstorage.html docs/formatstorage.html.in: associated
documentation
Daniel
* src/util.c (virFileReadLimFP): New function.
(__virFileReadLimFD): New function.
* src/util.h (__virFileReadLimFD): Declare.
(virFileReadLimFD): Define.
(virFileReadAll): Rewrite to use virFileReadLimFP.
* src/qemu_conf.c: fix serial/telnet to use "server" option
rather than "listen"
* tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args:
fix the test case too
* src/domain_conf.c src/domain_conf.h src/qemu_conf.c
src/qemu_driver.c: patch from Guido Günther allowing to add
disk as USB devices
* docs/libvirt.rng: extend the schemas for the new value
* tests/qemuxml2argvdata/qemuxml2argv-disk-usb.args
tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
tests/qemuxml2argvtest.c tests/qemuxml2xmltest.c: add a specific
test to the regression suite
Daniel
* src/domain_conf.c src/domain_conf.h src/qemu_conf.c
src/qemu_driver.c: Patch from Guido Günther allowing to pass
usb devices to qemu/kvm
* docs/libvirt.rng: add the new functionality to the grammar
* tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.args
tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.args
tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.xml
tests/qemuxml2argvtest.c tests/qemuxml2xmltest.c: adding examples
to the regression tests
* libvirt.spec.in: fix the licence tag
Daniel
Use inet_pton instead; pull in gnulib's module by the same name.
* src/network_conf.c (virNetworkDefParseXML): Use inet_pton,
rather than inet_aton.
* bootstrap (modules): Add inet_pton.
* gnulib/lib/inet_pton.c: New file, from gnulib.
the regression tests. The problem is that the xenDaemonFormatSxpr{Disk,Net}
functions are shared between domain creation time and attaching disk time.
Unfortunately, though, Xend expects something different during these two times.
During domain creation time, it wants the "(device" in front of the sexpr,
while during attach time it does not. To remedy this situation, I added a flag
to these two functions to differentiate between these two modes. With this
patch in place, all of the regression tests pass.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
code, a couple of bugs were introduced into the attach-disk and attach-interface
functionality. This patch fixes 3 bugs:
1) In xenDaemonAttachDevice(), there is a switch statement to determine which
of the xenDaemonFormatSxpr{Disk,Net} functions to call. Unfortunately, the case
statements are all missing the corresponding "break", so we always fall-through
to the default error case. This patch just adds the appropriate break statements.
2) (minor) In xenDaemonDomainDefineXML (that's a mouthful!), there is a stray
"fprintf". This is now converted to a proper virXendError().
3) xenDaemonFormatSxpr{Disk,Net} were adding an extra (device to the front of
the sexpr expressions that xend did not expect (this is Xend on RHEL 5.2).
Because of this, the attaches would fail. The patch fixes this by removing the
(device from the front, which makes attach-disk and attach-interface work again.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
part, this doesn't really concern libvirt, since for things like attach and
detach we just pass it through and let xend worry about whether it is supported
or not. The one place this breaks down is in the stats collecting code, where
we need to figure out the device number so we can go digging in /sys for the
statistics.
To remedy this, I've re-written xenLinuxDomainDeviceID() to use regular
expressions to figure out the device number from the name. The major advantage
is that now xenLinuxDomainDeviceID() looks fairly identical to
tools/python/xen/util/blkif.py (in the Xen sources), so that adding additional
devices in the future should be much easier. It also reduces the size of the
code, and, in my opinion, the code complexity.
With this patch in place, I was able to get block statistics both on older style
devices (/dev/xvda) and on the new, expanded devices (/dev/xvdaa).
Signed-off-by: Chris Lalancette <clalance@redhat.com>
* src/virsh.c: Implement 'virsh edit', 'virsh net-edit' and
'virsh pool-edit' commands. These edit the XML for domains,
networks and storage pools respectively, and are the
equivalent of doing 'virsh dumpxml; vi foo.xml; virsh define'
* src/Makefile.am, src/.cvsignore: Auto-generate the net-edit
and pool-edit commands.
* docs/virsh.pod: Updated the documentation.
* src/domain_conf.c, src/network_conf.c, src/storage_conf.c:
Improve error messages from commands such as 'virsh define'
when the XML is not well-formed by passing libxml2 errors
back out through virterror.
docs/libvirt-refs.xml docs/html/libvirt-libvirt.html src/libvirt.c:
fixed somedocs and API entry point descriptions as suggested by
Charles Duffy and regenerated the API descriptions.
Daniel
Per subject; if autoport is in use for a host, the current
virDomainGraphicsDefFormat code always emits "port=-1", even if a port
is assigned to the host; this leaves no way for a client to find the VNC
port assigned to the host in question.
This patches fixes it by putting the vncport in place if there is one, and
only putting "-1" if we fail that test.
handling code. In particular, if you had a section of XML like:
<disk type='file' device='cdrom'>
<target dev='hdc' bus='ide'/>
<readonly/>
</disk>
This used to work with older libvirt, but now fails. This is because we are
actually passing the literal string (null) to the qemu command-line, which qemu
barfs on. This patch fixes it up by making it blank, which allows qemu to
continue on it's merry way.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
* src/domain_conf.[ch] src/openvz_conf.[ch] src/openvz_driver.c:
patch from Evgeniy Sokolov doing the OpenVZ xml refactoring,
still needs to be ported to the new XML parsing code but
implements the new format.
Daniel
* src/virsh.c (cmdUndefine): Tell user to shutdown and then use name or UUID.
* tests/undefine: New test. Exercise virsh's undefine command.
* tests/Makefile.am (test_scripts): Add undefine.
* src/openvz_conf.c src/openvz_conf.h src/openvz_driver.c
Makefile.maint: patch from Evgeniy Sokolov cleaning up the
error function used and format check based on Jim's fedback.
Daniel
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.
release
* src/xm_internal.c: fix xm driver serialization escapes
* tests/xmconfigtest.c tests/xmconfigdata/test-escape-paths.cfg
tests/xmconfigdata/test-escape-paths.xml: add test for previous
problem
Daniel
* src/util.c (fread_file_lim): Use VIR_REALLOC_N, not VIR_ALLOC_N.
Bug introduced in 895d0fdf5b.
* tests/Makefile.am (test_scripts): Add read-bufsiz.
* tests/read-bufsiz: New test for the above.
fine, except that is subtly alters the semantics of malloc(), calloc(), and
realloc(). In particular, if you say:
foo = malloc(0);
glibc will happily return a non-NULL pointer to you. However, with the new
memory management stuff, if you say:
foo = VIR_ALLOC(0);
you will actually get a NULL pointer back. Personally, I think this is a
dangerous deviation from malloc() semantics that everyone is used to, and is
indeed causing problems with the remote driver. The short of it is that the
remote driver allocates memory on behalf of the remote side using VIR_ALLOC_N,
and this call is returning NULL so that the NULL checks elsewhere in the code
fire and return failure.
The attached patch fixes this situation by removing the 0 checks from the memory
allocation paths, and just lets them fall through to the normal malloc(),
calloc(), or realloc() routines, restoring old semantics.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
introduced into the qemudNetworkIfaceConnect() function. In particular, there
is a call:
if (VIR_ALLOC_N(vm->tapfds, vm->ntapfds+2) < 0)
goto no_memory;
However, the tapfds structure is used to track *all* of the tap fds, and is
called once for each network that is being attached to the domain. VIR_ALLOC_N
maps to calloc(). So the first network would work just fine, but if you had
more than one network, subsequent calls to this function would blow away the
stored fd's that were already there and fill them all in with zeros. This
causes multiple problems, from the qemu domains not starting properly to
improper cleanup on shutdown. The attached patch just changes the VIR_ALLOC_N()
to a VIR_REALLOC_N(), and everything is happy again.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
to only rely on sysfs for finding LUNs, given a session number. Along the way,
it also fixes the bug where we wouldn't find LUNs for older kernels (with the
block:sda format), and also fixes a race condition where we could try
to find the LUN before udev has finished connecting it.
This patch fixes a few different bugs:
1) We weren't finding LUNs on pre 2.6.24 kernels
2) libvirtd sysfs scanning was racing with udev, so we didn't always see LUNs
3) We weren't showing the 0'th LUN, although that can be a valid LUN
Signed-off-by: Chris Lalancette <clalance@redhat.com>
first logging in; we don't need to do it for logout. Move the sendtarget
command into the Login() function.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
--mode session" command. However, just running "iscsiadm --mode session" seems
to work on all version of iscsiadm commands back to FC-6, so just use that.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
*not* virStorageReportError() if the fork()/exec() process it spawned returned a
!= 0 exit code. Rather, it returns the exitcode in this case, and it is up to
the higher level to determine whether this is a fatal error or not. The use
case for this change is in the iSCSI stuff; older versions of iscsiadm tools
would return a failure when getting the session number, despite the command
succeeding.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
* include/libvirt/libvirt.h.in, src/libvirt.c, src/driver.h,
src/libvirt_sym.version: New virDomainMemoryPeek API.
* qemud/remote.c, qemud/remote_protocol.x, src/remote_internal.c:
Support for remote.
* src/qemu_driver.c: QEMU driver implementation of API.
* src/test.c: Test driver (null) implementation of API.
* docs/hvsupport.html.in: Document API.
* libvirt.spec.in: New path /var/cache/libvirt for temporary
storage of memory images.
* qemud/libvirtd.init.in: Remove any old temp files in
/var/cache/libvirt on restarts.
* src/Makefile.am: make install creates /var/cache/libvirt.
* configure.in: Detect mkdir -p.
* 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
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
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
* include/libvirt/libvirt.h.in: Add VIR_DEPRECATED macro.
* src/internal.h: Internal code is allowed to use deprecated
features, so override VIR_DEPRECATED here.
* include/libvirt/virterror.h: Deprecate the conn, dom and net
fields in the _virError structure.
Up to now, we've been avoiding ctype functions like isspace, isdigit,
etc. because they are locale-dependent. Now that we have the c-ctype
functions, we can start using *them*, to make the code more readable
with changes like these:
- /* This may not work on EBCDIC. */
- if ((*p >= 'a' && *p <= 'z') ||
- (*p >= 'A' && *p <= 'Z') ||
- (*p >= '0' && *p <= '9'))
+ if (c_isalnum(*p))
- while ((*cur >= '0') && (*cur <= '9')) {
+ while (c_isdigit(*cur)) {
Also, some macros in conf.c used names that conflicted with
standard meaning of "BLANK" and "SPACE", so I've adjusted them
to be in line with the definition of e.g., isblank.
In addition, I've wrapped those statement macros with do {...} while (0),
so that we can't forget the ";" after a use. There was one like that
already (fixed below). The missing semicolon would mess up automatic
indenting.
* src/buf.c (virBufferURIEncodeString):
* src/conf.c (IS_EOL, SKIP_BLANKS_AND_EOL, SKIP_BLANKS)
(virConfParseLong, virConfParseValue, virConfParseName)
(virConfParseSeparator, virConfParseStatement, IS_BLANK, IS_CHAR)
(IS_DIGIT, IS_SPACE, SKIP_SPACES):
* src/nodeinfo.c:
* src/qemu_conf.c (qemudParseInterfaceXML):
* src/qemu_driver.c (qemudDomainBlockStats):
* src/sexpr.c:
* src/stats_linux.c:
* src/util.c (virParseNumber, virDiskNameToIndex):
* src/uuid.c (hextobin, virUUIDParse):
* src/virsh.c:
* src/xml.c (parseCpuNumber, virParseCpuSet):
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
# Convert uses of isspace to c_isspace, isdigit to c_isdigit, etc.
re=$(man isspace|grep is.....,.is|sed 's/ -.*//' \
|tr -s ', \n' \||sed 's/^|//;s/|$//')
git grep -l -E "$re"|grep -Ev 'Chan|gnulib' \
|xargs perl -pi -e 's/\b('"$re"')\b/c_$1/g'
# Remove all uses of to_uchar
git grep -l to_uchar|xargs perl -pi -e 's/to_uchar\((.*?)\)/$1/g'
* src/util.h (to_uchar): Remove definition.
(TOLOWER): Remove definition.
(__virMacAddrCompare): Use c_tolower, not TOLOWER.
Globally:
Where needed, change <ctype.h> to <c-ctype.h>.
Remove unnecessary inclusion of <ctype.h>.
Ensure the global changes are never needed again:
* Makefile.maint (sc_avoid_ctype_macros): Prohibit use of ctype
macros. Recommend c-ctype.h instead.
(sc_prohibit_c_ctype_without_use): New rule.
(sc_prohibit_ctype_h): New rule. Disallow use of <ctype.h>.
* src/storage_backend_fs.c (fileTypeInfo): Add "static" and two
"const" attributes.
(FileTypeInfo): Name the previously anonymous struct,
so the declaration of fileTypeInfo looks more conventional.
* src/xend_internal.c (sound_models): Mark as static, and
as an array of "const" entries.
These were relatively new additions to the list from here:
nm src/*.o|grep ' D '
* configure.in: Fix pkg-config detection of libxml2,
add -lgcrypt to gnutls lib.
* src/Makefile.am: If compiling --without-libvirtd then
don't compile any part of the storage driver.
* configure.in, src/hash.c, src/internal.h: Detect availability
of pthread library and compile out mutex code if not available.
* src/storage_driver.c, src/util.c: Ignore some missing
headers on MinGW.
Done using this command (also includes .c.in and .h.in files):
for i in $(g ls-files|grep -E '\.[ch](\.in)?$'|grep -v gnulib); do
expand -i $i > j && mv j $i;done
* src/util.c (fread_file_lim): New function.
(__virFileReadAll): Use fread_file_lim, rather than requiring
that stat.st_size provide a usable file size.
* tests/read-non-seekable: New test, for the above.
* tests/Makefile.am (test_scripts): Add read-non-seekable.
* tests/test-lib.sh (mkfifo_or_skip_): New helper function.
* docs//* src/conf.c src/hash.c src/libvirt.c src/proxy_internal.c
src/remote_internal.c src/virsh.c src/xen_internal.c
src/xend_internal.c src/xml.c: applied patch from Atsushi SAKAI
fixing a lot of typos
Daniel
* 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
* 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
* src/remote_internal.c (errorf): New function.
(remoteListDomains, remoteDomainPinVcpu, remoteDomainGetVcpus):
(remoteListDefinedDomains, remoteListNetworks):
(remoteListDefinedNetworks): Convert strings to be translatable,
and also to include offending and maximum values. Use errorf.
* 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
* 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
src/libvirt.c src/qemu.conf src/remote_internal.c src/xend_internal.c
tests/confdata/libvirtd.conf tests/confdata/libvirtd.out: patch from
Atsushi SAKAI fixing a ot more typo
Daniel
* src/Makefile.am (cov): Rewrite rule to merge gcov results corresponding
to two .o files: the libvirt_la- one, and the libvirt_test_la- one.
(tst): Remove unused rule.
* configure.in (LV_LIBTOOL_OBJDIR): Define and AC_SUBST.
* src/Makefile.am: Create a convenience library, libvirt_test.la,
and don't restrict access to *its* symbols.
* tests/Makefile.am (LDADDS): Add ../src/libvirt_test.la, so that
"configure --disable-shared" no longer provokes link errors.
(LIBVIRT): Remove definition.
(LDADDS): Remove use.
($(LIBVIRT)): Remove rule.
(LDADDS): Use the new convenience library instead.
(CLEANFILES): Define.
* docs/examples/index.py (dump_Makefile): Append $(COVERAGE_LDFLAGS),
to the LDADDS definition, to avoid link error with the combination of
--enable-test-coverage and --disable-shared.
* docs/examples/Makefile.am: Regenerate.
* docs/examples/index.html: Likewise.
* qemud/Makefile.am (libvirtd_LDFLAGS): Append $(COVERAGE_LDFLAGS).
* src/libvirt_sym.version: Remove some SP-before-TAB.
* src/util.c, src/util.h, src/libvirt_sym.version: Added
virMacAddrCompare utility function for comparing MAC
addresses.
* src/virsh.c, src/xm_internal.c: Use virMacAddrCompare
to compare addresses. (Shigeki Sakamoto and Richard Jones).
src/remote_internal.c src/test.c src/util.c src/util.h
src/xen_unified.c: added probe interface at the driver level,
use that to improve default hypervisor selection in the absence
of a given URI when connecting
Daniel
Also add "make syntax-check" rules to ensure no new uses sneak in.
There are many uses of write like this:
if (write (fd, xml, towrite) != towrite)
return -1;
The problem is that the syscall can succeed, yet write less than
the requested number of bytes, so the caller should retry
rather than simply failing.
This patch changes most of them to use util.c's safewrite wrapper,
which encapsulates the process. Also, there were a few cases in
which the retry loop was open-coded, and I replaced those, too.
* Makefile.maint (sc_avoid_write): New rule, to avoid recurrence.
* .x-sc_avoid_write: New file. Record two legitimate exemptions.
* qemud/qemud.c (sig_handler, qemudClientWriteBuf): Use safewrite, not write.
* src/conf.c (__virConfWriteFile): Likewise.
* src/qemu_conf.c (qemudSaveConfig, qemudSaveNetworkConfig): Likewise.
* src/qemu_driver.c (qemudWaitForMonitor, qemudStartVMDaemon)
(qemudVMData, PROC_IP_FORWARD): Likewise.
* proxy/libvirt_proxy.c: Include "util.h".
(proxyWriteClientSocket): Use safewrite.
* src/test.c (testDomainSave, testDomainCoreDump): Likewise.
* src/proxy_internal.c (virProxyWriteClientSocket): Likewise.
* src/virsh.c: Include "util-lib.h".
(vshOutputLogFile): Use safewrite.
* src/console.c: Include "util-lib.h".
(vshRunConsole): Use safewrite.
We currently use safewrite from inside libvirt and don't want to publish
any such function name. However, we do want to use it in applications
like virsh, libvirtd and libvirt_proxy that link with libvirt. To that
end, this change moves that function definition (along with the nearly
identical saferead) into a new file, util-lib.c. To avoid maintaining
separate copies of even such small functions, we simply include that new
file from util.c. Then, the separate applications that need to use
safewrite simply compile and link with util-lib.c.
Of course, this does mean that each of those applications will
containing two copies of these functions. However, the functions
are so small that it's not worth worrying about that.
* src/util.c (saferead, safewrite): Move function definitions to
util-lib.c and include that .c file.
* src/util-lib.c (saferead, safewrite): New file. Functions from src/util.c
with slight change (s/int r =/ssize_t r =/) to reflect read/write return type.
* src/util-lib.h: Declare the two moved functions.
* src/util.h: Remove declarations. Include src/util-lib.h.
* proxy/Makefile.am (libvirt_proxy_SOURCES): Add src/util-lib.c.
* qemud/Makefile.am (libvirtd_SOURCES): Likewise.
* src/Makefile.am (virsh_SOURCES): Add util-lib.c. Remove some SP-before-TAB.
* src/internal.h: move xstrol() variants from here ...
* src/util.[ch]: ... to here and rename to virStrToLong()
* src/libvirt_sym.version: export __virStrToLong_i() for
virsh and qemud.
* src/nodeinfo.c, src/stats_linux.c, src/virsh.c,
src/xend_internal.c, qemud/qemud.c: replace xstrtol()
calls with virStrToLong()
* src/nodeinfo.h: don't include internal.h, which was only
needed for xstrtol(), but instead include libvirt.h which
is suffificient for the declarations in the header.
Use <config.h>, not "config.h", per autoconf documentation.
* Makefile.cfg (local-checks-to-skip) [sc_require_config_h]: Enable.
* .x-sc_require_config_h: New file, to list exempted files.
* Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h.
* configure.in: Use PortableXDR if available.
* qemud/internal.h: Use "socketcompat.h".
* qemud/qemud.c: Use <signal.h>.
* src/sexpr.c: Use <stdlib.h> instead of <malloc.h>.
* src/socketcompat.h: Include <sys/un.h> for Mac OS X.
A NUL byte at beginning of input, or just after a newline
would provoke an invalid buf[-1] access (possible segfault).
* src/libvirt.c (virConnectAuthCallbackDefault):
* src/qemu_conf.c: Add "static" and "const" attributes to some globals.
* src/qemu_conf.h: Update a declaration.
* src/qemu_driver.c (qemud_driver): Declare static.
Author: Jim Meyering <meyering@redhat.com>
a proposed system for letting iptables know how to
reload our rules. The proposed system wasn't accepted
so, although there might be some other theoretical
use for this, let's just remove it.
iptables configuration using the lokkit --custom-rules command.
Basically, we write out our rules to /var/lib/libvirt/iptables
and run lokkit --custom-rules so that if e.g. iptables is
restarted or the user edits their firewall configuration, then
libvirt's rules get reloaded.
* configure.in: xdr functions may require -lxdr.
* configure.in, src/Makefile.am: Extra linking flags for
building libvirt DLL.
* src/socketcompat.h: Hide Windows Winsock incompatibilities
in a separate header file.
* src/remote_internal.c: Switch to using socketcompat.h /
socket_errno().
* src/test.c: Switch to using socketcompat.h.
* gnulib/lib/arpa/.cvsignore: Ignore another generated file.
* src/qparams.c: Include <config.h>.
* src/qparams.c, src/qparams.h, src/Makefile.am: Added a
separate 'qparams' module for handling query parameters.
* src/remote_internal.c: Factor out query parameter code so
it uses the 'qparams' module.
* src/xs_internal.[ch]: patch from Saori Fukuta to fix the
detach-disk command when using Xen tap devices.
* docs/libvir.html: typo fix from Jim Meyering
Daniel
Given code like: T *var = calloc (n, sizeof (T));
Convert to this: T *var = calloc (n, sizeof (*var));
This first-cut change adjusts all malloc, calloc, and
realloc statements.
The only binary differences are in remote_internal.c
(due to the bug fix) and in xmlrpc.c (due to factorization).
* python/libvir.c: As above.
* qemud/event.c: Likewise.
* qemud/mdns.c: Likewise.
* qemud/qemud.c: Likewise.
* qemud/remote.c: Likewise.
* src/bridge.c: Likewise.
* src/buf.c: Likewise.
* src/conf.c: Likewise.
* src/hash.c: Likewise.
* src/iptables.c: Likewise.
* src/openvz_conf.c: Likewise.
* src/qemu_conf.c: Likewise.
* src/qemu_driver.c: Likewise.
* src/test.c: Likewise.
* src/xen_internal.c: Likewise.
* src/xen_unified.c: Likewise.
* src/xm_internal.c: Likewise.
* src/xml.c: Likewise.
* tests/qemuxml2argvtest.c: Likewise.
* src/xmlrpc.c (xmlRpcValuePtr): Likewise, and minor factorization.
* src/remote_internal.c (remoteAuthMakeCredentials): Use the right
type when allocating space for an array of cred _pointers_.
* src/console.c, src/console.h, src/virsh.c: Disable
text console on Windows.
* src/libvirt.c: Use replacement getpass from Gnulib.
* src/libvirt.c: Initialize Winsock before use.
* src/remote_internal.c: Header file fixes for Windows.
Don't fail if AI_ADDRCONFIG isn't defined. Disable
unsupported stuff under Windows.
* src/uuid.c: ENODATA unavailable on Windows, use EIO instead.
* src/virsh.c: No uid_t / getuid on Windows.
* src/virsh.c: No O_SYNC on Windows.
* src/.cvsignore: Ignore *.loT files (generated under Windows).
* proxy/libvirt_proxy.c: Bail out earlier --without-xen.
* src/proxy_internal.c: Don't build proxy client side if
configured --without-xen.
* src/iptables.c, src/iptables.h: Disable this code if
configured --without-qemu.
* src/nodeinfo.c: If no 'uname' function, set model name to
empty string (for Windows).
* src/xen_unified.h, src/util.c, src/test.c: Include <winsock2.h>
on Windows.
* src/util.c: Disable virExec* and virFileLinkPointsTo on
MinGW.
New files go into these directories:
gnulib/lib
gnulib/m4
gnulib/tests
* bootstrap: A wrapper around gnulib-tool.
* configure.in: Invoke gl_EARLY and gl_INIT, being careful to put gl_EARLY
before any macro that uses AC_COMPILE_IFELSE.
(AC_OUTPUT): Add lib/Makefile and gl-tests/Makefile. Remove m4/Makefile.
* Makefile.am (SUBDIRS): Add gnulib/lib and remove m4. Add gnulib/tests
early enough that those tests run before any libvirt unit tests.
* m4/Makefile.am: Remove file. Not needed.
* src/Makefile.am (INCLUDES): Add -I$(top_srcdir)/gnulib/lib -I../gnulib/lib.
(LDADDS, libvirt_la_LIBADD): Add ../gnulib/lib/libgnu.la.
* src/nodeinfo.c: Include "physmem.h".
* qemud/qemud.c, src/remote_internal.c: Include "getaddrinfo.h".
(MEMINFO_PATH, linuxNodeInfoMemPopulate): Remove definitions.
(virNodeInfoPopulate): Use physmem_total, not linuxNodeInfoMemPopulate.
* tests/Makefile.am (INCLUDES): Add -I$(top_srcdir)/gnulib/lib -I../gnulib/lib.
(LDADDS): Add ../gnulib/lib/libgnu.la.
* qemud/Makefile.am (libvirtd_LDADD): Add ../gnulib/lib/libgnu.la.
* tests/nodeinfotest.c (linuxTestCompareFiles): No longer read total
memory from a file.
Update expected output not to include "Memory: NNNN"
* tests/nodeinfodata/linux-nodeinfo-1.txt:
* tests/nodeinfodata/linux-nodeinfo-2.txt:
* tests/nodeinfodata/linux-nodeinfo-3.txt:
* tests/nodeinfodata/linux-nodeinfo-4.txt:
* tests/nodeinfodata/linux-nodeinfo-5.txt:
* tests/nodeinfodata/linux-nodeinfo-6.txt:
* src/test.c [WITH_TEST]: Remove definition of _GNU_SOURCE that
would conflict with the one now in "config.h".
* autogen.sh: Add -I gnulib/m4.
* src/conf.c, src/sexpr.c: Don't define _GNU_SOURCE.
Instead, include "config.h".
* qemud/qemud.c: Remove definition of _GNU_SOURCE.
* src/openvz_driver.c: Likewise.
* src/qemu_driver.c: Likewise.
* src/remote_internal.c: Likewise.
* configure.in: Use AC_CONFIG_AUX_DIR(build-aux), so that a bunch
of gettextize-generated files go into build-aux/, rather than in
the top-level directory.
* .cvsignore: Adjust.
* build-aux/.cvsignore: New file.
Author: Jim Meyering <meyering@redhat.com>
* python/libvir.c, python/libvirt_wrap.h, qemud/qemud.c,
qemud/remote.c, src/internal.h, src/openvz_conf.c,
src/openvz_driver.c, src/proxy_internal.h, src/qemu_conf.c,
src/qemu_driver.c, src/remote_internal.h, src/test.h, src/util.c,
src/xen_unified.c, src/xen_unified.h, tests/nodeinfotest.c,
tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c, tests/reconnect.c,
tests/sexpr2xmltest.c, tests/virshtest.c, tests/xencapstest.c,
tests/xmconfigtest.c, tests/xml2sexprtest.c:
Change #include <> to #include "" for local includes.
Removed many includes from src/internal.h and put them in
the C files which actually use them.
Removed <ansidecl.h> - unused.
Added a comment around __func__.
Removed a clashing redefinition of VERSION symbol.
All limits (PATH_MAX etc) now done in src/internal.h, so we
don't need to include those headers in other files.
* configure.in: curses is not actually required to build libvirt
* configure.in, src/virsh.c: Make readline optional. If not
available then virsh is built without support for command
line editing.
src/xend_internal.c src/xm_internal.c src/xs_internal.c:
cleanup the xen subdriver table, remove the type entry and
always return "Xen" from the unified entry point.
Daniel
* qemud/qemud.c (tls_port, tcp_port, mdns_name, tls_allowed_ip_list):
(tls_allowed_dn_list): Remove "const", now that we free these.
(unix_sock_rw_mask): Rename from unix_sock_rw_perms, so that
the latter name can be used as a local string variable, so that the
variable name matches the config attribute name.
(unix_sock_ro_mask): Rename from unix_sock_ro_perms, likewise.
(remoteCheckDN, remoteCheckAccess): Adapt to const removal.
(qemudDispatchServer): Check for heap allocation failure.
(remoteConfigGetStringList): New function, based on code from Dan Berrangé.
(CHECK_TYPE): Remove macro.
(checkType): New function.
(GET_CONF_INT, GET_CONF_STR): New macros.
(remoteReadConfigFile): Use new macros to avoid duplication and to
check for allocation failure.
* src/conf.h (virConfTypeName): New static inline function.
* configure.in: Added CYGWIN_EXTRA_LDFLAGS, CYGWIN_EXTRA_LIBADD,
CYGWIN_EXTRA_PYTHON_LIBADD, CYGWIN automake conditional.
* src/Makefile.am: Extra flags required to build DLL of libvirt
for Cygwin.
* python/Makefile.am: Extra flags and rule required to build
Python module for Cygwin.
prefix as the installed libvirt, use the same localstatedir /var
(instead of /usr/var) and sysconfdir /etc (instead of /usr/etc) to
be able to connect to the system daemon, and use the system local
options
* src/xs_internal.c: avoid error message when non-root cannot open
xenstore
* src/xend_internal.c: avoid error message when non-root cannot
directly access xend, in those 2 cases the proxy (or remote code)
should implement the access so there is no need to raise the error
there.
Daniel
* src/bridge.c, src/bridge.h, src/qemu_conf.c, src/qemu_conf.h,
src/qemu_driver.c, src/qemu_driver.h, src/test.c: Disable more
of qemu if configured --without-qemu.
* configure.in, src/internal.h, src/xml.c: <sys/syslimits.h>
is needed on Cygwin to get PATH_MAX. HOST_NAME_MAX and
IF_NAMESIZE defined if not in header files.
* src/stats_linux.c: Fix parsing of short interface names
occurring in the /proc/net/dev file.
* src/qemu_driver.c: Collect interface stats for QEMU & KVM
domains.
* docs/hvsupport.html, docs/libvir.html: Document HV support
for virNodeGetFreeMemory and virNodeGetCellsFreeMemory.
* src/libvirt.c: Add DEBUG to virNodeGetFreeMemory and
virNodeGetCellsFreeMemory.
* src/xen_internal.c: virXenError* functions now take an
additional virConnectPtr argument, and set it where possible.
* src/stats_linux.c, src/stats_linux.h, src_xen_internal.c:
Abstract out the Linux-specific statistics. Fixed parsing
of 64 bit numbers.
* src/Makefile.am: Updated Makefile for new files.
* qemud/qemud.c: Replace uses of strtol with uses of xstrtol_i.
Avoid overflow for very large --timeout=N values.
* src/nodeinfo.c: In linuxNodeInfoMemPopulate and
linuxNodeInfoCPUPopulate, use xstrtol_i rather than strtol.
Unlike in qemud.c, here we allow trailing "isspace", and in
the case of "cpuinfo cpu MHz", also allow a "." terminator,
since we ignore the decimal and any following digits.
* src/internal.h: Define xstrtol_ui, too.
Author: Jim Meyering <meyering@redhat.com>
Patch from Jim Meyering
* src/internal.h: Include <errno.h>.
Define new static inline function, xstrtol_i.
* src/virsh.c: Detect integer overflow in domain ID number
in vshCommandOptDomainBy. Detect overflow and invalid port
number suffix in cmdVNCDisplay.
* src/xend_internal.c: Parse CPU number more carefully in
xenDaemonDomainGetVcpus.
* tests/int-overflow: New script. Test for the above-fixed bug.
* tests/Makefile.am: Add int-overflow to TESTS. Define
TESTS_ENVIRONMENT, to propagate $abs_top_* variables into the
int-overflow script. Adapt the "valgrind" rule not to clobber
new TESTS_ENVIRONMENT.
Daniel
Avoid risk of format string abuse (also avoids gcc warnings).
* src/util.c (ReportError): Use a literal "%s" format string.
* src/remote_internal.c (server_error): Likewise.
* src/qemu_conf.c (qemudReportError): Likewise.
* acinclude.m4: Add -Wformat -Wformat-security to default
list of warning flags, to warn about errors such as the
above.
src/xen_unified.[ch] src/xend_internal.[ch] src/xml.[ch]: last
patch for the library NUMA support, allow to serialize CPU pinning
to domain configs (but won't work though proxy access), includes
many patches from Saori Fukuta.
Daniel
* tests/conftest.c: Use fwrite, not printf, since the
result buffer is not NUL-terminatedi, from Jim Meyering.
* tests/qemuxml2argvtest.c: Initialize vm.migrateFrom[0],
to avoid "read-uninitialized" error from within
qemudBuildCommandLinei, from Jim Meyering.
Daniel
* src/test.c, include/libvirt/libvirt.h.in: Remove virDomainRestart
from the public API (it was not used), and move it into the test
driver where it is used for purely internal purposes.
src/driver.h src/libvirt.c src/openvz_driver.c src/qemu_driver.c
src/test.c src/xen_unified.c src/xend_internal.c: add new API
virNodeGetFreeMemory(), extends the driver. Lacks remote and
QEmu support though.
* src/libvirt.c: allows to fix virNodeGetCellsFreeMemory() adding
parameter check for startCell.
* proxy/libvirt_proxy.c src/xend_internal.[ch]
include/libvirt/libvirt.h include/libvirt/libvirt.h.in: applied
vncpasswd dump patch from Mark Johnson but with the
virDomainXMLFlags extension as suggested by Daniel Berrange
this changed a couple of internal APIs too
* tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: fix one of the
tests affected by bootloader dump change.
Daniel
src/qemu_driver.c src/remote_internal.c src/test.c
src/xen_internal.[ch] src/xen_unified.c src/xend_internal.[ch]
src/libvirt.c src/libvirt_sym.version: adding NUMA support patches
from Beth Kon adding new virNodeGetCellsFreeMemory entry point
and extending the virConnectGetCapabilities one. Fix a couple of
issues in the patch and add to exported symbols from shared lib.
* docs/virsh.pod docs/virsh.1 src/virsh.c: added new command
freecell to get the available memory on the node or in a NUMA cell.
* docs/*: updated and regenerated the documentation
Daniel
* src/bridge.c, src/qemu_driver.c, configure.in: Try to detect
the paths of dnsmasq and brctl at compile time. If found
then compile them in, otherwise search $PATH at runtime.
* libvirt.spec.in: BR dnsmasq and bridge-utils so we have their
paths at compile time.
* src/libvirt.c (virDomainMigrate): Added virDomainMigrate
API call.
* src/xend_internal.c, src/xen_unified.c: Support for migration
of Xen domains.
* src/xen_internal.c: Xen capabilities indicates level of
support for migration.
* qemud/remote.c, qemud/remote_protocol.x, src/remote_internal.c:
Support for migration between remote hypervisors.
* src/virsh.c: Added 'virsh migrate' command.
* docs/libvir.html, docs/hvsupport.html: Updated hvsupport
documentation.
* qemud/remote.c, qemud/remote_protocol.x, src/driver.h,
src/internal.h, src/libvirt.c, src/libvirt_sym.version,
src/qemu_driver.c, src/remote_internal.c, src/test.c:
Add a private interface so that libvirt.c coordination
functions can detect the availability of features in
underlying drivers, using the VIR_DRV_SUPPORTS_FEATURE
macro.
* acinclude.m4, configure.in: ./configure option
--disable-stack-protector.
* src/gnutls_1_0_compat.h: Compatibility with GnuTLS 1.0.
* src/bridge.c: If no bridge ioctls, give an error at runtime.
patch from David Lutterkort
* tests/xencapsdata/xen-i686-pae-hvm.xml
tests/xencapsdata/xen-ia64-be-hvm.xml
tests/xencapsdata/xen-ia64-hvm.xml
tests/xencapsdata/xen-x86_64-hvm.xml: this also affects a few tests
Daniel
src/openvz_driver.c src/qemu_driver.c src/util.c src/util.h:
cleanup patches from Shuveb Hussain, with new util module for
common code shared between drivers.
Daniel
applied patch from Shuveb Hussain to plug the developping
OpenVZ support. Disabled by default.
* src/openvz_conf.[ch] src/openvz_driver.[ch]: added new
OpenVZ driver files. Avoid a redefinition of readline().
Daniel
new function virBufferEscapeString() to format a string while
escaping its content for XML, and apply it to a couple of
obvious places, should fix bug #206653
* po/*: updated strings, and added new bosnian localization.
Daniel
* src/proxy_internal.c, src/proxy_internal.h,
src.xen_internal.c, src/xen_internal.h,
src/xen_unified.c, src/xen_unified.h,
src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h,
src/xs_internal.c, src/xs_internal.h: The interface
between xen_unified.c and its underlying driver now uses
a custom structure (struct xenUnifiedDriver) instead
of reusing virDriver.
* src/xen_unified.c: virDomainLookup* functions in Xen
now throw VIR_ERR_NO_DOMAIN if the domain does not exist.
* src/xs_internal.c: Fix indentation.
* src/hash.c, src/internal.h: Remove virGetDomainByID function
as it is not used or exported.
* src/proxy_internal.c, src/qemu_driver.c, src/remote_internal.c,
src/test.c, src/xend_internal.c, src/xs_internal.c: Fix
all callers to virGetDomain and virGetNetwork functions -
the callers do not need to set virterror since it is already
set inside the functions.
* include/libvirt/virterror.h, src/virterror.c, src/libvirt.c:
Add VIR_ERR_NO_DOMAIN and VIR_ERR_NO_NETWORK errors, which
indicate that there is no domain/network from vir*Lookup* functions.
* src/qemu_driver.c: Use VIR_ERR_NO_DOMAIN in lookup functions.
* src/test.c: Use VIR_ERR_NO_DOMAIN in lookup functions.
* src/xm_internal.c: configCache not getting refilled if the
connection was closed (affected the remote case mainly),
and error messages added to xenXMConfigCacheRefresh.
* src/conf.c, src/test.c, src/xen_internal.c: Readd checking
of errors from virBuffer functions.
* src/sexpr.c: Add comment about use of _GNU_SOURCE.
* src/virsh.c: Remove use of _GNU_SOURCE / isblank.
* src/xml.c, tests/Makefile.am: Minor cleanup.
* src/remote_internal.c, python/Makefile.am: Python bindings
fixed, and now building virConnect.getHostname and
virConnect.getURI. Fixed a problem which stopped
libvirt.py from being (re-)built. Rearranged
python/Makefile.am to make it cleaner and clearer.
* include/libvirt/libvirt.h.in, src/libvirt.c, src/libvirt_sym.version,
python/generator.py: Added virDomainGetConnect and
virNetworkGetConnect to allow us to get the "hidden"
connection associated with each domain or network.
* qemud/remote.c, src/remote_internal.c: Fix virDomainGetVcpus
in the remote case.
* src/libvirt.c: Allow virConnectListDomains,
virConnectListDefinedDomains, virConnectListNetworks and
virConnectListDefinedNetworks to work in the case where
they are called with maxids/maxnames == 0.
* src/remote_internal.c: Fix virDomainGetMaxVcpus in remote
case so that it copies sufficient data.
* src/xen_unified.c: Remove autostart functions.
* src/internal.h: Added STREQ and STRCASEEQ macros for clearer
equality testing of strings.
* src/xen_internal.c: Fix handling of the scheduler parameters
field string so that the field doesn't contain garbage
after the string.
* src/remote_internal.c: Fix virConnectGetMaxVcpus in the
remote case when type parameter is NULL.
* src/xend_internal.c: Proper error reporting in
xenDaemonDomainDumpXML function.
* src/libvirt.c, src/qemu_internal.c, src/test.c,
src/xen_unified.c, src/xend_internal.c,
src/libvirt.c, include/libvirt/virterror.h:
VIR_ERR_NO_SUPPORT means the function is not supported by
the hypervisor. VIR_ERR_NO_CONNECT means the connection
failed. VIR_ERR_CALL_FAILED is deprecated. Drivers which
decline a URI now no longer produce an error. Make
xen_unified.c ignore naked URI strings like "foo".
* src/virsh.c: 'virsh help command' now works even if we could
not get a connection to the hypervisor. Rearranged the list
of commands to be in alphabetical order.
* src/libvirt.c src/test.c src/xen_unified.c: Fix URI processing
so that local file URIs work again. Move remote driver to
last in the list, and fix all drivers so they decline remote
URIs (Daniel Berrange).
is usually garbage ending up polluting minor and major numbers.
* src/virsh.c: applied patch from Masayuki Sunou providing a pair
of alternate attach/detach commands
Daniel
for arguments to bootloader, patch from Hugh Brock
* tests/sexpr2xmltest.c tests/xml2sexprtest.c
tests/sexpr2xmldata/sexpr2xml-pv-bootloader.sexpr
tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml
tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr
tests/xml2sexprdata/xml2sexpr-pv-bootloader.xml: add specific
regression tests
Daniel
src/driver.h src/libvirt.c src/libvirt_sym.version
src/proxy_internal.c src/qemu_internal.c src/test.c
src/virsh.c src/xen_internal.c src/xen_internal.h src/xen_unified.c
src/xend_internal.c src/xm_internal.c src/xs_internal.c:
Applied patches from Atsushi SAKAI to add the scheduler API,
with patch from Rich Jones for error handing, and a number
of cleanups and more error checking from me
Daniel
+
+ * python/generator.py, python/libvir.c, python/libvir.py:
+ Wrap the virGetVersion call as Python libvirt.getVersion.
+
+ * src/libvirt.c: Change virGetVersion so that the driver name
+ is case insensitive.
+
+
+ * TODO: Added a note about requiring C++ compiler because of a
+ possible problem with libtool autoconf macros.
+ * docs/examples/Makefile.am, proxy/Makefile.am, qemud/Makefile.am,
+ src/Makefile.am, tests/Makefile.am: Pass $(WARN_CFLAGS) when
+ linking, so if -fstack-protector is there, gcc will link to
+ the stack protector library.
+ * tests/xencapstest.c: Allow this test to compile when Xen
+ libraries are not enabled.
+
* src/virsh.c: Add attach-device and detach-device commands to
virsh, and tidy up the way it reads whole files. Patch from
Masayuki Sunou, Mark McLoughlin, Richard Jones.
* src/hash.c, src/internal.h, src/libvirt_sym.version: Export
__virGetDomain and __virGetNetwork for use by the libvirtd.
The double underscores indicate that these interfaces are
not officially supported parts of the libvirt API or ABI.
* src/libvirt.c, src/qemu_internal.c: Allow network
drivers to DECLINE to take accept a call. Only fail
outright if the network driver reports an error.
* src/qemu_internal.c (qemuNetworkOpen): Fix path to
driver used in the non-root case.
* src/proxy_internal.c, src/qemu_internal.c, src/test.c,
src/xen_unified.c, src/xend_internal.c, src/xs_internal.c:
During virConnectOpen, be careful to call __virRaiseError
with conn = NULL so that the error message is not
discarded.
* src/xen_unified.c: In the non-root case keep track of the
Xen underlying drivers which opened correctly and only
try methods on those opened drivers.
* src/test.c, src/libvirt.c, src/virterror.c,
include/libvirt/virterror.h: Add a VIR_FROM_TEST error class
and ensure that test driver errors are from this class.
Tidy up the error messages generated by the test driver when
user doesn't add a path to the URL and avoid open ("/").
to handle CDRom devices with no device name
* tests/sexpr2xmltest.c tests/xml2sexprtest.c
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.sexpr
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml
tests/xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr
tests/xml2sexprdata/xml2sexpr-no-source-cdrom.xml: added regression
tests for this case based on Nobuhiro Itou test inputs.
Daniel
* src/xen_unified.c (xenUnifiedRegister): Comment the
xenUnifiedRegister function to avoid error message
when building docs/. Patch from Atsushi SAKAI.
erroneous value of the hypercall XEN_V2_OP_SETMAXMEM
* libvirt.spec.in: applies changes from Jeremy Katz for libvirt
spec and also another fix from Michael Schwendt fixing rhbz#233874
Daniel
src/sexpr.h src/test.c src/xm_internal.c src/xml.c src/xml.h:
applied patch from Richard Jones adding check to printf-like
functions and fixing the problems raised
Daniel
proxy/libvirt_proxy.c qemud/Makefile.am qemud/conf.c qemud/conf.h
qemud/dispatch.c qemud/internal.h qemud/protocol.h
src/driver.h src/internal.h src/libvirt.c src/libvirt_sym.version
src/proxy_internal.c src/proxy_internal.h src/qemu_internal.c
src/test.c src/virsh.c src/virterror.c src/xen_internal.c
src/xen_internal.h src/xend_internal.c src/xm_internal.c
src/xml.h src/xs_internal.c: applied patch from Richard Jones
adding virConnectGetCapabilities(), plus various small little
fixes
* docs/*: fixed the api extractor script and regenerated
Daniel
to better handle the case where there is no limit in the domain
upper memory size
* docs/architecture.html docs/format.html docs/intro.html
docs/libvir.html: started to update the documentation to reflect
the current state
Daniel
src/Makefile.am src/libvirt.c src/qemu_internal.c src/test.c
src/xen_internal.c src/xen_internal.h src/xend_internal.c
src/xm_internal.c src/xml.c src/xs_internal.c
tests/Makefile.am tests/sexpr2xmltest.c tests/xmconfigtest.c:
allow selective compilation of Xen,QEmu/KVM and test support
in or out at configure time. Also allows to compile on a system
without Xen development installed. All drivers are selected by
default.
Daniel
add a check for minimal size of Xen Dom0, track places where we
had arbitrary minimal memory requirement and use a predefined
macro to clean this up.
Daniel
src/driver.h src/libvirt.c src/libvirt_sym.version
src/proxy_internal.c src/qemu_internal.c src/test.c src/virsh.c
src/xen_internal.c src/xen_internal.h src/xend_internal.c
src/xm_internal.c src/xs_internal.c: applied patch from
Masayuki Sunou to add and entry point to check the maximum
number of virtual CPU supported by a virtualization mechanism
* doc/*.html doc/libvirt-*.xml: regenerated the interfaces descriptions
and associated docs.
Daniel
* acinclude.m4: add LIBVIRT_COMPILE_WARNINGS, copied from
GNOME but with a few more flags we'd been using.
* configure.in: use that instead of setting CFLAGS
directly.
* proxy/Makefile.am, python/Makefile.am, qemud/Makefile.am,
src/Makefile.am, tests/Makefile.am: use $(WARN_CFLAGS)
* qemud/Makefile.am: install libvirt_qemud in /usr/sbin
instead of /usr/libexec
* src/Makefile.am, src/qemu_internal.c: pass the correct
path to libvirt
* qemud/protocol.h: add the (domain/network)(Get/Set)Autostart
requests and replies to the protocol.
* src/qemu_internal.c: hookup the qemu driver autostart
methods
* qemud/dispatch.c, qemud/driver.[ch], internal.h: add
the daemon side, but just set an in-memory autostart
flag for now.
* include/libvirt/libvirt.h.in, src/libvirt.c add
virDomainGetAutostart(), virDomainSetAutostart(),
virNetworkGetAutostart() and virNetworkSetAutostart().
* src/libvirt_sym.version: export the API
* src/driver.h: add methods to the driver vtables.
* src/proxy_internal.c, src/qemu_internal.c,
src/test.c, src/xen_internal.c, src/xend_internal.c,
src/xm_internal.c, src/xs_internal.c: set those
methods to NULL
* include/libvirt/libvirt.h.in, src/libvirt.c: add
virNetworkGetBridgeName() to allow finding out what
bridge to connect to in order to join a network.
* src/driver.h: add networkGetBridgeName() to vtable.
* qemud/protocol.h: add the request and reply to
the qemud protocol.
* qemud/dispatch.c, qemud/driver.[ch]: handle them
here.
* src/qemu_internal.c: implement GetBridgeName()
in the qemu driver.
* src/libvirt_sym.version: add new symbol.
* src/xend_internal.c, src/xm_internal.c: pass the
connection to virDomainParseXMLDesc()
* src/xml.[ch]: make virDomainParseXMLDesc accept
a virConnectPtr so that we can use it later to
lookup the bridge associated with a network
* tests/xml2sexprtest.c: just pass NULL here, it's
safe
Note: potential ABI break here, but people should
only really be using virError structs returned from
libvirt itself.
* include/libvirt/virterror.h: add virNetwork
to virError
* src/internal.h, src/virterror.c: add network param
to __virRaiseError()
* src/conf.c, src/hash.c, src/libvirt.c, src/proxy_internal.c,
src/qemu_internal.c, src/sexpr.c, src/test.c, src/xen_internal.c,
src/xend_internal.c, src/xm_internal.c, src/xml.c, src/xmlrpc.c,
src/xs_internal.c: update.
* include/libvirt/libvirt.h.in: add the networks APIs
* include/libvirt/virterror.h: add some error codes
* src/driver.h: add network driver vtable
* src/hash.c: add networks hash
* src/internal.h: add virNetwork
* src/libvirt.c: hook up the APIs to the network
driver
* src/libvirt_sym.version: add the new APIs
* src/virterror.c: handle the new error codes
Issues pointed out by Karel Zak <kzak@redhat.com>
* src/virsh.c: fix up some syntax strings, use BUFSIZ
and free names returned from virConnectListDefinedDomains()
* src/internal.h: virDomain.handle refers to the "id"
in the API, so re-name to virDomain.id to avoid
confusion.
* src/hash.c, src/libvirt.c, src/proxy_internal.c, src/test.c,
src/xen_internal.c, src/xend_internal.c, src/xm_internal.c,
src/xml.c, src/xs_internal.c: update for rename.
had changed between version 1 and version 2 too, the leading domain
field disapeared since it goes in the including op. Fixes redhat
bugs #217370 and #217743
Daniel
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in src/driver.h
src/libvirt.c src/proxy_internal.c src/test.c src/virsh.c
src/xen_internal.c src/xend_internal.c src/xm_internal.c
src/xs_internal.c: added support for dumping core of domains
assuming a xend with the latest patch to do so.
Daniel
src/driver.h src/libvirt.c src/libvirt_sym.version
src/proxy_internal.c src/test.c src/xen_internal.c
src/xend_internal.c src/xml.c src/xml.h src/xs_internal.c:
intagrated patch from Michel Ponceau to add hot-plug devices
support to the API, integrated in driver API and fixed
a few small things. Still a TODO in src/xml.c about
moving xenstore direct accesses to a new routine.
Daniel
to the XML description and handle its serialization back and
forth between XML and S-Expr
* tests/sexpr2xmltest.c tests/xml2sexprtest.c
tests/sexpr2xmldata/sexpr2xml-curmem.*
tests/xml2sexprdata/xml2sexpr-curmem.*: added specific regression
tests for this, this didn't disturb any of the other tests.
Daniel
* proxy/libvirt_proxy.c src/libvirt.c src/proxy_internal.[ch]
src/xs_internal.[ch]: the virtGetOsType entry point was calling
the xenstore directly instead of going though driver, refactored
and implemented a specific new RPC with the proxy when this is
called as non-root fixes rhbz#214264 .
Daniel
* src/xend_internal.c: fix the reconnection problem to xend pointed
by Philippe Berthault
* tests/Makefile.am tests/reconnect.c: add a specific test case
Daniel
hypercalls while still able to detect older versions, lot of
work, seems okay, there is just one function not yet converted
* src/xs_internal.c: dropping virConnectCheckStoreID()
Daniel
* configure.in include/libvirt/virterror.h src/Makefile.am
src/conf.c src/conf.h src/virterror.c src/xen_internal.c:
adding a subset of Xen config file parser, and serializer
* tests/Makefile.am tests/conftest.c tests/test_conf.sh
tests/confdata/Makefile.am tests/confdata/fc4.conf
tests/confdata/fc4.out: adding test program for config in and out
Daniel
include/libvirt/libvirt.h.in: preparing release of 0.1.4,
regenerated docs, fixed a few things
* src/proxy_internal.c src/test.c src/xend_internal.c:
a few trivial fixes
Daniel
src/xen_internal.c src/xend_internal.c src/xend_internal.h
src/xml.c src/xs_internal.c: cleanups, force the new vCPU
and affinity entry point to go though the driver framework,
and fix a few warning showing up in my pedantic environment.
Daniel
src/libvirt.c src/libvirt_sym.version src/xen_internal.c
src/xen_internal.h src/xend_internal.c src/xend_internal.h:
applied patch from Michel Ponceau and Philippe Berthault for
virtual CPU and affinity support plus a bit of cleanup.
Daniel
http accesses by default and to use the provided URI otherwise,
applied Jim Fehlig patch working around xend connection close bug
* autogen.sh: fixed package name
Daniel
src/xen_internal.c: fixing the proxy installation, integrate in
the spec file and fix a few bugs in the proxy, seems to behave
correctly now.
* docs/apibuild.py docs/*: fixing the doc and API generator
Daniel
src/xen_internal.h src/xend_internal.c src/xend_internal.h:
implemented id based lookup and other cleanups, virsh starts to
work, but still some TODOs
Daniel
src/Makefile.am: moved proxy/proxy.h and proxy/proxy_client.c as
proxy_internal.[ch] and integrated them as a new driver.
* proxy/Makefile.am proxy/libvirt_proxy.c src/xen_internal.c
src/xen_internal.h src/xend_internal.c: various related cleanups.
Daniel
proxy/proxy.h proxy/proxy_client.c src/internal.h src/xen_internal.c
src/xend_internal.c: started working on a proxy to access xend
for unpriviledged users to avoid opening xend HTTP service to
serve those read-only operations.
Daniel
include/libvirt/virterror.h python/generator.py python/libvir.c
python/libvirt_wrap.h src/driver.h src/internal.h src/test.h
src/virsh.c src/virterror.c src/xend_internal.c src/xend_internal.h
src/xml.c src/xml.h: moved the includes from include/ to
include/libvirt to reflect the installed include tree. This
avoid using "" in the includes themselves.
Daniel
src/xend_internal.c src/xs_internal.c: add driver numbers and
tweak a bit suspend/resume/destroy operation to avoid doing
them directly though the hypervisor if other succeeded first.
Daniel
* src/driver.h src/libvirt.c src/test.c src/xen_internal.c
src/xend_internal.c src/xs_internal.c: started to fix some of
the driver related problem raised by Daniel Berrange, added a
ver version field to drivers.
Daniel
to be of type 'unsigned char' since its a raw UUID we're passing in,
not a printable one.
* src/libvirt.c: Remove bogus "unsigned char" -> "char" type casts. Hook
up the "domainLookupByID", "domainLookupByUUID", "domainLookupByName"
and "domainGetInfo" driver backend functions.
Daniel
some processing but not used yet
* src/libvirt.c src/xen_internal.c src/xen_internal.h: added domain
listing and number queries entry points based on the hypervisor
which should speed up some processing as root.
Daniel
virDomainSetMemory to set up the target memory use for a domain
* src/driver.h src/libvirt.c src/xen_internal.c src/xend_internal.[ch]
src/xs_internal.[ch]: added a new entry point in the drivers for this,
also fixed the xen store entry, as changing
/local/domain/$$/memory/target affects the target memory not the max,
apparently max is not visible at the xenstore level (or I missed it)
Daniel
src/xs_internal.c: implementing domain pointers unification, thread
safety and reference counting for domain and connections, this was
the last critical change needed before making further progresses at
the API level. Still a couple fo things TODO for this, unification
at the Python level and adding UUID to hash. All domain/connect alloc
and free routines are now centralized in hash.c
* docs/APIchunk1.html docs/libvirt-api.xml docs/libvirt-refs.xml
docs/html/libvirt-libvirt.html: regenerated the docs, that doesn't
change the API.
Daniel
src/libvirt_sym.version src/*_internal.[ch]: added an entry
point for reboot and corresponding driver plug
* src/virsh.c: added a reboot option using it
* docs/*: regenerated
Daniel
new create command
* src/xend_internal.c src/xml.c: trying to cope with the new
xvda domains states generated on FC5, but Dom0 bootloader
really break the model, so that doesn't work.
Daniel
src/internal.h src/libvirt_sym.version src/xen_internal.c
src/xs_internal.c: added a new entry point to get node hardware
informations virGetNodeInfo, and associated driver hook.
* src/xend_internal.c: implemented the node and version information
hooks for the Xen Daemon
* python/libvir.c python/libvirt-python-api.xml python/generator.py:
also added Python bindings for the new call
Daniel
* src/libvirt_sym.version: add initialize entry point
* src/libvirt.c: make sure we always initialize the lib
* python/tests/*.py: start updating exemple for exception
handling as pointed by Jim Meyering
Daniel
* include/libvirt.h include/libvirt.h.in: added intialization function
* include/virterror.h src/virterror.c: one more error code
* src/internal.h: first part of Jim's format checking
* src/libvirt.c src/xen_internal.[ch] src/xend_internal.[ch]
src/xs_internal.[ch]: initialization and registration of drivers
Daniel
src/virterror.c: created a new module related to Xen Store accesses
* src/libvirt.c src/xen_internal.[ch] src/xend_internal.[ch]:
nearly completed the separation of the code from the different modules
Daniel
src/xen_internal.h docs/apibuild.py: starting the refactoring,
first the direct Xen hypervisor module. New header describing the
entry points of a driver.
Daniel
src/sexpr.h src/virsh.c src/virterror.c src/xen_internal.c
src/xen_internal.h src/xend_internal.c src/xend_internal.h
src/xml.c src/xml.h: applied cb/indent to homogenize the source
style, as a first pass.
Daniel
virDefaultErrorFunc()
* src/sexpr.c src/xen_internal.c src/virterror.c include/virterror.h:
adding more error reporting though the code, nearly complete.
* src/sexpr.c: added specific error function to avoid an error report.
Daniel
* include/virterror.h src/internal.h src/libvirt.c src/virterror.c
src/xend_internal.c: commiting a first pass at adding error handling
in the code, not finished, but it starts to work, need more coverage
and testing.
Daniel
src/virterror.c include/Makefile.am include/virterror.h: adding
the public APIs for errors, callbacks and synchronous. The boring
stuff is still left to do, plugging it. Also need to be exposed
at the python level.
* doc//*: rebuilt
Daniel
* python/generator.py python/libvir.c python/libvirt-python-api.xml:
also fixing the binding for getting a domain UUID
* python/tests/Makefile.am python/tests/uuid.py: added a test
for the new UUID API
Daniel
src/libvirt_sym.version: added virDomainLookupByUUID and
virDomainGetUUID to be able to use the persistant UUID names
* docs//*: rebuilt the docs following the API extension
Daniel
XML dump function around to make sure all entry points are centralized
in libvirt.c and also avoid doc generation troubles.
* docs/examples/Makefile.am docs/examples/index.py: fix the makefile
a bit.
* TODO: updated
* docs/format.html: added a description of the XML used for the
domains.
* docs//*: rebuilt
Daniel
* include/libvirt.h include/libvirt.h.in: cleanup
* src/libvirt.c: remove debugging output
* src/xend_internal.c src/xml.c src/xml.h: reimplement
virDomainGetXMLDesc() based on xend interface, now work as user too.
Daniel
difficult since it requires a system image
* src/libvirt.c src/xend_internal.c: fixed the shutdown API which
was broken due to a bad reason at the xend level.
Daniel
* include/libvirt.h* src/libvirt.c src/xend_internal.[ch]
src/xml.[ch]: added XML parsing for Xen domain descriptions
needed for creates, plugged in a converter to s-exp and
xend call. Modified the virDomainCreateLinux() to reflect
that XML based description. Seems to work.
* python/tests/create.py: added a test case which seems to work
not tested much yet
* docs/*: regenerated
Daniel
restore API (though it would be better if it was returning
a domain pointer in case of success)
* src/virsh.c: added save and restore to the commands, tested,
the option handling need work though
Daniel
doc fix
* src/virsh.c: fix a integer being formatted as %s in idof
* src/internal.h src/libvir.c src/xend_internal.[ch]: started to
integrated the xend back-end, especially for getting informations
about a domain.
Daniel
version for python bindings, heavilly based on libxml2/libxslt
way of doing things, maybe this need to be revisited. Added packaging
too.
* src/hash.h: fixed the Copyright notice.
Daniel
src/libvir_sym.version src/virsh.c src/xml.c: started working on
the XML dump, added a dumpxml virsh version and a bit of
infrastructure code. Found a way to detect dead ID from xenstore
data.
Daniel
include/Makefile.am: provide/fix library versionning information
include/libvir.h is now generated !
* include/libvir.h.in src/libvir.c: revamp APIs and implement
complete ones.
* src/virsh.c: finish the version command and a bit of cleanup.
Daniel
* src/libvir.c src/libvir_sym.version src/xen_internal.[ch]
include/libvir.h: implementing hypervisor Version and Type interfaces
* src/virsh.c: adding a version command, WIP
Daniel
docs/Makefile.am docs/bugs.html docs/index.html docs/intro.html
docs/libvir.html docs/redhat.gif docs/site.xsl: starting to add
the web site, based on libxml2 one.
* src/hash.c: add a missing include
Daniel
docs/libvir-refs.xml: fix XML API generation
* include/libvir.h src/libvir.c src/virsh.c: fix the info memory
API again, use KB, not bytes so that an unsigned long is sufficient.
Daniel
one.
* include/libxen.h src/libxen.c src/libxen_sym.version: extend API
start to access libxenctrl directly (need xen update to get includes)
* src/xensh.c: access to both xenstore and hypervisor
Daniel
config.h.in configure.in: fix make dist, add rpm packaging
* src/libxen_sym.version src/Makefile.am: set a policy of no
export by default of library symbols
Daniel