Commit Graph

43208 Commits

Author SHA1 Message Date
Peter Krempa
021015148b qemuMonitorJSONGetStatus: Refactor cleanup
Use g_autofree for the JSON values to remove cleanup label and ret
variable.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-09-21 12:25:42 +02:00
Peter Krempa
9d34136a52 util: virstring: Remove unused 'virStringListMerge'
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-09-21 12:25:42 +02:00
Peter Krempa
6c49c2ee9f virDevMapperGetTargets: Use a linked list as return type
Of the two callers one simply iterates over the returned paths and the
second one appends the returned paths to another linked list. Simplify
all of this by directly returning a linked list.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-09-21 12:25:42 +02:00
Peter Krempa
45ea6a9fcf util: virdevmapper: Sanitize use of macros for buffer size
There are two distinct uses of an arbitrary buffers size when querying
the device mapper. One is related to loading the /proc/devices file,
while the other is used as buffer for ioctls to the devmapper.

Split up the macros used here so that it's clear that they are not meant
for the same thing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-09-21 12:25:41 +02:00
Hiroki Narukawa
2d6d67e154 qemu: Implement virtio-blk queue-size option
The option "queue-size" in virtio-blk was added in qemu-2.12.0, and
default value increased from qemu-5.0.0.

However, increasing this value may lead to drop of random access
performance.

Signed-off-by: Hiroki Narukawa <hnarukaw@yahoo-corp.jp>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2021-09-21 12:22:49 +02:00
Hiroki Narukawa
ad209e7dbc qemu: add QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE capability
To support virtio-blk queue-size option, this commit adds capability
detection to the option.

Signed-off-by: Hiroki Narukawa <hnarukaw@yahoo-corp.jp>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2021-09-21 12:22:49 +02:00
Hiroki Narukawa
36560f3551 conf: add queue_size option to disk
The option "queue-size" for virtio-blk was added in qemu-2.12.0, and
default value increased from qemu-5.0.0.

However, increasing this value may lead to drop of random access
performance.

Signed-off-by: Hiroki Narukawa <hnarukaw@yahoo-corp.jp>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2021-09-21 12:22:48 +02:00
Hiroki Narukawa
240bdcbc93 virDomainDiskDefCheckABIStability: add disk queue count ABI stability check
virtio-blk num-queue is visible to guest OS, so this must be kept while
live migration.

Signed-off-by: Hiroki Narukawa <hnarukaw@yahoo-corp.jp>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2021-09-21 12:22:48 +02:00
Hiroki Narukawa
32967b891e qemuxml2*test: Make disk-virtio-queues tests use DO_TEST_CAPS_LATEST
Currently disk-virtio-queues test is now using specifying a fake
capability.

By this commit this test will make use of DO_TEST_CAPS_LATEST.

Signed-off-by: Hiroki Narukawa <hnarukaw@yahoo-corp.jp>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2021-09-21 12:22:48 +02:00
Michal Privoznik
b480a5cb5c vsh: Ensure that bool --options don't have completer
Let's check whether a boolean --option doesn't have completer or
completer_flags set. These options are just flags and don't
accept any value, thus they can't have any completer.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-09-21 10:20:41 +02:00
Michal Privoznik
a1a22b0b1c vsh: Extend checks for aliased commands
If a command is an alias, then it can only have .name, .flags and
.alias set and .flags should contain just VSH_CMD_FLAG_ALIAS.
Check if that's the case in self-test.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-09-21 10:20:41 +02:00
Michal Privoznik
520e858a8d virsh: Provide local path completer for vol-download --file
The vol-download command takes mandatory --file argument which
points to a local (possibly non-existent) path. If the file
exists then it's overwritten. Set the argument's completer so
that self-test doesn't report it as missing.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-09-21 10:20:41 +02:00
Michal Privoznik
8eefc7afc8 virsh: Provide local path completer for screenshot --file
The screenshot command takes optional --file argument which can
point to an existing local path (in which case the file is
overwritten). Set the argument's completer so that self-test
doesn't report it as missing.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-09-21 10:20:41 +02:00
Göran Uddeborg
bdac3a142c Translated using Weblate (Swedish)
Currently translated at 28.3% (2933 of 10353 strings)

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

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2021-09-20 15:16:58 +02:00
simmon
3bba8a81b5 Translated using Weblate (Korean)
Currently translated at 82.9% (8591 of 10353 strings)

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

Translated using Weblate (Korean)

Currently translated at 82.9% (8591 of 10353 strings)

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

Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
2021-09-20 15:16:58 +02:00
jason lee
764f288267 Translated using Weblate (Korean)
Currently translated at 82.9% (8591 of 10353 strings)

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

Translated using Weblate (Korean)

Currently translated at 80.9% (8378 of 10353 strings)

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

Co-authored-by: jason lee <ppark5237@gmail.com>
Signed-off-by: jason lee <ppark5237@gmail.com>
2021-09-20 15:16:58 +02:00
simmon
b10ae88c2a Translated using Weblate (Korean)
Currently translated at 80.9% (8378 of 10353 strings)

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

Translated using Weblate (Korean)

Currently translated at 79.3% (8219 of 10353 strings)

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

Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
2021-09-20 15:16:58 +02:00
jason lee
befc389286 Translated using Weblate (Korean)
Currently translated at 79.3% (8219 of 10353 strings)

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

Co-authored-by: jason lee <ppark5237@gmail.com>
Signed-off-by: jason lee <ppark5237@gmail.com>
2021-09-20 15:16:58 +02:00
simmon
0cda0282d6 Translated using Weblate (Korean)
Currently translated at 78.5% (8130 of 10353 strings)

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

Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
2021-09-20 15:16:58 +02:00
jason lee
92141d7b42 Translated using Weblate (Korean)
Currently translated at 78.5% (8130 of 10353 strings)

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

Co-authored-by: jason lee <ppark5237@gmail.com>
Signed-off-by: jason lee <ppark5237@gmail.com>
2021-09-20 15:16:58 +02:00
simmon
4b24481713 Translated using Weblate (Korean)
Currently translated at 78.1% (8095 of 10353 strings)

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

Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
2021-09-20 15:16:58 +02:00
jason lee
cecda44f06 Translated using Weblate (Korean)
Currently translated at 78.1% (8095 of 10353 strings)

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

Co-authored-by: jason lee <ppark5237@gmail.com>
Signed-off-by: jason lee <ppark5237@gmail.com>
2021-09-20 15:16:58 +02:00
simmon
5cf9189862 Translated using Weblate (Korean)
Currently translated at 73.2% (7583 of 10353 strings)

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

Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
2021-09-20 15:16:57 +02:00
jason lee
14b9b2ec9d Translated using Weblate (Korean)
Currently translated at 73.2% (7583 of 10353 strings)

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

Co-authored-by: jason lee <ppark5237@gmail.com>
Signed-off-by: jason lee <ppark5237@gmail.com>
2021-09-20 15:16:57 +02:00
simmon
4719f4eb26 Translated using Weblate (Korean)
Currently translated at 73.2% (7582 of 10353 strings)

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

Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
2021-09-20 15:16:57 +02:00
jason lee
bcb99773c6 Translated using Weblate (Korean)
Currently translated at 73.2% (7582 of 10353 strings)

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

Translated using Weblate (Korean)

Currently translated at 73.2% (7581 of 10353 strings)

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

Co-authored-by: jason lee <ppark5237@gmail.com>
Signed-off-by: jason lee <ppark5237@gmail.com>
2021-09-20 15:16:57 +02:00
simmon
ef1860529d Translated using Weblate (Korean)
Currently translated at 65.6% (6794 of 10353 strings)

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

Translated using Weblate (Korean)

Currently translated at 65.6% (6792 of 10353 strings)

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

Translated using Weblate (Korean)

Currently translated at 65.6% (6792 of 10353 strings)

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

Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
2021-09-20 15:16:57 +02:00
jason lee
1ffdfd4cff Translated using Weblate (Korean)
Currently translated at 65.6% (6792 of 10353 strings)

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

Translated using Weblate (Korean)

Currently translated at 63.6% (6585 of 10353 strings)

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

Co-authored-by: jason lee <ppark5237@gmail.com>
Signed-off-by: jason lee <ppark5237@gmail.com>
2021-09-20 15:16:57 +02:00
Jan Kuparinen
9eb6708f78 Translated using Weblate (Finnish)
Currently translated at 23.0% (2388 of 10353 strings)

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

Translated using Weblate (Finnish)

Currently translated at 22.9% (2377 of 10353 strings)

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

Translated using Weblate (Finnish)

Currently translated at 22.7% (2351 of 10353 strings)

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

Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
Signed-off-by: Jan Kuparinen <copper_fin@hotmail.com>
2021-09-20 15:16:57 +02:00
simmon
e3b6a3b8af Translated using Weblate (Korean)
Currently translated at 62.1% (6434 of 10353 strings)

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

Translated using Weblate (Korean)

Currently translated at 62.1% (6431 of 10353 strings)

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

Co-authored-by: simmon <simmon@nplob.com>
Signed-off-by: simmon <simmon@nplob.com>
2021-09-20 15:16:57 +02:00
jason lee
2234b4cb2d Translated using Weblate (Korean)
Currently translated at 62.1% (6431 of 10353 strings)

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

Translated using Weblate (Korean)

Currently translated at 55.9% (5792 of 10353 strings)

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

Co-authored-by: jason lee <ppark5237@gmail.com>
Signed-off-by: jason lee <ppark5237@gmail.com>
2021-09-20 15:16:56 +02:00
Daniel P. Berrangé
1a29ec8bc9 gitlab: remove obsolete job rules for TEMPORARILY_DISABLED variable
We previously had a 'rules:' entry that caused a job to be skipped if
the variable "TEMPORARILY_DISABLED" was set. This is no longer needed
since we can set a similar flag in ci/manifest.yml and re-generate
to temporarily skip a job.

Unfortunately the 'rules:' entry had an unexpected side-effect on
the pipelines that was never previously noticed. Instead of only
running pipelines on push, the mere existance of the 'rules:' entry
caused triggering of pipelines on merge requests too.

The newly auto-generated ci/gitlab.yml file does not have a 'rules:'
for the container job template, and thus only runs on git push.

The result is that build jobs try to run on merge requests and the
container jobs they depend on don't exist. This breaks the entire
pipeline with a message that the config is invalid due to broken
job dependencies.

This fixes a regression introduced in

  commit ccc7a44adb
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   Thu Sep 9 14:49:01 2021 +0100

    ci: re-generate containers/gitlab config from manifest

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-09-20 14:15:38 +01:00
Kristina Hanicova
19b77df5cc tools: virsh-snapshot: refactor small functions
This patch includes:
* removal of dead code
* simplifying nested if conditions
* removal of unnecessary variables
* usage of "direct" boolean return

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-20 09:35:22 +02:00
Tim Wiederhake
785a11cec8 Fix typos
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2021-09-17 14:28:00 +02:00
Peter Krempa
9d26af5e5b vsh: Move 'vshReadlineOptionsGenerator' out of '#if WITH_READLINE'
It's now also used in vshCompleteHelpCommand which is outside of the
conditionally compiled code.

Fixes: 80f70c74a7
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2021-09-17 11:00:13 +02:00
Peter Krempa
c580c8db70 virsh-completer: Provide completer for '--top' and '--base' for blockjobs
Complete with the indexed targets (e.g. vda[3]) based on existing
indexes.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-17 09:40:46 +02:00
Peter Krempa
071bab399a virsh: Introduce virshCompleteEmpty and use it for places where we can't suggest anything
For now this serves just as an annotation because readline and also the
bash completion script insist on completing local paths when an empty
list is returned.

This will serve for future reference once we'll be able to properly
refuse to suggest anything.

The completer is used for fields such as names for new objects,
description strings, password strings etc, URIs and hostnames which we
can't feasibly autocomplete.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-17 09:40:46 +02:00
Peter Krempa
2732d81984 virsh: Use 'virshCompletePathLocalExisting' for options reading local files
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-17 09:40:46 +02:00
Peter Krempa
16252b16b7 virsh: completer: Introduce dummy completer for local files
For now the completion does the correct thing of completing a local path
if NULL is returned.

Introduce 'virshCompletePathLocalExisting' and use it in the
'VIRSH_COMMON_OPT_FILE' macro.

This for now serves as an annotation for the function which want to read
a file on the host running virsh. In the future this can be used with a
more sophisticated implementation.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-17 09:40:46 +02:00
Peter Krempa
bc4739ed77 virsh: Expand VIRSH_COMMON_OPT_FILE for cases when it's not a local file used by virsh
In cases such as the APIs for managed save management, the file path
provided via the '--file' option is passed to the API.

We'll need to make them distinct from cases for when virsh is using the
file so that different completers can be used.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-17 09:40:46 +02:00
Peter Krempa
119b139c76 virsh: Provide completers for options taking comma separated list of disk targets
'--storage' of the 'undefine' command and '--migrate-disks' of the
'migrate' command take a list of disk targets as an argument.

We can simply combine 'virshDomainDiskTargetCompleter' with
'virshCommaStringListComplete' to provide the completions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-17 09:40:46 +02:00
Peter Krempa
80f70c74a7 vsh: Add completer for '--command' of 'help' command
Wrap 'vshReadlineCommandGenerator' into a function with proper prototype
to provide a completer for the help command.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-17 09:40:46 +02:00
Peter Krempa
f20512c414 virsh: Use 'virshStoragePoolNameCompleter' for two options
'--pool' of the 'pool-event' command and '--inputpool' of
'vol-create-from' use the above mentioned completer.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-17 09:40:46 +02:00
Peter Krempa
573385dc9c virsh-snapshot: Use 'virshSnapshotNameCompleter' for '--from' of 'snapshot-list'
When listing a snapshot tree, the '--from' option takes a name of a
snapshot to limit the subset. Use virshSnapshotNameCompleter as
completer for the option.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-17 09:40:46 +02:00
Peter Krempa
8f5b8fac33 vsh: Introduce '--completers-missing' for 'self-test' command
Make it simple to spot which options of which commands are missing
autocompletion functions by introducing this hidden option.

In the future when we'll have completers for everything this can be also
used as a hard fail so that completers are always added.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-17 09:40:46 +02:00
Peter Krempa
7f72ed0707 vshCmddefCheckInternals: Sanitize command alias validation
We don't need to validate the real command twice, but it's better to
check that the real command name exists and it's not an alias to prevent
loops.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-17 09:40:46 +02:00
Peter Krempa
1726c572a2 virsh: Remove hack using 'VSH_CMD_FLAG_ALIAS' to hide virsh commands
Introduce a proper flag 'VSH_CMD_FLAG_HIDDEN' for hiding commands from
output so that we can validate that there aren't any loops or
misconfigured commands.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-17 09:40:46 +02:00
Peter Krempa
4402bff1ec virsh-completer*.h: Use modern header style
Prevent the need to edit the function declarations to put them into the
header. There was even inconsistent use.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-17 09:40:46 +02:00
Peter Krempa
6246bc6601 virshCheckpointNameCompleter: Sanitize forward declaration use
Include the proper header instead of duplicating the declaration.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-17 09:40:46 +02:00
Jonathon Jongsma
eba98a1db9 docs: update nodedev driver docs for new mdev features
Add up-to-date information about creating and defining mediated devices
in libvirt.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-16 09:54:29 -05:00