- 06 2月, 2020 1 次提交
-
-
由 Ján Tomko 提交于
This lets it generate the remote dispatch for StorageVolGetInfoFlags. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 04 2月, 2020 2 次提交
-
-
由 Daniel P. Berrangé 提交于
This addreses portability to Windows and standardizes error reporting. This fixes a number of places which failed to set O_CLOEXEC or failed to report errors. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Most code now uses the virProcess / virCommand APIs, so the need for sys/wait.h is quite limited. Removing this include removes the dependency on GNULIB providing a dummy sys/wait.h for Windows. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 30 1月, 2020 1 次提交
-
-
由 Ján Tomko 提交于
Also add a space after the start in some of the cases. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
- 29 1月, 2020 1 次提交
-
-
由 Daniel P. Berrangé 提交于
There are a large number of different header files that are related to the sockets APIs. The virsocket.h header includes all of the relevant headers for Windows and UNIX in one convenient place. If virsocketaddr.h is already included, then there's no need for virsocket.h Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 27 1月, 2020 1 次提交
-
-
由 Daniel P. Berrangé 提交于
The intent here is to allow the virt drivers to be run directly embedded in an arbitrary process without interfering with libvirtd. To achieve this they need to store all their configuration & state in a separate directory tree from the main system or session libvirtd instances. This can be useful for doing testing of the virt drivers in "make check" without interfering with the user's own libvirtd instances. It can also be used for applications using KVM/QEMU as a piece of infrastructure to build an service, rather than for general purpose OS hosting. A long standing example is libguestfs, which would prefer if its temporary VMs did show up in the main libvirtd VM list, because this confuses apps such as OpenStack Nova. A more recent example would be Kata which is using KVM as a technology to build containers. Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 23 1月, 2020 1 次提交
-
-
由 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>
-
- 17 1月, 2020 2 次提交
-
-
由 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é 提交于
The GLib g_size_checked_mul() function is not quite the same signature, and gives compiler warnings due to not correctly casting from gsize to guint64/32. Implementing a replacement for INT_MULTIPLY_OVERFLOW is easy enough to do ourselves. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 16 1月, 2020 2 次提交
-
-
由 Jonathon Jongsma 提交于
Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Julio Faracco 提交于
There is a lots of possibilities to retrieve hostname information from domain. Libvirt could use lease information from dnsmasq to get current hostname too. QEMU supports QEMU-agent but it can use lease source. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 08 1月, 2020 1 次提交
-
-
由 Michal Privoznik 提交于
This is not strictly needed, but it makes sure we initialize the @bootTime global variable. Thing is, in order to validate XATTRs and prune those set in some previous runs of the host, a timestamp is recorded in XATTRs. The host boot time was unique enough so it was chosen as the timestamp value. And to avoid querying and parsing /proc/uptime every time, the query function does that only once and stores the boot time in a global variable. However, the only time the query function is called is in a child process that does lock files and changes seclabels. So effectively, we are doing exactly what we wanted to prevent from happening. The fix is simple, call the virHostBootTimeInit() function which sets the global variable. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
- 07 1月, 2020 1 次提交
-
-
由 Daniel Henrique Barboza 提交于
Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 03 1月, 2020 1 次提交
-
-
由 Daniel P. Berrangé 提交于
The g_pattern_match function_simple is an acceptably close approximation of fnmatch for libvirt's needs. In contrast to fnmatch(), the '/' character can be matched by the wildcards, there are no '[...]' character ranges and '*' and '?' can not be escaped to include them literally in a pattern. Reviewed-by: NFabiano Fidêncio <fidencio@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 20 12月, 2019 3 次提交
-
-
由 Fabiano Fidêncio 提交于
virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the checks for it completely unnecessary. Signed-off-by: NFabiano Fidêncio <fidencio@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Fabiano Fidêncio 提交于
virGetUserConfigDirectory() *never* *ever* returns NULL, making the checks for it completely unnecessary. Signed-off-by: NFabiano Fidêncio <fidencio@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Fabiano Fidêncio 提交于
Signed-off-by: NFabiano Fidêncio <fidencio@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 17 12月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
The intent of get_nonnull_domain() is not to validate virDomain as sent by the client but just to construct the virDomain structure. The validation is then done in each API when looking up the domain in our internal hash tables. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
- 16 12月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
There is plenty of distributions that haven't switched to systemd nor they force their users to (Gentoo, Alpine Linux to name a few). With the daemon split merged their only option is to still use the monolithic daemon which will go away eventually. Provide init scripts for these distros too. For now, I'm not introducing config files which would correspond to the init files except for libvirtd and virtproxyd init scripts where it might be desirable to tweak the command line of corresponding daemons. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 14 12月, 2019 2 次提交
-
-
由 Marc Hartmayer 提交于
To free the structs and save the error, it is not necessary to hold @priv->lock, therefore move these parts after the mutex unlock. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NMarc Hartmayer <mhartmay@linux.ibm.com>
-
由 Marc Hartmayer 提交于
As a result, you can later determine during the callback which program was used. This makes it easier to refactor the code in the future and is less prone to error. Signed-off-by: NMarc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
- 11 12月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
This was a semi-automated conversion. First it was run through pod2rst, and then it was manually editted to use a rst structure that matches expectations of rst2man. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 10 12月, 2019 2 次提交
-
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Eric Blake 提交于
This one is fairly straightforward - the generator already does what we need. Signed-off-by: NEric Blake <eblake@redhat.com> Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 29 11月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
In v5.9.0-273-g8ecab214 I've tried to fix a lock ordering problem, but introduced a crasher. Problem is that because the client lock is unlocked (in order to honour lock ordering) the stream we are currently checking in daemonStreamFilter() might be freed and thus stream->priv might not even exist when the control get to virMutexLock() call. To resolve this, grab an extra reference to the stream and handle its cleanup should the refcounter reach zero after the deref. If that's the case and we are the only ones holding a reference to the stream, we MUST return a positive value to make virNetServerClientDispatchRead() break its loop where it iterates over filters. The problem is, if we did not do so, then "filter = filter->next" line will read from a memory that was just freed (freeing a stream also unregisters its filter). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 19 11月, 2019 1 次提交
-
-
由 LanceLiu 提交于
When dispatching a message read from client it is first passed through registered filters. If one of the filters consumes the message no further processing of the message is done. However, the filter callbacks are called with the client object locked. This breaks lock ordering in case of virStream filter, we always acquire stream private data lock without the client object locked. In other words, the daemonStreamFilter() does not follow the lock ordering. Signed-off-by: NLanceLiu <liu.lance.89@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 15 11月, 2019 1 次提交
-
-
由 Jonathon Jongsma 提交于
Some layered products such as oVirt have requested a way to avoid being blocked by guest agent commands when querying a loaded vm. For example, many guest agent commands are polled periodically to monitor changes, and rather than blocking the calling process, they'd prefer to simply time out when an agent query is taking too long. This patch adds a way for the user to specify a custom agent timeout that is applied to all agent commands. One special case to note here is the 'guest-sync' command. 'guest-sync' is issued internally prior to calling any other command. (For example, when libvirt wants to call 'guest-get-fsinfo', we first call 'guest-sync' and then call 'guest-get-fsinfo'). Previously, the 'guest-sync' command used a 5-second timeout (VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT), whereas the actual command that followed always blocked indefinitely (VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK). As part of this patch, if a custom timeout is specified that is shorter than 5 seconds, this new timeout is also used for 'guest-sync'. If there is no custom timeout or if the custom timeout is longer than 5 seconds, we will continue to use the 5-second timeout. Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 14 11月, 2019 1 次提交
-
-
由 Ján Tomko 提交于
Replace all the usage of VIR_STRNDUP(dest, b, p ? p - b : -1) with separate calls to g_strndup/g_strdup. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
- 13 11月, 2019 1 次提交
-
-
由 Daniel Henrique Barboza 提交于
Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 12 11月, 2019 2 次提交
-
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Michal Privoznik 提交于
Previously we generated all source files into $srcdir which is no longer true. This means that we can't just blindly prepend each source file with $srcdir. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 11 11月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
When RUNSTATEDIR was introduced commit d29c917e Author: Daniel P. Berrangé <berrange@redhat.com> Date: Tue Aug 20 16:05:12 2019 +0100 src: honour the RUNSTATEDIR variable in all code The makefile rules for man pages were accidentally not updated for the new variablle name. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 09 11月, 2019 5 次提交
-
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
This affects more than src/Makefile.am as the rule to generate source files for protocols is generic for all sub-directories. Affected files are: src/admin/admin_protocol.{h,c} src/locking/lock_protocol.{h,c} src/logging/log_protocol.{h,c} src/lxc/lxc_monitor_protocol.{h,c} src/remote/{lxc,qemu,remote}_protocol.{h,c} src/rpc/{virkeepalive,virnet}protocol.{h,c} Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
Our naming was not consistent. Use the protocol name as prefix for all generated files. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 25 10月, 2019 3 次提交
-
-
由 Peter Krempa 提交于
Move calls to virTypedParamsSerialize earlier in the event dispatch functions so that we don't have to call 'xdr_free' afterwards. This is possible as virTypedParamsSerialize cleans up after itself if it fails. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> ACKed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Few events emit optional strings. We need to allocate the container for it first. Note that remote_nonnull_string is used as the type as the internal part of the string is nonnull if the container is present. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> ACKed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Allocate the array of graphics identity objects using g_new0 to allow dropping the 'error' label. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> ACKed-by: NEric Blake <eblake@redhat.com>
-