search for: debug_stderr

Displaying 18 results from an estimated 18 matches for "debug_stderr".

2019 Dec 03
7
[p2v PATCH 0/6] Use GLib a bit more
In an effort to reduce the code, start to use few bits of GLib: - replace the gnulib c-type module - replace the gnulib getprogname module - use g_spawn_sync to launch curl, and drop a file reading function Pino Toscano (6): Include glib.h in p2v.h Use g_ascii_isspace instead of c_isspace from gnulib Use g_get_prgname instead of getprogname from gnulib build: remove no more used gnulib
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
2017 Mar 21
0
[PATCH] p2v: Calculate offset of the Real Time Clock from UTC.
...c->offset = 0; + + fd = open ("/dev/rtc", O_RDONLY); + if (fd == -1) { + perror ("/dev/rtc"); + return; + } + + if (ioctl (fd, RTC_RD_TIME, &rtm) == -1) { + perror ("ioctl: RTC_RD_TIME"); + close (fd); + return; + } + + close (fd); + +#ifdef DEBUG_STDERR + fprintf (stderr, "%s: RTC: %04d-%02d-%02d %02d:%02d:%02d\n", + getprogname (), + rtm.tm_year + 1900, rtm.tm_mon + 1, rtm.tm_mday, + rtm.tm_hour, rtm.tm_min, rtm.tm_sec); +#endif + + /* Convert this to seconds since the epoch. */ + tm.tm_sec = rtm.tm_sec;...
2016 Oct 24
2
[PATCH] p2v: Inhibit power saving during the conversion.
...08,6 +208,7 @@ start_conversion (struct config *config, char libvirt_xml_file[] = "/tmp/p2v.XXXXXX/physical.xml"; char wrapper_script[] = "/tmp/p2v.XXXXXX/virt-v2v-wrapper.sh"; char dmesg_file[] = "/tmp/p2v.XXXXXX/dmesg"; + int inhibit_fd = -1; #if DEBUG_STDERR print_config (config, stderr); @@ -218,6 +219,12 @@ start_conversion (struct config *config, set_running (1); set_cancel_requested (0); + inhibit_fd = inhibit_sleep (); +#ifdef DEBUG_STDERR + if (inhibit_fd == -1) + fprintf (stderr, "warning: virt-p2v cannot inhibit power savin...
2017 Mar 21
2
[PATCH] p2v: Calculate offset of the Real Time Clock from UTC.
Unlike the <cpu> node (see the other thread on the libguestfs ML), reading the Real Time Clock doesn't require libvirt and does work :-) For reference, read: https://libvirt.org/formatdomain.html#elementsTime https://en.wikipedia.org/wiki/Time_zone To test this you can run virt-p2v under qemu with a RTC offset: make -C p2v \ run-virt-p2v-in-a-vm \
2017 Oct 11
1
[PATCH] p2v: Enable miniexpect debugging.
...nsertions(+), 2 deletions(-) diff --git a/p2v/ssh.c b/p2v/ssh.c index 991888348..4966097ff 100644 --- a/p2v/ssh.c +++ b/p2v/ssh.c @@ -392,6 +392,9 @@ start_ssh (unsigned spawn_flags, struct config *config, set_ssh_internal_error ("ssh: mexp_spawnvf: %m"); return NULL; } +#if DEBUG_STDERR + mexp_set_debug_file (h, stderr); +#endif /* We want the ssh ConnectTimeout to be less than the miniexpect * timeout, so that if the server is completely unresponsive we @@ -414,7 +417,8 @@ start_ssh (unsigned spawn_flags, struct config *config, { 0 }...
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.
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,
2017 Feb 04
4
[PATCH 0/4] p2v: Send ping packets, document timeout problems.
Fix and/or document issues raised in this thread: https://www.redhat.com/archives/libguestfs/2017-February/msg00010.html Rich.
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 05
2
[PATCH] p2v: wait for qemu-nbd before starting conversion (RHBZ#1167774)
...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 +wait_qemu_nbd (int nbd_local_port, int timeout_seconds) +{ + int sockfd; + int resul...
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 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 Nov 16
0
[PATCH] p2v: Send physical server 'dmesg' output to debug dir on conversion server.
...pect.h" #include "p2v.h" @@ -129,6 +131,10 @@ start_conversion (struct config *config, time_t now; struct tm tm; mexp_h *control_h = NULL; + char dmesg_file[] = "/tmp/dmesg.XXXXXX"; + char dmesg_cmd[64]; + CLEANUP_FREE char *dmesg = NULL; + int fd, r; #if DEBUG_STDERR print_config (config, stderr); @@ -230,11 +236,35 @@ start_conversion (struct config *config, fprintf (stderr, "%s: libvirt XML:\n%s", guestfs_int_program_name, libvirt_xml); #endif + /* Get the output from the 'dmesg' command. We will store this + * on the remote ser...
2016 Sep 08
4
[PATCH 0/3] Use gnulib's getprogname
Hi, this series update libguestfs to a recent gnulib version, so that we can use its new getprogname module, and solve altogether one of the porting issues (the need for 'program_name' by the error module of gnulib), and have a single way to get the name of the current program. A number of changes in tools mostly, although mechanical. Thanks, Pino Toscano (3): Update gnulib to latest
2018 Jun 29
3
p2v: Various cleanups.
These are a prelude to fixing https://bugzilla.redhat.com/show_bug.cgi?id=1590220 A lot of the virt-p2v configuration code was duplicated manually. These changes make sure that most of it is generated. Rich.
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...FAILURE, errno, "malloc"); (*drivers)[n-1] = strndup (name, len); - if ((*drivers)[n-1] == NULL) { - perror ("strndup"); - exit (EXIT_FAILURE); - } + if ((*drivers)[n-1] == NULL) + error (EXIT_FAILURE, errno, "strndup"); (*drivers)[n] = NULL; #if DEBUG_STDERR diff --git a/p2v/utils.c b/p2v/utils.c index 3781a8d..183e406 100644 --- a/p2v/utils.c +++ b/p2v/utils.c @@ -23,6 +23,8 @@ #include <string.h> #include <ctype.h> #include <unistd.h> +#include <errno.h> +#include <error.h> #include <locale.h> #include <lib...