Commit Graph

50357 Commits

Author SHA1 Message Date
Daniel P. Berrangé
d754500e5f ci: drop CentOS 8 Stream and refresh
This drops the CentOS 8 Stream distro target, since that is going EOL
at the end of May, at which point it will cease to be installable
due to package repos being archived.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-05-02 13:52:30 +01:00
Daniel P. Berrangé
8132d38120 ci: refresh with latest lcitool manifest
This brings in a fix to the job rules which solves a problem with
jobs getting skipped in merge requests in some scenarios. It also
changes the way Cirrus CI vars are set, which involves a weak to
the way $PATH is set in build.yml.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-05-02 13:52:17 +01:00
Michal Privoznik
bc70aa1df3 scripts/meson-dist.py: Get builddir from env too
When meson runs a dist script it sets both MESON_BUILD_ROOT and
MESON_DIST_ROOT envvars [1]. But for some reason, we took the
former as an argument and obtained the latter via env. Well,
obtain both via env.

1: https://mesonbuild.com/Reference-manual_builtin_meson.html#mesonadd_dist_script
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-05-02 14:33:20 +02:00
Kristina Hanicova
c95cc67efb qemu: format machine virt ras feature and test it
Resolves: https://issues.redhat.com/browse/RHEL-7489
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-05-02 13:17:17 +02:00
Kristina Hanicova
a43007b3c4 qemu: validate machine virt ras feature
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-05-02 13:17:17 +02:00
Kristina Hanicova
aaf4196843 conf: parse and format machine virt ras feature
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-05-02 13:17:16 +02:00
Kristina Hanicova
ffaf77a30d qemu: introduce QEMU_CAPS_MACHINE_VIRT_RAS capability
The capability can be used to detect if the qemu binary already
supports 'ras' feature for 'virt' machine type.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-05-02 13:17:16 +02:00
Jiri Denemark
8c80acdec0 Post-release version bump to 10.4.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-05-02 11:10:01 +02:00
Jiri Denemark
bcb3cfb5f8 Release of libvirt-10.3.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-05-02 11:07:09 +02:00
Michal Privoznik
ad3796c5ca NEWS: Document my contributions for upcoming release
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-05-02 10:28:07 +02:00
Göran Uddeborg
311284b3d8 Translated using Weblate (Swedish)
Currently translated at 71.0% (7403 of 10423 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>
2024-05-02 08:13:07 +02:00
Peter Krempa
310bf2e2ac NEWS: Document TLS migration bug, usb-net support and two fixes
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-04-30 14:08:29 +02:00
Peter Krempa
e9523fa1db NEWS: Fix marking of 'path' as inline literal
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2024-04-30 14:06:55 +02:00
김인수
63f00d09e3 Translated using Weblate (Korean)
Currently translated at 100.0% (10423 of 10423 strings)

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

Signed-off-by: 김인수 <simmon@nplob.com>
2024-04-30 06:35:54 +02:00
Remus-Gabriel Chelu
3055e9805d Translated using Weblate (Romanian)
Currently translated at 0.8% (89 of 10423 strings)

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

Signed-off-by: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>
2024-04-28 07:54:24 +02:00
Weblate
66bd25ce50 Translated using Weblate (Romanian)
Currently translated at 0.7% (74 of 10423 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-04-28 01:24:04 +02:00
Remus-Gabriel Chelu
2112b3b8ba Translated using Weblate (Romanian)
Currently translated at 0.7% (74 of 10423 strings)

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

Signed-off-by: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>
2024-04-28 01:24:04 +02:00
Weblate
76d7d9b4e4 Translated using Weblate (Romanian)
Currently translated at 0.6% (69 of 10423 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-04-28 01:21:23 +02:00
Remus-Gabriel Chelu
59f029803a Translated using Weblate (Romanian)
Currently translated at 0.6% (69 of 10423 strings)

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

Signed-off-by: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>
2024-04-28 01:21:22 +02:00
Remus-Gabriel Chelu
55031eab99 Translated using Weblate (Romanian)
Currently translated at 0.4% (43 of 10423 strings)

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

Signed-off-by: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>
2024-04-27 11:40:22 +02:00
Weblate
f7ff831722 Translated using Weblate (Romanian)
Currently translated at 0.3% (32 of 10423 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-04-27 10:15:47 +02:00
Remus-Gabriel Chelu
9d6144c0e8 Translated using Weblate (Romanian)
Currently translated at 0.3% (32 of 10423 strings)

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

Signed-off-by: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>
2024-04-27 10:15:47 +02:00
Göran Uddeborg
8680805a04 Translated using Weblate (Swedish)
Currently translated at 70.8% (7383 of 10423 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-04-27 10:15:46 +02:00
Weblate
7a19175876 Translated using Weblate (Romanian)
Currently translated at 0.1% (11 of 10423 strings)

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

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-04-27 10:04:13 +02:00
Remus-Gabriel Chelu
6da62e6fa2 Translated using Weblate (Romanian)
Currently translated at 0.1% (11 of 10423 strings)

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

Signed-off-by: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>
2024-04-27 10:04:12 +02:00
Göran Uddeborg
047395263b Translated using Weblate (Swedish)
Currently translated at 70.7% (7378 of 10423 strings)

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

Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
2024-04-27 10:04:11 +02:00
Weblate
08e22b3c06 Translated using Weblate (Romanian)
Currently translated at 0.1% (3 of 10423 strings)

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

Co-authored-by: Weblate <noreply-mt-weblate@weblate.org>
Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2024-04-27 09:57:59 +02:00
Remus-Gabriel Chelu
6aa5168d17 Translated using Weblate (Romanian)
Currently translated at 0.1% (3 of 10423 strings)

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

Co-authored-by: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>
Signed-off-by: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>
2024-04-27 09:57:58 +02:00
Yuri Chornoivan
4f30c9273d Translated using Weblate (Ukrainian)
Currently translated at 100.0% (10423 of 10423 strings)

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

Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
2024-04-27 09:57:58 +02:00
Göran Uddeborg
d70e08dd45 Translated using Weblate (Swedish)
Currently translated at 70.6% (7363 of 10423 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>
2024-04-27 09:57:57 +02:00
김인수
f0563789b6 Translated using Weblate (Korean)
Currently translated at 100.0% (10423 of 10423 strings)

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

Co-authored-by: 김인수 <simmon@nplob.com>
Signed-off-by: 김인수 <simmon@nplob.com>
2024-04-27 09:57:57 +02:00
Weblate
4a87181005 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Co-authored-by: Weblate <noreply@weblate.org>
Signed-off-by: Fedora Weblate Translation <i18n@lists.fedoraproject.org>
2024-04-27 09:57:55 +02:00
Jiri Denemark
51589f154d po: Refresh potfile for v10.3.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-04-26 10:19:09 +02:00
Göran Uddeborg
966b394216 Translated using Weblate (Swedish)
Currently translated at 70.3% (7345 of 10438 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>
2024-04-25 21:48:00 +02:00
Peter Krempa
5540c3d241 vsh: Refactor logic in vshCommandParse
Refactor the existing logic using two nested loops with a jump into the
middle of both with 3 separate places fetching next token to a single
loop using a state machine with one centralized place to fetch next
tokens and add explanation comments.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-25 14:13:20 +02:00
Peter Krempa
c27070f738 vsh: Move option assignment debugging from vshCommandParse to vshCmdOptAssign
As we now have a centralized point to assign values to options move the
debugging logic there.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-25 14:13:19 +02:00
Peter Krempa
166fe3c7b5 vshCmddefCheckInternals: Remove check for "too many options"
This check was needed due to the use "unsigned long long" as bitmap
which was refactored recently.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-25 14:13:19 +02:00
Peter Krempa
bf3e734fac vsh: Refactor parsed option and command assignment
Refactor the very old opaque logic (using multiple bitmaps) by
fully-allocating vshCmdOpt for each possible argument and then filling
them as they go rather than allocating them each time after it's parsed.

This simplifies the checkers and removes the need to cross-reference
multiple arrays.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-25 14:13:19 +02:00
Peter Krempa
22cf91618d vsh: Unexport command lookup helpers 'vshCmddefSearch', 'vshCmdGrpSearch', 'vshCmdGrpHelp'
Neither of them is used outside of vsh.c. 'vshCmddefSearch' needed to be
rearranged as it was called earlier in vsh.c than it was defined.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-25 14:13:19 +02:00
Peter Krempa
41efec103d vsh: Remove unused infrastructure for command completion
Remove the old helpers which were used previously to pick which field to
complete.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-25 14:13:19 +02:00
Peter Krempa
da3c5638f9 virsh: Introduce new 'VSH_OT_ARGV' accessors
In preparation for internal parser refactor introduce new accessors for
the VSH_OT_ARGV type which will return a NULL-terminated string list or
even a concatenated string for the given argument.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-25 14:13:19 +02:00
Peter Krempa
1818cbda3b vsh: Rework logic for picking which argument is to be completed
Currently the code decides which option to complete by looking into the
input string and trying to infer it based on whether we are at the
end position as we truncate the string to complete to the current cursor
position.

That basically means that only the last-parsed option will be up for
completion.

Replace the logic by remembering which is the last option rather than
using two different position checks and base the completion decision on
that and the actual value of the last argument (see comment).

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-25 14:13:19 +02:00
Peter Krempa
b41bde935d virshtest: Add test cases for command completion helper
Add both single invocations as well as a script containing the same
commands.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-25 14:13:19 +02:00
Peter Krempa
9950aef282 vsh: Add a VSH_OT_STRING argument for 'virsh echo'
The argument will be used for testing the command/option completer
function.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-25 14:13:19 +02:00
Peter Krempa
bb9bb55211 vsh: Fix 'stdin' closing in 'cmdComplete'
While the 'complete' command is meant to be hidden and used only for
the completion script, there's nothing preventing it being used in all
virsh modes.

This poses a problem as the command tries to close 'stdin' to avoid the
possibility that an auth callback would want to read the password.

In interactive mode this immediately terminates virsh and in
non-interactive mode it attempts to close it multiple times if you use
virsh in batch mode.

Fix the issues by using virOnce() to close it exactly once and do so
only in non-interactive mode.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-25 14:13:19 +02:00
Peter Krempa
0d687d13ed tools: Rename vshCommandOptStringReq to vshCommandOptString
Shorten the function name as there isn't any vshCommandOptString.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-25 14:13:19 +02:00
Peter Krempa
9a4752ca5b meson: tests: Add 'virsh' as dependency of 'virshtest'
Ensure that virsh is rebuilt if needed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-04-25 14:13:19 +02:00
Peter Krempa
dbf7b727fb vshReadlineInit: Initialize only once
'vshReadlineInit' is called when interactive virsh is started but also
on each call to 'cmdComplete'. Calling it repeatedly (using the
'complete' command interactively, or multiple times in batch mode) leaks
the buffers for history file configuration.

Avoid multiple setups of this function by returning success in case the
history file config is already present.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-25 14:13:19 +02:00
Peter Krempa
41400ac1dd vsh: cmdComplete: Don't leak buffer for completion
The buffer which we assign to the 'rl_line_buffer' variable of readline
would be overwritten and thus leaked on multiple invocations of
cmdComplete in one session.

Free/clear it after it's used.

Hitting this leak was until recenly possible only in non-interactive
batch mode and recently also in interactive mode as 'complete' can be
used multiple times now interactively.

Fixes: a0e1ada63c
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-04-25 14:13:19 +02:00
Michal Privoznik
ac9c3c0b2c virnetdevbandwidth.c: Put a limit to "quantum"
The "quantum" attribute of HTB is documented as:

  Number of bytes to serve from this class before the scheduler
  moves to the next class.

Since v1.3.2-rc1~225 we compute what we think is the appropriate
value and pass it on the TC command line. But kernel and
subsequently TC use uint32_t to store this value. If we compute
value outside of this type then TC fails and prints usage which
we then interpret as an error message. Needlessly long error
message. While there's not much we can do about the latter, we
can put a cap on the value and stop tickling this behavior of TC.

Fixes: 065054daa7
Resolves: https://issues.redhat.com/browse/RHEL-34112
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-04-25 09:40:15 +02:00