| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
The internal_* prefix is reserved for internal functions
such as these tests.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each action changes from a tuple like this:
("cat", (RString "content", [Pathname "path"], []), 4,
[ProtocolLimitWarning],
[InitISOFS, Always, TestOutput (
[["cat"; "/known-2"]], "abcdef\n")],
"list the contents of a file",
"[...]");
to a slightly longer but more readable struct:
{ defaults with
name = "cat";
style = RString "content", [Pathname "path"], [];
proc_nr = Some 4;
protocol_limit_warning = true;
tests = [
InitISOFS, Always, TestOutput (
[["cat"; "/known-2"]], "abcdef\n")
];
shortdesc = "list the contents of a file";
longdesc = "[...]" };
["defaults" is a struct which contains the defaults for every field,
allowing us to use the "{ defaults with ... }" syntax to just update
the fields we want to be different from the defaults.]
This is a mechanical change and there is no change to the output of
the generator. I checked the output before and after with diff to
verify this. There are no changes in the output apart from UUIDs
which are expected to change with each run.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This fixes commit f9a5e3ed86ee7bcd13619f13b4d4de6ce46ac8c3.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
See also:
https://bugzilla.redhat.com/show_bug.cgi?id=835466#c9
|
| |
|
|
|
|
|
|
| |
This reverts commit 6e5a85bb9b6557bc337625a339728e23f5f2dd94.
It turns out this is a bug in QEMU after all.
|
| |
|
|
|
|
|
|
|
| |
https://bugs.launchpad.net/qemu/+bug/1021649 is invalid, probably
caused by a Fedora ROM.
This updates commit 52d188e32fb8addb45bf926df07e34ab35898f85.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Earlier versions of qemu contained a bug in the qcow2 code which
causes qemu to segfault when shutting down and flushing its internal
cache, and this can result in data loss.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new API splits orderly close into a two-step process:
if (guestfs_shutdown (g) == -1) {
/* handle the error, eg. qemu error */
}
guestfs_close (g);
Note that the explicit shutdown step is only necessary in the case
where you have made changes to the disk image and want to handle write
errors. Read the documentation for further information.
This change also:
- deprecates guestfs_kill_subprocess
- turns guestfs_kill_subprocess into the same as guestfs_shutdown
- changes guestfish and other tools to call shutdown + close
where necessary (not for read-only tools)
- updates documentation
- updates examples
|
|
|
|
|
| |
Currently guestfs_close has no method to return an error indication,
so this commit simply prints the error on stderr.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The order is now:
- remove the handle from the list of handles
- send close trace message
- sync and shutdown qemu
- run user close callback
- free temporary directory
- free memory
This commit ought to be no functional change.
|
|
|
|
|
|
|
| |
Make the comments consistent.
Also make the Perl example call $g->close explicitly so it is
consistent with the other examples.
|
|
|
|
|
| |
This is now set by default in all supported versions of libguestfs.
It's just confusing if the examples refer to it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Linux, sync(2) does not actually issue a write barrier, thus it
doesn't force a flush of the underlying hardware write cache (or
qemu's disk cache in the virtual case).
This can be a problem, because libguestfs relies on running sync in
the appliance, followed by killing qemu (using SIGTERM).
In most cases, this is fine, because killing qemu with SIGTERM should
cause it to flush out the disk cache before it exits. However we have
found various bugs in qemu which cause qemu to crash while doing the
flush, leaving the data unwritten (see RHBZ#836913).
The solution is to issue fsync(2) to the block devices. This has a
write barrier, so it ensures that qemu writes out its cache long
before we get around to killing qemu.
|
|
|
|
| |
No functional change.
|
|
|
|
| |
This is just a comment and has no functional effect.
|
|
|
|
|
| |
Note that qemu treats these identically, so this change has
no functional effect.
|
|
|
|
|
| |
systemd is playing a WTF game with udevd, moving it around and
renaming it unnecessarily in each release. Chase all known locations.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Replace:
cp tests/guests/fedora.img test.img
with the longer but possibly more space-efficient equivalent:
qemu-img create -F raw -b tests/guests/fedora.img -f qcow2 test.qcow2
|
|
|
|
|
| |
If the partition name we're about to return doesn't really exist,
then don't perform the mapping.
|
|
|
|
|
|
|
|
| |
See https://bugzilla.redhat.com/show_bug.cgi?id=836573#c3
for an explanation.
Useful function 'is_partition' shows how to tell if a device name
represents a partition.
|
|
|
|
|
|
| |
This is mostly code motion, although it also fixes a memory leak in an
extremely rare failure case, and it generally tidies up the existing
code.
|
|
|
|
|
|
| |
This returns the number of whole block devices added. It is usually
simpler to call this than to list the devices and count them, which
is what we do in some places in the current codebase.
|
|
|
|
|
|
|
|
|
| |
On Debian, the Ruby C extensions library isn't '-lruby', it's
something like '-lruby1.8' or '-lruby-1.9.1' and these can even be
parallel-installed.
Fix detection so we use Ruby's own rbconfig.rb file to find the right
library to use.
|
|
|
|
| |
No functional change.
|
| |
|
| |
|
|
|
|
| |
No functional change.
|