summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* build: Create new 'tmp' directory for tests.Richard W.M. Jones2012-09-145-3/+21
| | | | | | | | | | | | Having a separate directory means: (1) It's easy to clean up orphaned temporary files, the appliance, etc. (2) You can put an SELinux label on this directory so that qemu can write to it when you're using sVirt and SELinux is enforcing: chcon --reference=/tmp tmp
* launch: libvirt: Mark appliance disk as <shareable/> (thanks Dan Berrange).Richard W.M. Jones2012-09-141-0/+3
| | | | | | | | | | | This is a fix for multiprogramming: If two instances of libguestfs share the same appliance disk, then libvirt would unlabel the disk when one of the instances closes the handle, resulting in the other qemu being unable to continue accessing the appliance. Adding the flag makes libvirt understand that the disk is shared so it doesn't do this, and it apparently handles locking correctly too if we were using sanlock.
* test-tool: Print more environment variables.Richard W.M. Jones2012-09-141-7/+18
| | | | | This prints LIBVIRT_*, LIBVIRTD_*, LD_* and PATH, since these are all useful for debugging and could affect libguestfs in some way.
* fish: Replace '_' with '-' in deprecation cross-refs (thanks Olaf Hering).Richard W.M. Jones2012-09-132-3/+5
|
* lib: guestfs_disk_format: Set LC_ALL=C instead of LANG=C.Richard W.M. Jones2012-09-121-1/+1
| | | | | | LC_ALL takes precedence over LANG. See: http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html
* release-notes: Add 'draft' background image.Richard W.M. Jones2012-09-065-5/+91
|
* extra-tests: Don't use $QEMU as a variable.Richard W.M. Jones2012-09-052-6/+13
| | | | | | Since 'QEMU' is set (overwritten) by the autoconf-generated Makefile, this test would always test installed qemu, not upstream qemu, making it pretty useless. Use another name for this variable.
* generator: Remove generated and unused files from previous runs of the ↵Richard W.M. Jones2012-09-053-1/+44
| | | | | | | | | | | | generator. If you go back in time in git (eg. git reset, git bisect) then you can end up in a situation where a file that was generated by a later version is left around unused in the earlier version. This isn't a problem for most things, but gobject documentation generation picks up any file in a directory, even unreferenced ones, and breaks. So the correct thing to do is to remove these files.
* generator: gobject: Use a more normal way to output files.Richard W.M. Jones2012-09-052-100/+111
| | | | | The generator output is identical, verified by comparing the output files before and after the change.
* Version 1.19.40.1.19.40Richard W.M. Jones2012-09-043-5/+5
|
* sparsify: Fix use of closed handle (thanks Olaf Hering).Richard W.M. Jones2012-09-042-2/+2
| | | | | | | This fixes commit faaedeb3432253847107ca2c4530f681c6a1e385. Also contains an update to the test which tests the format auto-detect path.
* fix fuse_opt_add_opt_escaped return typeOlaf Hering2012-09-041-1/+1
| | | | | | | | | | I: Program returns random data in a function E: libguestfs no-return-in-nonvoid-function guestmount.c:75 The function fuse_opt_add_opt_escaped has only one caller and a return code is not checked. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* Version 1.19.39.1.19.39Richard W.M. Jones2012-09-0420-23615/+24505
|
* shutdown: Add 'check_for_errors' hint along the shutdown path.Richard W.M. Jones2012-09-046-10/+26
| | | | | | | | This hint tells the backend whether anyone cares about errors when the appliance is shut down. Currently this only has any effect on the libvirt backend, where it controls whether or not we use the VIR_DOMAIN_DESTROY_GRACEFUL flag.
* launch: libvirt: Add VIR_DOMAIN_DESTROY_GRACEFUL flag.Richard W.M. Jones2012-09-041-2/+1
| | | | | | We want libvirt to report failures when destroying the guest. See: https://bugzilla.redhat.com/show_bug.cgi?id=853369#c12
* rescue: Add an expect-driven test for the virt-rescue command.Richard W.M. Jones2012-09-044-0/+67
| | | | | | | | This command was not tested at all. As a result we didn't notice that it was broken for a long time (RHBZ#853159). This adds a test that drives the command through a pty. It uses the perl 'Expect' module, although this is not required.
* proto: Don't set g->fd[] to /dev/null in direct mode, fixing virt-rescue ↵Richard W.M. Jones2012-09-041-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (RHBZ#853159). https://bugzilla.redhat.com/show_bug.cgi?id=853159 git bisect pointed to the following commit: commit ec8e3b6cad170d08ac18b580792dfb137eb171dc Author: Richard W.M. Jones <rjones@redhat.com> Date: Fri Jul 20 14:24:10 2012 +0100 launch: Abstract attach method operations. g->attach_ops points to a structure which contains the operations supported by each attach method backend (ie. appliance, unix, etc.). Since that commit was essentially just code motion, it wasn't clear why virt-rescue should be affected by it. In fact the reason is as follows: (1) In direct mode, we don't need g->fd[] (which would normally be connected to the stdin/stdout of qemu). So we opened them on /dev/null so they had some value. (2) accept_from_daemon / read_log_message_or_eof reads from g->fd[1]. Since this is connected to /dev/null, it always reads EOF. (3) This would cause child_cleanup to be called. This is completely unintentional: we don't want to cleanup the child at this point, even in direct mode. (4) Prior to the commit above, child_cleanup first waited for the process to exit (ie. waitpid). This happened to work, since we are effectively waiting for the user to exit virt-rescue. (5) After the commit above, the order of operations was changed so that we first killed qemu before waiting for it. This broke virt-rescue. The fix is to change direct mode so that it leaves g->fd[]'s as -1. The rest of the protocol code can deal with this situation -- it ignores the log fd instead of trying to read from it.
* rescue: If attach-method is 'libvirt', force it to be 'appliance'.Richard W.M. Jones2012-09-041-0/+16
| | | | | | The libvirt backend currently doesn't support direct mode. We should make that work in future. As a workaround, force the attach-method to be 'appliance' in this case.
* rescue: If -v / debugging enabled, don't mask error messages.Richard W.M. Jones2012-09-041-1/+2
| | | | | | | | We set the error handler to NULL in order to mask "normal" error messages that we expect to see because of the unusual way that virt-rescue runs the appliance. However if the user selected -v / enabled debugging, then it is reasonable to expect they want to see every message, so do not mask anything.
* launch: libvirt: Direct mode flag is not (yet) supported, so give an error ↵Richard W.M. Jones2012-09-041-0/+6
| | | | | | in this case. We definitely intend to support this in future.
* Update release notes (text file).Richard W.M. Jones2012-09-041-4/+32
| | | | This updates commit 9e4ac650e4c4d934a91a88d7e4aaf5495845a71b.
* Update release notes.Richard W.M. Jones2012-09-041-4/+38
|
* lib: Add tests to the disk-{format,virtual-size,has-backing-file} APIs.Richard W.M. Jones2012-09-041-0/+24
|
* New APIs: disk-virtual-size and disk-has-backing-file.Richard W.M. Jones2012-09-042-0/+85
|
* lib: Reimplement qemu-img info parser for flexibility.Richard W.M. Jones2012-09-041-24/+52
| | | | | | | This allows other fields from the output of 'qemu-img info' to be parsed out. This updates commit 20902e7ce02fa375d5d336e6b984f615472ad1b1.
* Fix guestfs_disk_image API to work with relative paths.Richard W.M. Jones2012-09-041-1/+12
| | | | | | | | guestfs_disk_image makes a symbolic link to the real filename in order to sanitize the filename. However this fails if the filename is a relative path. Call realpath(3) to make the filename canonical. This fixes commit 20902e7ce02fa375d5d336e6b984f615472ad1b1.
* Version 1.19.38.1.19.38Richard W.M. Jones2012-09-0320-25228/+26429
|
* daemon: provide list of checksum commandsOlaf Hering2012-09-031-7/+14
| | | | | | | While adding the list of external commands I missed the various checksum tools. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* sparsify: Use guestfs_disk_format to autodetect input format (RHBZ#853762).Richard W.M. Jones2012-09-031-19/+4
|
* launch: libvirt: Use guestfs_disk_format API to autodetect input format.Richard W.M. Jones2012-09-031-85/+19
|
* guestfs(3): Document disk image formats and how to detect them.Richard W.M. Jones2012-09-032-1/+90
|
* New API: guestfs_disk_formatRichard W.M. Jones2012-09-034-0/+175
| | | | Detect the disk image format of a file, in a secure way.
* daemon: remove call to obsolete udevsettleOlaf Hering2012-09-031-8/+0
| | | | | | | udevadm is included in all reasonable recent distributions. This avoids 'command not found' errors in verbose mode. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* TODO: remove the implemented hostname removing featureWanlong Gao2012-09-031-1/+0
| | | | Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* sysprep: remove hostname from ifcfg-*Wanlong Gao2012-09-033-0/+60
| | | | | | Remove hostname from network interface configuration. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* generator: Test zero args, one optarg; and 63 optargs.Richard W.M. Jones2012-09-034-68/+110
| | | | This just generates the code; it's not called.
* java: Fix >= 32 optargs (thanks Wanlong Gao).Richard W.M. Jones2012-09-031-1/+1
|
* generator: Rename 'generator_*' as '*'.Richard W.M. Jones2012-09-0238-250/+247
| | | | | | | | | This is a simple renaming of the files/modules. Note that in OCaml, module names are derived from filenames by capitalizing the first letter. Thus the old module names had the form "Generator_api_versions". The new modules names have the form "Api_versions".
* TODO: Suggest removing hostname from ifcfg-eth* files.Richard W.M. Jones2012-09-021-0/+1
|
* recipes: Checksum file/device. Download to stdout.Richard W.M. Jones2012-09-021-0/+26
|
* tests: Attach copyright and license (GPLv2+) notices to various test scripts.Richard W.M. Jones2012-08-317-0/+112
| | | | For some reason these tests did not have license notices.
* tests/rsync: Allow rsync test to be skipped by setting SKIP_TEST_RSYNC_SH=1.Richard W.M. Jones2012-08-311-0/+5
|
* Version 1.19.37.1.19.37Richard W.M. Jones2012-08-3118-36/+39
|
* Copy the kernel so that libvirt can add an SELinux label to it. NB. This ↵Richard W.M. Jones2012-08-312-3/+4
| | | | requires febootstrap >= 3.20 with --copy-kernel flag.
* guestfs-internal.h: Organize functions by file.Richard W.M. Jones2012-08-311-45/+75
| | | | | | | | | | | This is almost just code motion. While doing this I discovered two prototypes for functions which no longer exist: * guestfs___launch_appliance * guestfs___launch_unix so these prototypes have been removed. The rest are rearranged more logically.
* tests: Make mkswap and tar tests conditional on linuxfsuuid and xz features.Richard W.M. Jones2012-08-311-3/+3
|
* tests/mount-local: Link test program with gnulib.Richard W.M. Jones2012-08-311-1/+2
|
* src/dbdump.c: Shouldn't depend on HAVE_HIVEX (thanks Tao Zhou).Richard W.M. Jones2012-08-311-2/+2
|
* daemon: collect list of called external commandsOlaf Hering2012-08-3051-203/+352
| | | | | | | | | | | | | | | | | | | | | | | | guestfsd calls many different tools. Keeping track of all of them is error prone. This patch introduces a new helper macro to put the command string into its own ELF section: GUESTFSD_EXT_CMD(C_variable, command_name); This syntax makes it still possible to grep for used command names. The actual usage of the collected list could be like this: objcopy -j .guestfsd_ext_cmds -O binary daemon/guestfsd /dev/stdout | tr '\0' '\n' | sort -u The resulting output will be used to tell mkinitrd which programs to copy into the initrd. Signed-off-by: Olaf Hering <olaf@aepfle.de> RWMJ: - Move str_vgchange at request of author. - Fix snprintf call in daemon/debug.c
* launch: appliance: app.virtio_scsi must not be bool.Richard W.M. Jones2012-08-301-1/+1
| | | | | | This is used to store values 0..3, so it mustn't be a bool. Ooops. RHEL 5's gcc revealed this bug.