- 27 7月, 2016 13 次提交
-
-
由 Peter Krempa 提交于
http(s), ftp(s) and tftp use URIs for volume definitions in the JSON pseudo protocol so it's pretty straightforward to add support for them.
-
由 Peter Krempa 提交于
JSON pseudo protocol for qemu allows to explicitly specify devices. Add convertor to the internal type.
-
由 Peter Krempa 提交于
Add a modular parser that will allow to parse 'json' backing definitions that are supported by qemu. The initial implementation adds support for the 'file' driver. Due to the approach qemu took to implement the JSON backing strings it's possible to specify them in two approaches. The object approach: json:{ "file" : { "driver":"file", "filename":"/path/to/file" } } And a partially flattened approach: json:{"file.driver":"file" "file.filename":"/path/to/file" } Both of the above are supported by qemu and by the code added in this commit. The current implementation de-flattens the first level ('file.') if possible and required. Other handling may be added later but currently only one level was possible anyways.
-
由 Peter Krempa 提交于
It's just read.
-
由 Erik Skultety 提交于
Since commit c4bdff19, the path to the configuration file has been constructed in the following manner: - if no config filename was passed to virConfLoadConfigPath, libvirt.conf was used as default - otherwise the filename was concatenated with "<config_dir>/libvirt/libvirt%s%s.conf" which in admin case resulted in "libvirt-libvirt-admin.conf.conf". Obviously, this non-existent config led to ignoring all user settings in libvirt-admin.conf. This patch requires the config filename to be always provided as an argument with the concatenation being simplified. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1357364Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
The function would generate a leading comma. Let the callers properly add commas by formatting the commas at the end and trimming the trailing one.
-
由 Peter Krempa 提交于
For use with memory hotplug virQEMUBuildCommandLineJSONRecurse attempted to format JSON arrays as bitmap on the command line. Make the formatter function configurable so that it can be reused with different syntaxes of arrays such as numbered arrays for use with disk sources. This patch extracts the code and adds a parameter for the function that will allow to plug in different formatters.
-
由 Peter Krempa 提交于
Move the iterator of objects to the recursive function so that nested objects are supported by flattening the structure with '.' delimiters.
-
由 Peter Krempa 提交于
Until now the JSON->commandline convertor was used only for objects created by qemu. To allow reusing it with disk formatter we'll need to escape ',' as usual in qemu commandlines.
-
由 Peter Krempa 提交于
Refactor the command line generator by adding a wrapper (with documentation) that will handle the outermost object iteration. This patch also renames the functions and tweaks the error message for nested arrays to be more universal. The new function is then reused to simplify qemucommandutiltest.
-
由 Peter Krempa 提交于
The iterator function (second argument) already requires that the object is handled as 'const' thus we won't modify the object itself.
-
由 Peter Krempa 提交于
As we already test that the extraction of the backing store string works well additional tests for the backing store string parser can be made simpler. Export virStorageSourceNewFromBackingAbsolute and use it to parse the backing store strings, format them using virDomainDiskSourceFormat and match them against expected XMLs.
-
由 Anton Khramov 提交于
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1181539
-
- 26 7月, 2016 2 次提交
-
-
由 Ján Tomko 提交于
Use virAsprintf to prepend an underscore to make the code more readable.
-
由 Andrea Bolognani 提交于
The symbol being missing has been reported as causing build failures on OS X. If it's not already defined, define it to zero so that it won't have any effect.
-
- 19 7月, 2016 3 次提交
-
-
由 John Ferlan 提交于
Partially resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1301021 If the volume xml was looking to create a luks volume take the necessary steps in order to make that happen. The processing will be: 1. create a temporary file (virStorageBackendCreateQemuImgSecretPath) 1a. use the storage driver state dir path that uses the pool and volume name as a base. 2. create a secret object (virStorageBackendCreateQemuImgSecretObject) 2a. use an alias combinding the volume name and "_luks0" 2b. add the file to the object 3. create/add luks options to the commandline (virQEMUBuildLuksOpts) 3a. at the very least a "key-secret=%s" using the secret object alias 3b. if found in the XML the various "cipher" and "ivgen" options Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Since we VIR_ALLOC_N to *values, the VIR_FREE should be done likewise Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Move to virqemu and rename to virQEMUBuildBufferEscapeComma. This can then be shared by the storage driver when it builds the command line for qemuimg
-
- 18 7月, 2016 8 次提交
-
-
由 Andrea Bolognani 提交于
Since commit 6381c89f, we're storing long long integers instead of long integers. Rename the corresponding virConfType value accordingly.
-
由 Andrea Bolognani 提交于
We use unsigned long long integers unless we need to store a negative value. Rewrite the condition to make this more obvious.
-
由 Andrea Bolognani 提交于
The parameters for virConfGetValueLLong() were not aligned properly.
-
由 Andrea Bolognani 提交于
The name of the function is not virConfGetValueULongLong().
-
由 Andrea Bolognani 提交于
virConfGetValueLLong() errors out if the value is too big to fit into a long long integer, but claims the supported range to be (0,LLONG_MAX) instead of (LLONG_MIN,LLONG_MAX).
-
由 Andrea Bolognani 提交于
For good measure.
-
由 Andrea Bolognani 提交于
When parsing numeric values, we always store them as unsigned unless they're negative. We can use this fact to simplify the logic by removing a bunch of unnecessary checks.
-
由 Andrea Bolognani 提交于
Commit 6381c89f changed virConfValue to store long long integers instead of long integers; however, the temporary variable used in virConfParseLong() was not updated accordingly, causing trouble for 32-bit machines.
-
- 15 7月, 2016 3 次提交
-
-
由 Daniel P. Berrange 提交于
If size_t is the same size as long long, then we can skip some of the range checks. This avoids triggering some bogus compiler warning messages. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virConf 'l' field is a 'signed long long', so whenever the 'type' field is VIR_CONF_ULONG, we should explicitly cast 'l' to a 'unsigned long long' before doing range checks. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Michal Privoznik 提交于
This function tries to get a ssize_t value from a config file. But before returning it, it checks whether the value would fit in ssize_t and if not an error is printed out among with the range for the ssize_t type. However, on some platforms SSIZE_MAX may actually be a signed long type: util/virconf.c: In function 'virConfGetValueSSizeT': util/virconf.c:1268:9: error: format '%zd' expects argument of type 'signed size_t', but argument 9 has type 'long int' [-Werror=format=] virReportError(VIR_ERR_INTERNAL_ERROR, ^ $ grep -r SSIZE_MAX /usr/include/ /usr/include/bits/posix1_lim.h:#ifndef SSIZE_MAX /usr/include/bits/posix1_lim.h:# define SSIZE_MAX LONG_MAX Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 13 7月, 2016 3 次提交
-
-
由 Maxim Perevedentsev 提交于
IPv6 RA always contains an implicit default route via the link-local address of the source of RA. This forces the guest to install a route via isolated network, which may disturb the guest's networking in case of multiple interfaces. More info in 013427e6. The validity of this route is controlled by "default [route] lifetime" field of RA. If the lifetime is set to 0 seconds, then no route is installed by receiver. dnsmasq 2.67+ supports "ra-param=<interface>,<RA interval>,<default lifetime>" option. We pass "ra-param=*,0,0" (here, RA_interval=0 means default) to disable default gateway in RA for isolated networks.
-
由 Maxim Perevedentsev 提交于
-
由 Jim Fehlig 提交于
At least with systemd v210, NOTIFY_SOCKET is abstact, e.g. @/org/freedesktop/systemd1/notify. sendmsg() fails on such a socket with "Connection refused". The unix(7) man page contains the following details wrt abstract socket addresses abstract: an abstract socket address is distinguished (from a pathname socket) by the fact that sun_path[0] is a null byte ('\0'). The socket's address in this namespace is given by the additional bytes in sun_path that are covered by the specified length of the address structure. (Null bytes in the name have no special significance.) So we need to be more precise about the address length, setting it to the sizeof sa_family_t + length of address copied to sun_path instead of setting it to the sizeof the entire sockaddr_un struct. Resolves: https://bugzilla.opensuse.org/show_bug.cgi?id=987668Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 12 7月, 2016 4 次提交
-
-
由 Michal Privoznik 提交于
In an unlikely event of execve() failing, the virCommandExec() function does not report any error, even though checks that are at the beginning of the function are verbose when failing. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently many users of virConf APIs are defining the same macros for calling virConfValue() and then doing type checking. To remove this repeated code, add a set of typesafe accessor methods. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
If the config file does not end with a \n, the parser will append one. When re-allocating the array though, it is mistakenly assuming that 'len' is the length including the trailing NUL, but it does not. So we must add 2 to len, when reallocating, not 1. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 11 7月, 2016 3 次提交
-
-
由 Michal Privoznik 提交于
When storage secret is parsed in virStorageEncryptionSecretParse(), virSecretLookupParseSecret() which allocates some memory. This is however never freed. ==21711== 134 bytes in 6 blocks are definitely lost in loss record 70 of 85 ==21711== at 0x4C29F80: malloc (vg_replace_malloc.c:296) ==21711== by 0xBCA0356: xmlStrndup (in /usr/lib64/libxml2.so.2.9.4) ==21711== by 0xA9F432E: virXMLPropString (virxml.c:479) ==21711== by 0xA9D25B0: virSecretLookupParseSecret (virsecret.c:70) ==21711== by 0xA9D616E: virStorageEncryptionSecretParse (virstorageencryption.c:172) ==21711== by 0xA9D66B2: virStorageEncryptionParseXML (virstorageencryption.c:281) ==21711== by 0xA9D68DF: virStorageEncryptionParseNode (virstorageencryption.c:338) ==21711== by 0xAA12575: virDomainDiskDefParseXML (domain_conf.c:7606) ==21711== by 0xAA2CAC6: virDomainDefParseXML (domain_conf.c:16658) ==21711== by 0xAA2FC75: virDomainDefParseNode (domain_conf.c:17472) ==21711== by 0xAA2FAE4: virDomainDefParse (domain_conf.c:17419) ==21711== by 0xAA2FB72: virDomainDefParseFile (domain_conf.c:17443) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Andrea Bolognani 提交于
All Linux releases we support (RHEL6 era) include these definitions.
-
由 Andrea Bolognani 提交于
If we don't HAVE_LINUX_KVM_H, we can't query /dev/kvm to discover the limits on the number of vCPUs, so we report an error and return a negative value instead.
-
- 09 7月, 2016 1 次提交
-
-
由 Marc Hartmayer 提交于
As there is an explicit constructor for the special case of empty bitmaps, we should mention that the generic constructors rejects the creation of empty bitmaps. Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NSascha Silbe <silbe@linux.vnet.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com> Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
-