- 17 12月, 2018 1 次提交
-
-
由 Radostin Stoyanov 提交于
There is a limit on the number of lines in the /proc/<pid>/{g,u}id_map files. In Linux 4.14 and earlier, this limit was (arbitrarily) set at 5 lines. Since Linux 4.15, which was released on 28 Jan 2018, the limit is 340 lines. This change is documented in user_namespaces(7). https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6397fac4915ab3002dc15aae751455da1a852f25Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
- 14 12月, 2018 19 次提交
-
-
由 Daniel P. Berrangé 提交于
A missing $(AM_V_GEN) meant the raw command was printed by mistake. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
We must do a substring match, not an exact match since there can be an arbitrary virtual path prepended. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Peter Krempa 提交于
Simplify adding of new errors by just adding them to the array of messages rather than having to add conversion code. Additionally most of the messages add the format string part as a suffix so we can avoid some of the duplication by using a macro which adds the suffix to the original string. This way most messages fit into the 80 column limit and only 3 exceed 100 colums. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Erik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
Clarify how @info is used and what the returned values look like. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
Make sure that we don't add any broken error message strings any more. This ensures that both the version with and without additional info is populated, the version without info does not have any formatting modifiers and the version with info has exactly one. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
Simplify wording of the error string for VIR_ERR_OPEN_FAILED and VIR_ERR_CALL_FAILED. The error codes itself are currently unused so it will not impact any client. This will simplify upcomming patch which refactors how we convert these. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
Few error codes were missing the version of the message with additional info. In case of the modified messages it's not very likely they'll ever report any additional data, but for the sake of consistency we should provide them. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
Additional information for an error message is either in form of a string or empty. Fix two offenders. One used %d as the format modifier and the second one always expected a string. Thankfully, neither of the offenders are currently in effect. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
We do have one for the error domain but not for the error number itself. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Daniel P. Berrangé 提交于
Require that all headers are guarded by a symbol named LIBVIRT_$FILENAME where $FILENAME is the uppercased filename, with all characters outside a-z changed into '_'. Note we do not use a leading __ because that is technically a namespace reserved for the toolchain. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
This introduces a syntax-check script that validates header files use a common layout: /* ...copyright header... */ <one blank line> #ifndef SYMBOL # define SYMBOL ....content.... #endif /* SYMBOL */ For any file ending priv.h, before the #ifndef, we will require a guard to prevent bogus imports: #ifndef SYMBOL_ALLOW # error .... #endif /* SYMBOL_ALLOW */ <one blank line> The many mistakes this script identifies are then fixed. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Erik Skultety 提交于
For some reason, xdr_free uses char * instead of void * for its 2nd argument which is passed to a custom free routine. Commit dc54b3ec missed this detail which made the build fail on a number of platforms. Fix it by explicitly casting the object pointer to char * just like we do in other places throughout the code base. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Pavel Hrdina 提交于
When libvirt is reconnecting to running domain that uses cgroup v2 the QEMU process reports cgroup for the emulator directory because the main thread is in that cgroup. We need to remove the "/emulator" part in order to match with the root cgroup directory name for that domain. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
The rewrite to support cgroup v2 missed this function. In cgroup v2 we have different files to track tasks. We would fail to remove cgroup on non-systemd OSes if there is any extra process assigned to guest cgroup because we would not kill any process form the guest cgroup. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 John Ferlan 提交于
Turns out there some build platforms that must not define MOUNT or VGCHANGE in config.h... So moving the commands from the storage backend specific module into a common storage_util module causes issues for those platforms. So instead of assuming they are there, let's just pass the command string to the storage util API's from the storage backend specific code (as would have been successful before). Also modify the test to determine whether the MOUNT and/or VGCHANGE doesn't exist and just define it to (for example) what Fedora has for the path. Could have just used "mount" and "vgchange" in the call, but that defeats the purpose of adding the call to virTestClearCommandPath. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Daniel P. Berrangé 提交于
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The make_nonnull_XXX methods can all fail due to OOM but this was being silently ignored and thus also not checked by callers. Make the methods propagate errors and use ATTRIBUTE_RETURN_CHECK to force callers to deal with it. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
In many files there are header comments that contain an Author: statement, supposedly reflecting who originally wrote the code. In a large collaborative project like libvirt, any non-trivial file will have been modified by a large number of different contributors. IOW, the Author: comments are quickly out of date, omitting people who have made significant contribitions. In some places Author: lines have been added despite the person merely being responsible for creating the file by moving existing code out of another file. IOW, the Author: lines give an incorrect record of authorship. With this all in mind, the comments are useless as a means to identify who to talk to about code in a particular file. Contributors will always be better off using 'git log' and 'git blame' if they need to find the author of a particular bit of code. This commit thus deletes all Author: comments from the source and adds a rule to prevent them reappearing. The Copyright headers are similarly misleading and inaccurate, however, we cannot delete these as they have legal meaning, despite being largely inaccurate. In addition only the copyright holder is permitted to change their respective copyright statement. Reviewed-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 13 12月, 2018 15 次提交
-
-
由 John Ferlan 提交于
Support for nested KVM is handled via a kernel module configuration parameters values for kvm_intel, kvm_amd, kvm_hv (PPC), or kvm (s390). While it's possible to fetch the kmod config values via virKModConfig, unfortunately that is the static value and we need to get the current/dynamic value from the kernel file system. So this patch adds a new API virHostKVMSupportsNesting that will search the 3 kernel modules to get the nesting value and check if it is 'Y' (or 'y' just in case) to return a true/false whether the KVM kernel supports nesting. We need to do this in order to handle cases where adjustments to the value are made after libvirtd is started to force a refetch of the latest QEMU capabilities since the correct CPU settings need to be made for a guest to add the "vmx=on" to/for the guest config. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1656255 If virSecretGetSecretString is using by secretLookupByUUID, then it's possible the found sec->usageType doesn't match the desired @secretUsageType. If this occurs for the encrypted volume creation processing and a subsequent pool refresh is executed, then the secret used to create the volume will not be found by the storageBackendLoadDefaultSecrets which expects to find secrets by VIR_SECRET_USAGE_TYPE_VOLUME. Add a check to virSecretGetSecretString to avoid the possibility along with an error indicating the incorrect matched types. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Han Han 提交于
Referring to commit fab2e49d, it should be one and only secret for encryption. Signed-off-by: NHan Han <hhan@redhat.com>
-
由 John Ferlan 提交于
Add the logical storage pool startup validation (xml2argv) tests. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
It's only pass as 0 or 1 and used as a bool, let's just use a bool Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Let's create helpers for each style of command line created. This primarily is easier on the eyes rather than the large multi line if-then-else-else clause used, but may also be useful if in the future any particular pool needs to add to the command line based on pool xml format. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Cover the case where @netauto would be used to create the command line in virStorageBackendFileSystemMountCmd. Essentially when the pool type is "netfs", but the "source.format" is empty, create the command line properly. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Similar to qemuxml2argv and storagevolxml2argv, let's create some tests to ensure that the XML generates a consistent command line. Using the same list of pools as storagepoolxml2xmltest, start with the file system tests (fs, netfs, netfs-cifs, netfs-gluster). Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Move into storage_util for reuse by test harness Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Move virStorageBackendFileSystemMountCmd to storage_util so that it can be used by the test harness. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Extract out the code that is used to create the MOUNT command for starting the pool. We can use this for Storage Pool XML to Argv testing to ensure code changes don't alter how a storage pool is started. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1624223 There are two ways to request memory preallocation on cmd line: -mem-prealloc and .prealloc attribute for a memory-backend-file. However, as it turns out it's not safe to use both at the same time. If -mem-prealloc is used then qemu will fully allocate the memory (this is done by actually touching every page that has been allocated). Then, if .prealloc=yes is specified, mbind(flags = MPOL_MF_STRICT | MPOL_MF_MOVE) is called which: a) has to (possibly) move the memory to a different NUMA node, b) can have no effect when hugepages are in play (thus ignoring user request to place memory on desired NUMA nodes). Prefer -mem-prealloc as it is more backward compatible compared to switching to "-numa node,memdev= + -object memory-backend-file". Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
So far we have two arguments that we are passing to qemuBuildMemoryBackendProps() and that are taken from domain private data: @qemuCaps and @autoNodeset. In the next commit I will use one more item from there. Therefore, instead of having it as yet another argument to the function, pass pointer to the private data object. There is one change in qemuDomainAttachMemory() where previously @autoNodeset was NULL but now is priv->autoNodeset (which may be set). This is safe to do as @autoNodeset is advisory only. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1624336 Add a check during virDomainDefCompatibleDevice whether the domain supports cold/hotplug of a memory module even though this duplicates the qemuDomainDefValidateMemoryHotplug check. Without this check, the cold/hot plug would fail on the subsequent mem_memory check (since it's 0). Adding a check for max_memory > 0 would allow the subsequent hotplug check to fail, but would cause coldplug to fail with the somewhat opaque message "no free memory device slot available". Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
If virDomainDefCompatibleDevice fails because there is insufficient domain def->mem.max_memory, then let's also print out that value in the error message. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 12 12月, 2018 5 次提交
-
-
由 Erik Skultety 提交于
The QEMU validation code for graphics has been in place for a while, but because it is only executed from virDomainDeviceInfoIterateInternal, it was never run, since the iterator expects the device to have boot info which graphics don't have. The unfortunate side effect of this whole mess was that a few capabilities were missing from the test suite (as commit d8266ebe demonstrated with graphics-spice-invalid-egl-headless test), which in turn meant that a few graphics tests which expected a failure happily accepted any failure the test runtime returned which made them succeed. The impact of this was that we then allowed to start a domain with multiple OpenGL-enabled graphics devices. This patch enables iteration over graphics devices. Unsurprisingly, a few tests started to fail as a result, so fix those too. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Erik Skultety 提交于
It's fairly easy to forget to add a capability to the list of capabilities for a negative test case which might yield (for us) very unfortunate results. Therefore, introduce negative versions of DO_TEST_CAPS_LATEST macros, so that real QEMU caps can be used with tests that expect a failure too. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Erik Skultety 提交于
Validation of domain devices is accomplished via a generic device iterator which takes a callback, iterates over all kinds of supported device types and invokes the callback on every single device. However, there might be cases when we need to alter the behaviour of the iteration (most notably skip or include a group of devices). Therefore, this patch introduces iterator flags. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Erik Skultety 提交于
Since the code was never run, it would have been very hard to spot this mistake, especially since the compiler can't really warn about it. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Julio Faracco 提交于
This commit includes a test case for multiple network definitions. It is useful right now, but it will be more useful when the index used by LXC version 3.X is implemented to support this new settings. The version 3.X is using indexes to specify each network settings. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-