search for: set_conversion_error

Displaying 16 results from an estimated 16 matches for "set_conversion_error".

2016 Jun 30
4
[PATCH 0/4] p2v: Send ^C to remote end to cancel the conversion.
(I don't have a BZ# for this yet, but I'm expecting it to be filed as an RFE) Currently if the user is in the virt-p2v GUI and cancels the conversion, all that happens is we abruptly close the ssh session to virt-v2v. That is bad .. possibly (or maybe not). But in any case there is an alternative: we can send a ^C key to the virt-v2v process, which it could catch and handle gracefully,
2014 Dec 11
1
[PATCH] p2v: show error dialog if virt-v2v fails (RHBZ#1167601)
...printf_fail; if (mexp_printf (control_h, "\n") == -1) goto printf_fail; @@ -313,8 +314,18 @@ start_conversion (struct config *config, ret = 0; out: - if (control_h) - mexp_close (control_h); + if (control_h) { + if ((status = mexp_close (control_h)) == -1) { + set_conversion_error ("mexp_close: %m"); + ret = -1; + } else if (ret == 0 && + WIFEXITED (status) && + WEXITSTATUS (status) != 0) { + set_conversion_error ("virt-v2v exited with status %d", + WEXITSTATUS (status));...
2017 Jan 26
3
[PATCH 0/3] p2v: Allow nbdkit as an alternative NBD server.
qemu-nbd is a fine NBD server. However it's not easy to compile a reliably working version on RHEL 5. This patch series allows nbdkit to be used as an alternative (qemu-nbd is still the default). Rich.
2014 Dec 05
2
[PATCH] p2v: wait for qemu-nbd before starting conversion (RHBZ#1167774)
...network (struct config *, const char *interface); @@ -156,6 +159,12 @@ start_conversion (struct config *config, if (data_conns[i].nbd_pid == 0) goto out; + /* Wait for qemu-nbd to listen */ + if (wait_qemu_nbd (data_conns[i].nbd_local_port, WAIT_QEMU_NBD_TIMEOUT) == -1) { + set_conversion_error("unable to connect to qemu-nbd"); + goto out; + } + #if DEBUG_STDERR fprintf (stderr, "%s: data connection for %s: SSH remote port %d, local port %d\n", @@ -371,6 +380,69 @@ start_qemu_nbd (int port, const char *device) return pid; } +static int...
2017 Feb 03
5
[PATCH 0/5] Support socket activation in virt-p2v.
As the subject says, support socket activation in virt-p2v. I have added upstream support for socket activation to nbdkit already: https://github.com/libguestfs/nbdkit/commit/7ff39d028c6359f5c0925ed2cf4a2c4c751af2e4 I posted a patch for qemu-nbd, still waiting on more reviews for that one: https://www.mail-archive.com/qemu-devel@nongnu.org/msg427246.html I tested this against old and new qemu
2014 Dec 08
1
Re: [PATCH] p2v: wait for qemu-nbd before starting conversion (RHBZ#1167774)
"Richard W.M. Jones" <rjones@redhat.com> writes: > Hi John, > > Looks good. I've attached a slightly modified patch: > > - Don't need to define the WAIT_* timeout in the header file. > > - Call set_conversion_error in the subroutine, so that the > real error can be propagated back to the user. > > - Use memcmp instead of strncmp. > > - Whitespace changes. > > What do you think? > > Rich. Looks good to me. Thanks Rich. eck
2014 Dec 15
0
[PATCH] p2v: avoid connecting to ourself while probing qemu-nbd (RHBZ#1167774)
...+ * there's a decent chance we'll end up trying to bind() to a port + * that is in TIME_WAIT from a prior run. Handle that gracefully + * with SO_REUSEADDR. + */ + if (setsockopt (sockfd, SOL_SOCKET, SO_REUSEADDR, + &reuseaddr, sizeof reuseaddr) == -1) { + set_conversion_error ("waiting for qemu-nbd to start: setsockopt: %m"); + goto cleanup; + } + + if (bind (sockfd, (struct sockaddr *) &src_addr, sizeof src_addr) == -1) { + set_conversion_error ("waiting for qemu-nbd to start: bind(%d): %m", + ntohs (src_addr.sin...
2014 Dec 15
2
[PATCH v2 0/1] p2v: avoid connecting to ourself while probing qemu-nbd
Changes since v1: - Set probing source port to be nbd_local_port+1 instead of always using 50124 to deal with multi-disk scenario. - Set SO_REUSEADDR on client socket to avoid issues with old connections in TIME_WAIT. I've been running this for a few hours now using the updated multi-disk test and haven't seen any problems.
2017 Mar 30
4
[PATCH 0/3] p2v, v2v: Ensure the full version is always available in several places.
After debugging a virt-p2v issue with a customer in the middle of the night on Tuesday, I felt it would have been helpful to know exactly which version(s) of virt-p2v and virt-v2v they were using. That wasn't very clear from the log file I was provided with, so this change makes sure the information is included every time. Rich.
2014 Dec 08
0
Re: [PATCH] p2v: wait for qemu-nbd before starting conversion (RHBZ#1167774)
Hi John, Looks good. I've attached a slightly modified patch: - Don't need to define the WAIT_* timeout in the header file. - Call set_conversion_error in the subroutine, so that the real error can be propagated back to the user. - Use memcmp instead of strncmp. - Whitespace changes. What do you think? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http...
2014 Dec 12
2
[PATCH] p2v: avoid connecting to ourself while probing qemu-nbd (RHBZ#1167774)
--- p2v/conversion.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/p2v/conversion.c b/p2v/conversion.c index 4ff7ecc..5c0c78e 100644 --- a/p2v/conversion.c +++ b/p2v/conversion.c @@ -44,6 +44,16 @@ /* How long to wait for qemu-nbd to start (seconds). */ #define WAIT_QEMU_NBD_TIMEOUT 10 +/* Source port for probing qemu-nbd. Should be one
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...5,25 @@ cleanup_data_conns (struct data_conn *data_conns, size_t nr) /* Macros "inspired" by src/launch-libvirt.c */ /* <element */ -#define start_element(element) \ - if (xmlTextWriterStartElement (xo, BAD_CAST (element)) == -1) { \ - set_conversion_error ("xmlTextWriterStartElement: %m"); \ - return NULL; \ - } \ +#define start_element(element) \ + if (xmlTextWriterStartElement (xo, BAD_CAST (element))...
2016 Jun 18
8
[PATCH 0/7] p2v: Multiple improvements to the look of virt-p2v.
In the run dialog, I have implemented an ANSI colour escape sequence interpreter, so that colours displayed by the remote virt-v2v are now shown to the user. (https://bugzilla.redhat.com/show_bug.cgi?id=1314244) This requires virt-v2v to send colours. It wasn't doing that because the output was a pipe (as we capture the output into the log file). So I added a global --colours option to make
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste. --- align/scan.c | 35 ++++++++++--------- cat/cat.c | 39 +++++++++++---------- cat/filesystems.c | 69 +++++++++++++++++++------------------- cat/log.c | 35 ++++++++++--------- cat/ls.c | 61 +++++++++++++++++---------------- df/main.c | 43 ++++++++++++------------ diff/diff.c | 67
2019 Sep 10
3
[PATCH 0/2] Remove virt-p2v from libguestfs
Now that virt-p2v has its own repository [1] and releases [2], it is time to remove it from libguestfs. [1] https://github.com/libguestfs/virt-p2v [2] http://download.libguestfs.org/virt-p2v/ Pino Toscano (2): Remove virt-p2v Remove remaining virt-p2v bits .gitignore | 4 - Makefile.am | 7 +- bash/Makefile.am
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...index d076718..103073e 100644 --- a/p2v/conversion.c +++ b/p2v/conversion.c @@ -27,6 +27,7 @@ #include <unistd.h> #include <time.h> #include <errno.h> +#include <error.h> #include <locale.h> #include <libintl.h> #include <netdb.h> @@ -101,11 +102,9 @@ set_conversion_error (const char *fs, ...) len = vasprintf (&msg, fs, args); va_end (args); - if (len < 0) { - perror ("vasprintf"); - fprintf (stderr, "original error format string: %s\n", fs); - exit (EXIT_FAILURE); - } + if (len < 0) + error (EXIT_FAILURE, errno,...