- 24 1月, 2020 3 次提交
-
-
由 Peter Krempa 提交于
There are more places which require getting the topmost nodename to be passed to qemu. Separate it out into a new function. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
If a mirror job fails to start in -blockdev mode we'd not unplug the backing files we added first because the code on the error path checked the wrong value. 'rc' is used as status of the code which added the images, but the state of the 'block(dev)-mirror' call is stored in 'ret' at that point. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Daniel P. Berrangé 提交于
The virConnectGetDomainCapabilities API accepts either a binary path to the emulator, or desired guest arch. If guest arch is not given, then the host arch is assumed. In the case where the binary is not given, the code tried to find the emulator binary in the existing list of cached emulator capabilities. This is not valid since we switched to lazy population of the cache in: commit 3dd91af0 Author: Daniel P. Berrangé <berrange@redhat.com> Date: Mon Dec 2 13:04:26 2019 +0000 qemu: stop creating capabilities at driver startup As a result of this change, if there are no persistent guests defined using the requested guest architecture, virConnectGetDomainCapabilities will fail to find an emulator binary. The solution is to stop relying on the cached capabilities to find the binary and instead use the same logic we use to pick default a binary per arch when populating capabilities. Tested-by: NBoris Fiuczynski <fiuczy@linux.ibm.com> Tested-by: NRichard W.M. Jones <rjones@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 23 1月, 2020 5 次提交
-
-
由 Thomas Huth 提交于
The "ps2" bus is only available on certain machines like x86. On machines like s390x, we should refuse to add a device to this bus instead of silently ignoring it. Looking at the QEMU sources, PS/2 is only available if the QEMU binary has the "i8042" device, so let's check for that and only allow "ps2" devices if this QEMU device is available, or if we're on x86 anyway (so we don't have to fake the QEMU_CAPS_DEVICE_I8042 capability in all the tests that use <input ... bus='ps2'/> in their xml data). Reported-by: NSebastian Mitterle <smitterl@redhat.com> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1763191Signed-off-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Julio Faracco 提交于
LXC driver is not able to retrieve IP addresses from domains. This function was not implemented yet. It can be done using DHCP lease and ARP table. Different from QEMU, LXC does not have an agent to fetch this info, but other sources can be used. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Julio Faracco 提交于
QEMU driver has two functions: qemuGetDHCPInterfaces() and qemuARPGetInterfaces() that are being used inside only one single function. They can be turned into generic functions that other drivers can use. This commit move both from QEMU driver tree to domain conf tree. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jonathon Jongsma 提交于
Simplify function logic by using g_autofree to free local variables so that we can remove some goto statements that are used for cleanup. Introduce a g_autoptr cleanup function for virNodeDeviceDef. Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Pavel Hrdina 提交于
Since commit <60d9ad6f> we require GnuTLS and since commit <ac0d21c7> we can actually drop the usage of WITH_GNUTLS. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 22 1月, 2020 2 次提交
-
-
由 Christian Ehrhardt 提交于
If virHostdevManagerGetDefault in qemuhotplugtest fails it works for quite a while to later segfault when accessing mgr->activePCIHostdevs. Report the error details and break on a failed init to see the real issue right away. Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
-
The libxl driver already tries to call shutdown inhibit callback in the right places, but only if it's set. That last part was missing, resulting in premature shutdown when running libvirtd --timeout=... Signed-off-by: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
- 21 1月, 2020 2 次提交
-
-
由 Richard W.M. Jones 提交于
You normally want to run the locally compiled copy of virsh. Trying to run the installed version with the locally compiled library is a recipe for problems with missing symbols and so on. By adding tools to the path we can ensure that (eg) the libguestfs test suite will use compatible copies of the library and virsh. Signed-off-by: NRichard W.M. Jones <rjones@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Richard W.M. Jones 提交于
This has been used in libguestfs and libnbd for quite a while as it makes the ./run script easier to read and write. See also: http://stackoverflow.com/a/9631350Signed-off-by: NRichard W.M. Jones <rjones@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 20 1月, 2020 1 次提交
-
-
由 Ján Tomko 提交于
This function grabs an agent job but ends a monitor job. End the agent job instead. https://bugzilla.redhat.com/show_bug.cgi?id=1792723Signed-off-by: NJán Tomko <jtomko@redhat.com> Reported-by: NDan Zheng <dzheng@redhat.com> Fixes: e005c95f
-
- 17 1月, 2020 27 次提交
-
-
由 Julio Faracco 提交于
This is only 2 simple typo fixes for wrong documentation wording. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
Running bootstrap and autoreconf from autogen.sh produced different files in build-aux directory. The reason is that gnulib usually have newer version of these files and overwrites them after the autoreconf step. In order to fix it remove the --install and --force options, in addition introduce --verbose option in order to reflect what bootstrap is doing. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
The existence of AUTHORS file is required for GNU projects but since commit <8bfb36db> we do not require these files to exist. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
We already ignore most of these files and the .gitignore files as well. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
Preparation for having bootstrap result in git. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
We are in process of removing gnulib and adopting meson as our build system. In order to help with the transition let's drop gnulib tests. This will also help with the fact that before we will be able to drop gnulib completely we will store output of bootstrap in git. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
It is pulled in by tests and used by our build system as well. Make an explicit dependency on threadlib. This can be later removed by using GLib GThread. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
We already use this function and so far we've been lucky that the same check is done by gnulib. This will change once we will drop gnulib and also make it obvious that we have to do the same check in Meson as well. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
The function virSecretGetSecretString calls into secret driver and is used from other hypervisors drivers and as such makes more sense in util. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Christian Ehrhardt 提交于
Reported at build time by lintian: manpage-section-mismatch usr/share/man/man8/virt-sanlock-cleanup.8.gz:3 8 != 1 And indeed the rst file says 1 while the makefile say 8: if WITH_SANLOCK manpages8_rst += manpages/virt-sanlock-cleanup.rst else ! WITH_SANLOCK 8 "System administration commands and daemons" seems to match, so fix the rst file to match. Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Daniel P. Berrangé 提交于
Remove many imports of sys/ioctl.h which are redundant, and conditionalize remaining usage that needs to compile on Windows platforms. The previous change to remove the "nonblocking" gnulib module indirectly caused the loss of the "ioctl" gnulib module that we did not explicitly list in bootstrap.conf despite relying on. Rather than re-introduce the "ioctl" module this patch makes it redundant. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
This fixes a build bug introduced by commit fbf27730 Author: Daniel P. Berrangé <berrange@redhat.com> Date: Mon Dec 16 11:16:51 2019 +0000 conf: add support for specifying CPU "dies" parameter Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Peter Krempa 提交于
Add few test cases for nbd+unix style URIs with few corner cases. The NBD URI syntax is documented at https://github.com/NetworkBlockDevice/nbd/blob/master/doc/uri.mdSigned-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
When parsing legacy NBD backing file strings such as 'nbd:unix:/tmp/sock:exportname=/' we'd fail to set the transport to VIR_STORAGE_NET_HOST_TRANS_UNIX. This started to be a problem once we actually started to generate config of the backing store on the command line with -blockdev as the JSON code would try to format it as TCP and fail with: internal error: argument key 'host' must not have null value Set the type properly and add a test. This bug was found by the libguestfs test suite in: https://bugzilla.redhat.com/show_bug.cgi?id=1791614Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reported-by: NMing Xie <mxie@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Tested-by: NRichard W.M. Jones <rjones@redhat.com>
-
由 Daniel P. Berrangé 提交于
* send, recv: we use write & read for sockets so don't need these portability wrappers * ioctl, fcntl, fcntl-h: any usage of these is conditionally compiled and excludes Windows * ttyname_r: this exists in all supported platforms that we require now * environ: the tests explicitly declare this global variable * intprops: the code has been converted / simplified * nonblocking: we have a custom impl now to work with our own sockets wrappers * openpty: custom checks in configure.ac cope with portability * accept, bind, connect, getpeername, getsockname, listen, setsockopt, socket: code needing Windows portability uses our wrapper functions * close: avoids abort when passed invalid FD on Windows. Our VIR_FORCE_CLOSE wrapper avoids calling close(-1) and it is reasonable to abort in other scenarios in the RPC client * physmem: the gnulib code has been partially imported * warnings, manywarnings: copy the files directly into our local m4 dir * verify: replaced by G_STATIC_ASSERT * pthread_sigmask: none of the fixed portability problems affect libvirt's usage on current supported platforms * termios: the header is now conditionally included only when needed * time_r: replaced with GDateTime APIs Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
gmtime_r/localtime_r are mostly used in combination with strftime to format timestamps in libvirt. This can all be replaced with GDateTime resulting in simpler code that is also more portable. There is some boundary condition problem in parsing POSIX timezone offsets in GLib which tickles our test suite. The test suite is hacked to avoid the problem. The upsteam GLib bug report is https://gitlab.gnome.org/GNOME/glib/issues/1999Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The GNULIB termios module ensures termios.h exists (but is none the less empty) when building for Windows. We already exclude usage of the functions that would exist in a real termios.h, so having an empty termios.h is not especially useful. It is simpler to just put all use of termios.h related functions behind a "#ifndef WIN32" conditional. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
G_STATIC_ASSERT() is a drop-in functional equivalent of the GNULIB verify() macro. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Libvirt's original atomic ops impls were largely copied from GLib's code at the time. The only API difference was that libvirt's virAtomicIntInc() would return a value, but g_atomic_int_inc was void. We thus use g_atomic_int_add(v, 1) instead, though this means virAtomicIntInc() now returns the original value, instead of the new value. This rewrites libvirt's impl in terms of g_atomic_int* as a short term conversion. The key motivation was to quickly eliminate use of GNULIB's verify_expr() macro which is not a direct match for G_STATIC_ASSERT_EXPR. Long term all the callers should be updated to use g_atomic_int* directly. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
We don't need all the platforms gnulib deals with, so this is a cut down version of GNULIB's physmem.c code. This also allows us to integrate libvirt's error reporting functions closer to the error cause. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Convert to use socket wrappers. Aside from the header file include change, this requires changing close -> closesocket since our portability isn't trying to replace the close function. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Windows sockets take a SOCKET HANDLE object instead of a file descriptor. Wrap them in the same way that gnulib does so that they use C runtime file descriptors. While we could in theory use GSocket, it is hard to get the exact same semantics libvirt has for its current socket usage. Wrapping the Winsock2 APIs is thus the easiest approach in the short term. In changing the socke wrappers we need to re-implement the nonblocking function too, since the GNULIB impl expects to be used with the GNULIB sockets wrappers. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
All UNIX platforms we care about have openpty() in the libutil library. Use of pty.h must also be made conditional, excluding Win32. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Some syntax check rules validate usage of headers provided by gnulib. We want to validate these only against the gnulib modules we've chosen to use, not all modules, since we're trying to eliminate them. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Some UNIX platforms don't declare 'environ' in their header files. We can unconditionally declare it ourselves to avoid this problem. There is no need to do this in the aa-helper code since that is Linux only code. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-