- 12 5月, 2020 21 次提交
-
-
由 Peter Krempa 提交于
SD cards need to be instantiated via -drive if=sd. This means that all cases where we use the blockdev path need to be special-cased for SD cards. Note that at this point QEMU_CAPS_BLOCKDEV is still cleared if the VM config has a SD card. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Use the drive alias for all cases when we can't generate qomName. This is meant to handle disks on 'sd' bus which are instantiated via -drive if=sd as there isn't any specific QOM name for them. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
We still have to use -drive to instantiate sd disks. Combining that with the new logic for blockjobs would be very complicated and not worth it given that 'sd' cards work only on few rarely used machine types of non-common architectures and libvirt didn't implement support for 'sd' bus controllers. This will allow us to use -blockdev for other kinds on such machines while sacrificing block jobs. Note: this is currently no-op as we mask-out the QEMU_CAPS_BLOCKDEV capability if any of the disks has bus='sd'. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
We can't set the type of the device on the 'sd' bus and realistically a cdrom doesn't even make sense there. Forbid it. Note that the output of in disk-cdrom-bus-other.x86_64-latest.args switched to blockdev as it's no longer locked out due to use of a disk on 'sd' bus. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
The 'vexpress-a9' ARM board supports the native 'sd' bus as well as virtio. Add a test case for proving that upcoming changes to handling of 'sd' work. This config was also tested with real qemu and the qemu process starts correctly. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
In case of 'sd' cards we'll use pre-blockdev code also if qemu supports blockdev. In that specific case we'll need to mask out blockdev support for 'sd' disks. Plumb in a boolean to allow it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Make sure that we don't try to reload node names with -blockdev. If something doesn't have a node name the update will not make the situation better. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
There are no users for the qemu-specific enum values. Remove it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
There's no point using the qemu-specific disk bus names in the error message. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Remove all the universal code since the 'else' part formats commandline only for the SD card based disk. Note that we can use virDiskNameToIndex without the check as we already validate that 'disk->dst' contains a properly formatted string in the validation code. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
For 'SD' disks and floppies in the pre-blockdev era we don't format -device. Extract the logic so that it's more clear and add comments. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
The function effectively boils down to whether the disk is 'SD'. Since we'll need to make more decisions based on the fact whether the disk is on the SD bus, rename the function. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Remove the function and passing of 'def' through the callers. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Previously we've validated it in qemuCheckDiskConfig which was directly called from the command line generator. Move the checks to the validator where they belong. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Move the code from qemuCheckDiskConfigBlkdeviotune in src/qemu/qemu_commandline.c to qemuValidateDomainDeviceDefDiskBlkdeviotune. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Agregate validation of frontend properties in a new function called qemuValidateDomainDeviceDefDiskFrontend. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Switch to DO_TEST_CAPS_LATEST for all of them and also add pre-blockdev case for 'disk-discard' as we had it before. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Move the tests to DO_TEST_CAPS_LATEST. Since switch to blockdev stopped us formatting the tunning parameters on the command line let's also add version cases for qemu-4.1 data which doesn't enable blockdev. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Laine Stump 提交于
When firewalld is stopped, it removes *all* iptables rules and chains, including those added by libvirt. Since restarting firewalld means stopping and then starting it, any time it is restarted, libvirt needs to recreate all the private iptables chains it uses, along with all the rules it adds. We already have code in place to call networkReloadFirewallRules() any time we're notified of a firewalld start, and networkReloadFirewallRules() will call networkPreReloadFirewallRules(), which calls networkSetupPrivateChains(); unfortunately that last call is called using virOnce(), meaning that it will only be called the first time through networkPreReloadFirewallRules() after libvirtd starts - so of course when firewalld is later restarted, the call to networkSetupPrivateChains() is skipped. The neat and tidy way to fix this would be if there was a standard way to reset a pthread_once_t object so that the next time virOnce was called, it would think the function hadn't been called, and call it again. Unfortunately, there isn't any official way of doing that (we *could* just fill it with 0 and hope for the best, but that doesn't seem very safe. So instead, this patch just adds a static variable called chainInitDone, which is set to true after networkSetupPrivateChains() is called for the first time, and then during calls to networkPreReloadFirewallRules(), if chainInitDone is set, we call networkSetupPrivateChains() directly instead of via virOnce(). It may seem unsafe to directly call a function that is meant to be called only once, but I think in this case we're safe - there's nothing in the function that is inherently "once only" - it doesn't initialize anything that can't safely be re-initialized (as long as two threads don't try to do it at the same time), and it only happens when responding to a dbus message that firewalld has been started (and I don't think it's possible for us to be processing two of those at once), and even then only if the initial call to the function has already been completed (so we're safe if we receive a firewalld restart call at a time when we haven't yet called it, or even if another thread is already in the process of executing it. The only problematic bit I can think of is if another thread is in the process of adding an iptable rule at the time we're executing this function, but 1) none of those threads will be trying to add chains, and 2) if there was a concurrency problem with other threads adding iptables rules while firewalld was being restarted, it would still be a problem even without this change. This is yet another patch that fixes an occurrence of this error: COMMAND_FAILED: '/usr/sbin/iptables -w10 -w --table filter --insert LIBVIRT_INP --in-interface virbr0 --protocol tcp --destination-port 67 --jump ACCEPT' failed: iptables: No chain/target/match by that name. In particular, this resolves: https://bugzilla.redhat.com/1813830Signed-off-by: NLaine Stump <laine@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Laine Stump 提交于
networkSetupPrivateChains() is currently called only once per run of libvirtd, so it can assume that errInitV4 and errInitV6 are empty/null when it is called. In preparation for potentially calling this function multiple times during one run, this patch moves the reset of errInitV[46] to the top of the function, to assure no memory is leaked. Signed-off-by: NLaine Stump <laine@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 11 5月, 2020 6 次提交
-
-
由 Michal Privoznik 提交于
As suggested in the linked bug, libvirt should firstly check whether the major number of the device is device mapper major. Because if it isn't subsequent DM_DEVICE_DEPS task may not only fail, but also yield different results. In the bugzilla this is demonstrated by creating a devmapper target named 'loop0' and then creating loop target /dev/loop0. When the latter is then passed to a domain, our virDevMapperGetTargetsImpl() function blindly asks devmapper to provide target dependencies for /dev/loop0 and because of the way devmapper APIs work, it will 'sanitize' the input by using the last component only which is 'loop0' and thus return different results than expected. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1823976Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
This format is much easier to tweak and update. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
It's been more than six months since we adopted GLib and we've been pretty aggressive at replacing our homegrown APIs with more standard ones, so by now most of the symbols mentioned in this document haven't been around for quite a long time already. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
With the move to GitLab CI one of the things we miss from Jenkins is a single page dashboard showing CI status across all projects. This is a very simple replacement that uses badges for CI pipeline status. A CSS tweak is needed because RST->HTML adds redundant <p> tags inside table cells which causes excessive vertical whitespace to appear. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
We have a framework to register cleanup callbacks that are run when a domain is shut down. The idea is to run callbacks in reverse order than they were registered. However, looking at the code this is not the case. Fortunately, this framework is used to register a single callback and a single callback only - qemuMigrationDstPrepareCleanup() - therefore there was no problem just yet. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 08 5月, 2020 4 次提交
-
-
由 Jim Fehlig 提交于
Commit a13b2905 missed an adjustment to a test that is only run when building against xen <= 4.9, where LIBXL_HAVE_BUILDINFO_NESTED_HVM is not defined. Adjust fullvirt-cpuid-legacy-nest test similar to the others. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Artur Puzio 提交于
When no video device is specified in config we should set both hvm.nographic to 1 and hvm.vga.kind to NONE. Without hvm.vga.kind=LIBXL_VGA_INTERFACE_TYPE_NONE both -nographic and -device 'cirrus-vga' are on qemu cmdline. Signed-off-by: NArtur Puzio <contact@puzio.waw.pl> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
qemu:///embed由 Andrea Bolognani 提交于
Turns out that it's not enough to pass the qemu:///embed root to virQEMUDriverConfigNew(), you also have to make sure the same string is copied into the virQEMUDriver structure yourself, and not doing so in our case resulted in the cleanup never happening and in distcheck failing because of that. On the other hand, actually setting config->embeddedRoot would result in different paths being generated for each test run, which would obviously break qemuxml2argvtest, so that's not an option either. This reverts commit d98cc196. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
qemu:///embed由 Andrea Bolognani 提交于
Now that the QEMU driver natively supports storing all its runtime data inside an arbitrary directory, we can avoid having multiple copies of the same logic in the test suite. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 07 5月, 2020 3 次提交
-
-
由 Daniel P. Berrangé 提交于
To attempt to catch unit tests which accidentally create files in $HOME, or $XDG_RUNTIME_DIR, poison these env vars by pointing them to directories which don't exist. This should give easier to debug test failures. For example: $ VIR_TEST_DEBUG=1 ./qemuhotplugtest Could not initialize HostdevManager - operation failed: Failed to create state dir '/bad-test-used-env-xdg-runtime-dir/libvirt/hostdevmgr' Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Fix win32 keycode for VK_OEM_102 Reviewed-by: NLaine Stump <laine@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
We need to prevent accidental deletion of release tags and maint branches. We need to ensure that shared CI runners are enabled on all repos. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 06 5月, 2020 6 次提交
-
-
由 Andrea Bolognani 提交于
We need this for all tests that use virHostdevManager, because during creation of this object for unprivileged connections like those used in the test suite we would end up writing inside the user's home directory. That's bad manners in general, but when running the test suite inside a purposefully constrained environment such as the one exposed by pbuilder, it turns into an outright test failure: Could not initialize HostdevManager - operation failed: Failed to create state dir '/nonexistent/.cache/libvirt/hostdevmgr' Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Andrea Bolognani 提交于
The churn in the output files is caused primarily by the fact that blockdev support has been introduced. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Andrea Bolognani 提交于
The churn in the output files is caused primarily by the fact that replies were generated on a POWER9 machine, which is good because we didn't have coverage of that before. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel P. Berrangé 提交于
So that we don't have to chase frequent Fedora releases, move the non-build related jobs onto the long life CentOS 8 distro. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
Currently, qemucapsprobe fails when libvirt is not already installed on the system: $ ./tests/qemucapsprobe /path/to/qemu-system-ppc64 >/dev/null I/O warning : failed to load external entity "/usr/share/libvirt/cpu_map/index.xml" 2020-05-06 09:49:59.136+0000: 269822: info : libvirt version: 6.4.0 2020-05-06 09:49:59.136+0000: 269822: info : hostname: [...] 2020-05-06 09:49:59.136+0000: 269822: warning : virQEMUCapsLogProbeFailure:5127 : Failed to probe capabilities for /path/to/qemu-system-ppc64: XML error: failed to parse xml document '/usr/share/libvirt/cpu_map/index.xml' It would be great if the tool could work entirely out of the build directory, and this patch achieves just that. Suggested-by: NPeter Krempa <pkrempa@redhat.com> Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-