| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
See: https://bugzilla.redhat.com/show_bug.cgi?id=705499
(cherry picked from commit f55b32b2db83495fc0987f0fe0e979818704dff1)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Release the Python global interpreter lock while running libguestfs
calls.
We don't release it around guestfs_create() because that is a short
call that just allocates memory. We do release it around
guestfs_close() since that is a potentially long-running (it can call
wait(2) amongst other things). We also release it around all the
other generated Python calls.
We don't yet support callbacks into Python code (ie. the new event
API). But when we do in future, we will need to also handle the GIL
around those callbacks.
This code is adapted from libvirt's python/typewrappers.h. Thanks to
Dan Berrange for showing us how to do this properly.
(cherry picked from commit 08dc4a87b92435678780e9c49fe3bc1e7465d99f)
|
|
|
|
| |
(cherry picked from commit 4c2bb8b301970e8853a8feaa95e3698224640fba)
|
|
|
|
| |
(cherry picked from commit 0108d7861d4cc9a1f0d87d89080d1be7750e54b5)
|
|
|
|
|
| |
Cherry picked from commit 36d3a4ce53317b104d48b60c9fe1ed679065d1d4
and rebased for stable-1.8 branch.
|
| |
|
|
|
|
|
|
| |
rpcgen generates source which can't be safely compiled with strict-aliasing
enabled.
(cherry picked from commit 3a84e0784e1e3ab7b56850d0f8c9aa42f1ae3da1)
|
|
|
|
|
|
|
| |
A more accurate description of what this function does.
This is just code motion.
(cherry picked from commit f3eea44f97340f747e46b0df6931a04b53abaf01)
|
|
|
|
|
| |
This is just code motion.
(cherry picked from commit 60cdf446063a0ae61c52140355677d7da2327fa2)
|
|
|
|
|
| |
This is just code motion.
(cherry picked from commit aed8f220d279e910e0f398fea6fa674cc6a63783)
|
|
|
|
| |
(cherry picked from commit 4de124debf181ff6af38617b80c2355627e38d35)
|
|
|
|
|
| |
Thanks to Erez Shinan.
(cherry picked from commit afa17809599f3ebc82c3feef025ca812fb26c9fe)
|
|
|
|
| |
(cherry picked from commit 6e5f64089631622167e60df25ee009ef83df5170)
|
|
|
|
| |
(cherry picked from commit 42938f6faf9e724130be28f8e67d3c291bb81cba)
|
|
|
|
|
|
| |
This is just code motion.
Cherry picked from commit 1e6be6afe58de5bfb1ac056b80d3210888edfead.
|
|
|
|
|
|
| |
This should be obvious, and now it is documented to avoid any
confusion.
(cherry picked from commit 05dbe09a5c5be3d5f68dc6eb033c4f642fbac8bf)
|
|
|
|
| |
(cherry picked from commit b41e73008a939ef493d2bfb82c9bd07b0f74736a)
|
|
|
|
| |
(cherry picked from commit d5eb5216aae0cb83fae686f490d1c3c37c2c074e)
|
|
|
|
| |
(cherry picked from commit 1612201a83e732eec7d98d1679dd9dd426bcd10d)
|
|
|
|
|
|
|
|
| |
Note this has been backported to the 1.8 branch to allow us to write
documentation which refers to the virt-rescue --rw option. The option
does nothing in 1.8.
(cherry picked from commit 4155d20014b24b2203c4dd8b00e2e19450a7e3bb)
|
|
|
|
| |
(cherry picked from commit 3824935411e8a046f0359578978447dd5a0a1a16)
|
|
|
|
|
|
|
| |
Lift the if HAVE_PO4A ... endif completely out of the po-docs
subdirectory, and just exclude the whole subdirectory if the po4a
program is not available.
(cherry picked from commit 58f7a5a4ac8cce77dfaded1c29f3ad382b4cc9a8)
|
|
|
|
| |
(cherry picked from commit edb7501d60a03107c21f023b256d2b01cf116437)
|
| |
|
|
|
|
| |
(cherry picked from commit 759f4369de965f46f4a93b3a75dada050f87e223)
|
|
|
|
| |
(cherry picked from commit d82d6f0633f63d4a884147b1e85851e96ff8f58d)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The documentation for the getxattr and listxattr calls is not very
clear and as a result we were always returning something different
from that which the Linux kernel would usually return.
This fixes these calls, at least far enough that both the 'getfattr'
and 'getfacl' programs now work fine on FUSE-mounted filesystems.
Note that SELinux attrs are *not* passed through. This appears to be
a known bug between SELinux and FUSE. For more information see:
http://www.spinics.net/lists/selinux/msg09460.html
Cherry picked from commit 0d6fd9e1d2488841c912c5351086e536772837ef:
- rebased on stable-1.8 branch
- removed unintended hunk (which changed -m documentation in
guestmount --help output)
- removed parts of test-fuse.sh which will fail because
there is no support for passing acl,user_xattr options in
an extended -m option
|
|
|
|
| |
(cherry picked from commit a0e3b2183733c7440ad017c4ffe361935672339b)
|
|
|
|
| |
(cherry picked from commit 227bea6c7ef89b707fe2c01c4d0d0fb9081e8c04)
|
|
|
|
|
|
| |
No functional change; this simply makes the purpose of the
socket clearer.
(cherry picked from commit 110bfe1fcc9964b82acf7df6d4d60774471f9157)
|
|
|
|
| |
(cherry picked from commit 0daf7e81a659bcdc1ce327151cc1207b124a35a1)
|
|
|
|
| |
(cherry picked from commit c8faa5d0b0a17689d27bd33bc787ba0fe9a3f076)
|
|
|
|
|
| |
Cherry picked from commit d06fee159c14d4fe7654a02bae8849c4f82565f8
and backported to stable-1.8 branch.
|
|
|
|
|
|
|
| |
Add special is_file_nocase and is_dir_nocase functions and
remove the duplicate checks for files and directories with
different cases.
(cherry picked from commit 5776c145d411e5ae00072ecf422055f3d0bd29e2)
|
| |
|
|
|
|
| |
(cherry picked from commit 1541f3a564f8ff14c1a63298120e4dc618ea3274)
|
|
|
|
| |
(cherry picked from commit cf6f380c544456ee3e84fd41a480ea4cab3d94dd)
|
|
|
|
| |
(cherry picked from commit c6310bd242ddaa7b0801df9da7e4fba7346dc53e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the case where both ends cancel at the same time (eg. both ends
realize there are errors before or during the transfer), previously we
skipped sending back an error from the daemon, on the spurious basis
that the library would not need it (the library is cancelling because
of its own error).
However this is wrong: we should always send back an error message
from the daemon in order to preserve synchronization of the protocol.
A simple test case is:
$ guestfish -N fs -m /dev/sda1 upload nosuchfile /
libguestfs: error: open: nosuchfile: No such file or directory
libguestfs: error: unexpected procedure number (66/282)
(Notice two things: there are errors at both ends, and the
loss of synchronization).
After applying this commit, the loss of synchronization does not occur
and we just see the library error:
$ guestfish -N fs -m /dev/sda1 upload nosuchfile /
libguestfs: error: open: nosuchfile: No such file or directory
The choice of displaying the library or the daemon error is fairly
arbitrary in this case -- it would be valid to display either or even
to combine them into one error. Displaying the library error only
makes the code considerably simpler.
This commit also (re-)enables a test for this case.
Cherry picked and rebased from
commit f4d996fd26762053d68f46de5790aae893f03d38.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As a previous, incorrect attempt to fix RHBZ#576879 we tried to
prevent the daemon from sending an error reply if the daemon had
cancelled the transfer. This is wrong: the daemon should send an
error reply in these cases.
A simple test case is this:
guestfish -N fs -m /dev/sda1 upload big-file /
(This fails because the target "/" is a directory, not a file.)
Prior to this commit, libguestfs would hang instead of printing an
error. With this commit, libguestfs prints an error.
What is happening is:
(1) Library is uploading
a file (2) In the middle of the long
upload, daemon detects an error.
Daemon cancels.
(3) Library detects cancel,
sends cancel chunk, then waits
for the error reply from the
daemon. (4) Daemon is supposed to send
an error reply message.
Because step (4) wasn't happening, uploads that failed like this would
hang in the library (waiting for the error message, while the daemon
was waiting for the next request).
This also adds a regression test.
This temporarily breaks the "both ends cancel" case (RHBZ#576879c5).
Therefore the test for that is disabled, and this is fixed in the next
patch in the series.
This partially reverts commit dc706a639eec16084c0618baf7bfde00c6565f63.
Cherry picked and rebased from
commit 33b638109ed66ea360b53b80b1f407b3a5f5ec39.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a (potential) fix for the long standing protocol bug
which causes loss of synchronization when a FileIn action
fails very early on the daemon side. The canonical example
would be the 'upload' action failing immediately if no filesystem
is mounted.
What's supposed to happen is this:
(1) library sends
request message (2) daemon processes request
first chunk of data and sees that it will fail,
sends cancellation
(3) discards chunks of data
(4) library sees daemon
cancellation and stops
sending chunks
It was going wrong in step (1), in guestfs___send_to_daemon.
In some (timing related) circumstances, send_to_daemon could
receive the cancellation before sending the first chunk, at
which point it would exit, *discarding the first chunk*.
This causes the daemon to fail in step (3) since it reads the
next request as if it was a chunk, thus losing synchronization.
(The protocol specifies that you always have to send at least
one chunk if there is a FileIn or FileOut parameter).
The patch changes guestfs___send_to_daemon so that if it detects
cancellation, it sends the remaining data in its output buffer
instead of discarding it. (This also fixes another edge case
to do with sending partial data although I don't think we
ever saw that in practice).
(cherry picked from commit c7368ce167d6dbfd3e69ba208301c5af3f17a8a1)
|
|
|
|
| |
(cherry picked from commit dc8e4b057ecd3984d7c27c8ece54048b6a06d662)
|
|
|
|
| |
(cherry picked from commit 502a98948c1bade2969758aff3db09869481105a)
|
|
|
|
|
| |
This updates commit cbd8da6d4dd2e4cbc3b87fbc7cb7d6129eb69172.
(cherry picked from commit e34fc32092e18b38282306558dcef66263a0fb10)
|
|
|
|
|
|
|
|
| |
We suspect that there are in fact two separate bugs. In any
case it makes sense for the two tests to be done separately.
Note that these tests still fail.
(cherry picked from commit cbd8da6d4dd2e4cbc3b87fbc7cb7d6129eb69172)
|
|
|
|
|
| |
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
(cherry picked from commit d1f1f74e5f45fa5b94ebb096fa65fa33ecc23d09)
|
|
|
|
|
| |
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
(cherry picked from commit 6f7c1a9f9d76bdf9f112e12e1508531fb41abfb2)
|
|
|
|
| |
(cherry picked from commit eb304e9689ca474834207605ed52c369bcdec6ea)
|
|
|
|
|
| |
Left over from pre-virtio-serial days.
(cherry picked from commit 97eab125fa8e3dc481c1f1ba1a847cf43d537585)
|