Commit Graph

39761 Commits

Author SHA1 Message Date
Ricky Tigg
9bb0a7a5c2 Translated using Weblate (Finnish)
Currently translated at 4.5% (475 of 10399 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/fi/

Co-authored-by: Ricky Tigg <ricky.tigg@gmail.com>
Signed-off-by: Ricky Tigg <ricky.tigg@gmail.com>
2020-11-11 15:35:51 +01:00
Masayoshi Mizuma
5cde9dee8c qemu: Move qemuExtDevicesStop() before removing the pidfiles
A qemu guest which has virtiofs config fails to start if the previous
starting failed because of invalid option or something.

That's because the virtiofsd isn't killed by virPidFileForceCleanupPath()
on the former failure because the pidfile was already removed by
virFileDeleteTree(priv->libDir) in qemuProcessStop(), so
virPidFileForceCleanupPath() just returned.

Move qemuExtDevicesStop() before virFileDeleteTree(priv->libDir) so that
virPidFileForceCleanupPath() can kill virtiofsd correctly.

For example of the reproduction:

  # virsh start guest
  error: Failed to start domain guest
  error: internal error: process exited while connecting to monitor: qemu-system-x86_64: -foo: invalid option

  ... fix the option ...

  # virsh start guest
  error: Failed to start domain guest
  error: Cannot open log file: '/var/log/libvirt/qemu/guest-fs0-virtiofsd.log': Device or resource busy
  #

Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 15:20:12 +01:00
Jiri Denemark
bd154804b2 schema: Add support for high TSC frequency
The unsignedInt XML schema type allows for values up to 2^32 - 1, i.e.,
using 4294967296 or greater TSC frequency would fail schema validation.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2020-11-11 13:08:45 +01:00
Matt Coleman
c996f879ba domain_conf: make virDomainVsockDefFormat() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
9905883013 domain_conf: make virDomainShmemDefFormat() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
825f0cc3a6 domain_conf: make virDomainPanicDefFormat() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
83959e6a30 domain_conf: make virDomainLeaseInsert() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
56dab2f0b3 domain_conf: make virDomainLeaseInsertPreAlloc() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
28a8699316 domain_conf: use g_renew in virDomainLeaseInsertPreAlloc()
Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
53a1aa1759 domain_conf: make virDomainControllerInsert() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
736c9ea02d domain_conf: make virDomainDiskInsert() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
81e91f6a93 domain_conf: use g_renew in virDomainDiskInsert() and virDomainControllerInsert()
Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
8f80014299 domain_conf: make virDomainDiskSetBlockIOTune() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
82966a0104 domain_conf: make virDomainChrSourceDefFormat() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
10ad796901 domain_conf: make virDomainDefFormatBlkiotune() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
a252153391 domain_conf: make virDomainIOMMUDefFormat() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
dca92b2203 domain_conf: make virDomainRedirFilterDefFormat() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
479a8c1fa1 domain_conf: make virDomainVirtioNetGuestOpts/HostOpts/DriverFormat() void
These functions always return zero, so they might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
154b3f4256 domain_conf: make virDomainControllerDriverFormat() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
e16ca44ab3 domain_conf: make virDomainDiskDefFormatDriver() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
02e7466f76 domain_conf: make virDomainDiskDefFormatIotune() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
97914d039d domain_conf: make virDomainDiskSourceFormatNetwork() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
695cdc0736 domain_conf: make virDomainLeaseDefFormat() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
f54661e0a2 domain_conf: make virDomainGraphicsDefParseXMLEGLHeadless() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
5c11e165fd domain_conf: make virDomainChr/RNG/Video/VsockDefPostParse() and virDomainNVRAMDefFormat() void
These functions always return zero, so they might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
5a2f5ebec6 domain_conf: make virDomainDeviceInfoFormat() void
This function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
93b13d49f3 domain_conf: make virDomainHostdevAssignAddress() void
The function always returns zero, so it might as well be void.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
0f3cedc676 domain_conf: make virDomainPostParseCheckISCSIPath() void
The function only returns zero or aborts, so it might as well be void.
This has the added benefit of simplifying the code that calls it.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Matt Coleman
3245d48b86 domain_conf: make virDomainDiskSetDriver() void
The function only returns zero or aborts, so it might as well be void.
This has the added benefit of simplifying the code that calls it.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-11 12:53:11 +01:00
Daniel P. Berrangé
4152868620 scripts: trim "__attribute__((packed))" in RPC struct diff
i686 builds on x86_64 host on Debian 10 result in the RPC structs
getting "__attribute__((packed))" annotations added to them. This is
harmless since we know the XDR protocol aligns and pads struct fields
suitably on the wire. Thus we can safely cull the attribute before doing
the diff comparison.

Reviewed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-11 11:13:25 +00:00
Daniel P. Berrangé
d63764f8bc gitlab: run unit tests in i686 cross build
In most cross builds we can't run tests since we can't assume QEMU user
mode emulators are loaded. i686 is special though because x86_64 can run
i686 natively, so we should run unit tests there.

The key benefit is that this gives us 32-bit unit test coverage in CI.

Reviewed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-11 11:13:25 +00:00
Lin Ma
d44a8203e7 Add lifecycle action completion to set-lifecycle-action command
Signed-off-by: Lin Ma <lma@suse.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-10 18:34:33 +01:00
Lin Ma
bb331d90b8 virsh: Add lifecycle type completion to set-lifecycle-action command
Signed-off-by: Lin Ma <lma@suse.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-10 18:34:31 +01:00
Lin Ma
96d01ce969 virsh: Add signal name completion to send-process-signal command
Signed-off-by: Lin Ma <lma@suse.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-10 18:34:29 +01:00
Lin Ma
7a975279b1 virsh: Move/add some of function declarations to virsh-domain.h
The upcoming patches introduce completers into virsh-completer-domain.c,
They will invoke the functions which are defined in virsh-domain.c, So
these functions need to be declared in virsh-domain.h.

Signed-off-by: Lin Ma <lma@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-10 18:34:26 +01:00
Lin Ma
aa54cb9d35 virsh: Add mac completion to net-dhcp-leases command
Signed-off-by: Lin Ma <lma@suse.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-10 18:34:23 +01:00
Lin Ma
8a4343a436 vsh: Fix completion error in case of multiple mac addresses
We know that the bash completer automatically handle colon by preceding
it with an escape character backslash.
While our bash autompletion file vsh completes multiple items, In case
there're multiple items which have same prefix and the content of completion
items contain colon(say mac address), The vsh needs to correctly hands
the backslash which are added by bash completer, Otherwise the completion
won't be successful. This patch fixes this problem.

e.g.:

 # virsh domiflist --domain VM
 Interface   Type      Source    Model    MAC
-------------------------------------------------------------
 vnet0       network   default   virtio   52:54:00:fb:7b:f5
 vnet1       bridge    br0       virtio   52:54:00:80:1b:21

Before:
 # virsh detach-interface --domain VM --mac <TAB>
 # virsh detach-interface --domain VM --mac 52\:54\:00\:<TAB><TAB>

After:
 # virsh detach-interface --domain VM --mac <TAB>
 # virsh detach-interface --domain VM --mac 52\:54\:00\:<TAB><TAB>
 52:54:00:80:1b:21  52:54:00:fb:7b:f5
 # virsh detach-interface --domain VM --mac 52\:54\:00\:

Signed-off-by: Lin Ma <lma@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-10 18:34:18 +01:00
Lin Ma
f2fbf2dc95 virsh: Add interface name completion to iface-mac command
Signed-off-by: Lin Ma <lma@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-10 18:34:16 +01:00
Lin Ma
498046daa6 virsh: Add interface name completion to iface-bridge command
Signed-off-by: Lin Ma <lma@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-10 18:34:13 +01:00
Lin Ma
bfb82029a1 virsh: Add interface mac completion to iface-name command
Signed-off-by: Lin Ma <lma@suse.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-10 18:34:11 +01:00
Lin Ma
9b751469ea virsh-interface: Add a static helper virshInterfaceStringHelper
It will be helpful to get the desired string of interface name/mac in a
consistent way.

Signed-off-by: Lin Ma <lma@suse.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-10 18:34:07 +01:00
Lin Ma
f8b3e98a01 virsh: Add serial/parallel device name completion to console command
Signed-off-by: Lin Ma <lma@suse.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-10 18:34:04 +01:00
Lin Ma
4583a49ccf virsh: Add logical CPU IDs completion for nodecpustats command
Signed-off-by: Lin Ma <lma@suse.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-10 18:34:02 +01:00
Lin Ma
a9327362cd virsh: Add vcpu list completion to guestvcpus command
Signed-off-by: Lin Ma <lma@suse.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-10 18:33:59 +01:00
Pavel Hrdina
43ee7c6db1 virgdbus: fix getting non-shared DBus connection
We need to pass some flags in order to properly initialize the
connection otherwise it will not work. This copies what GLib does
for g_bus_get_sync() internally.

This fixes an issue with LXC driver where libvirt was not able to
register any VM with machined.

Reported-by: Matthias Maier <tamiko@gentoo.org>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-11-09 23:42:33 +01:00
Daniel P. Berrangé
18c73a4c70 meson: drop use of .path() for python args
When using .path() for an argument to a python script meson will not
setup dependancies on the file. This means that changes to the generator
script will not trigger a rebiuld

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-09 16:32:55 +00:00
Daniel P. Berrangé
09a221c085 meson: ensure python script is run in utf8 env
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-09 16:32:49 +00:00
Daniel P. Berrangé
2a917e6756 Fix name prefix of VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE
The enum constant names should all have a prefix that matches the enum
name. VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE was missing the "CREATE_"
part of the name prefix.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-09 16:29:06 +00:00
Matt Coleman
c8583f9cc0 news: drop support for Windows versions prior to 2012R2
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Matt Coleman <matt@datto.com>
2020-11-09 15:26:02 +00:00
Matt Coleman
35f6c6174d docs: drop support for Windows versions prior to 2012R2
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Matt Coleman <matt@datto.com>
2020-11-09 15:26:02 +00:00