- 11 7月, 2017 26 次提交
-
-
由 Michal Privoznik 提交于
Currently, we silently assume that file we are creating in the namespace is either a link or a device (character or block one). This is not always the case. Therefore instead of doing something wrong, claim about unsupported file type. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This function is going to be used on other places, so instead of copying code we can just call the function. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1459592 In 290a00e4 I've tried to fix the process of building a qemu namespace when dealing with file mount points. What I haven't realized then is that we might be dealing not with just regular files but also special files (like sockets). Indeed, try the following: 1) socat unix-listen:/tmp/soket stdio 2) touch /dev/socket 3) mount --bind /tmp/socket /dev/socket 4) virsh start anyDomain Problem with my previous approach is that I wasn't creating the temporary location (where mount points under /dev are moved) for anything but directories and regular files. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
It comes very handy to have source path for chardevs. We already have such function: virDomainAuditChardevPath() but it's static and has name not suitable for exposing. Moreover, while exposing it change its name slightly to virDomainChrSourceDefGetPath. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Peter Krempa 提交于
Now that the JSON deflattener is working sanely we can always attempt the deflattening so that we can then parse the tree as expected.
-
由 Peter Krempa 提交于
If a value of the first level object contains more objects needing deflattening which would be wrapped in an actual object the function would not recurse into them. By this simple addition we can fully deflatten the objects.
-
由 Peter Krempa 提交于
As it turns out sometimes users pass in an arbitrarily nested structure e.g. for the qemu backing chains JSON pseudo protocol. This new implementation deflattens now a single object fully even with nested keys. Additionally it's not necessary now to stick with the "file." prefix for the properties.
-
由 Peter Krempa 提交于
Currently the function would deflatten the object by dropping the 'file' prefix from the attributes. This does not really scale well or adhere to the documentation. Until we refactor the worker to properly deflatten everything we at least simulate it by adding the "file" wrapper object back.
-
由 Peter Krempa 提交于
The code will become more universal so it makes more sense for it to live with the rest of the JSON functions.
-
由 Peter Krempa 提交于
Allows testing whether a virJSONValue is an object.
-
由 Cédric Bosdonnat 提交于
Users may want to run the init command of a container as a special user / group. This is achieved by adding <inituser> and <initgroup> elements. Note that the user can either provide a name or an ID to specify the user / group to be used. This commit also fixes a side effect of being able to run the command as a non-root user: the user needs rights on the tty to allow shell job control. Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Cédric Bosdonnat 提交于
Some containers may want the application to run in a special directory. Add <initdir> element in the domain configuration to handle this case and use it in the lxc driver. Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Cédric Bosdonnat 提交于
virCommand is a version of virExec that doesn't fork, however it is just calling execve and doesn't honors setting uid/gid and pwd. This commit extrac those pieces from virExec() to a virExecCommon() function that is called from both virExec() and virCommandExec().
-
由 Cédric Bosdonnat 提交于
When running an application container, setting environment variables could be important. The newly introduced <initenv> tag in domain configuration will allow setting environment variables to the init program. Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Michal Privoznik 提交于
All of these four functions (virStreamRecvAll, virStreamSendAll, virStreamSparseRecvAll, virStreamSparseSendAll) take one or more callback functions that handle various aspects of streams. However, if any of them fails no error is reported therefore caller does not know what went wrong. At the same time, we silently presumed callbacks to set errno on failure. With this change we should document it explicitly as the error is not properly reported. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
If one these four functions fail (virStreamRecvAll, virStreamSendAll, virStreamSparseRecvAll, virStreamSparseSendAll) the stream is aborted by calling virStreamAbort(). This is a public API; therefore, the first thing it does is error reset. At that point any error that caused us to abort stream in the first place is gone. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
Our documentation to the virStreamRecvAll, virStreamSendAll, virStreamSparseRecvAll, and virStreamSparseSendAll functions indicates that if these functions fail, then virStreamAbort is called. But that is not necessarily true. For instance all of these functions allocate a buffer to work with. If the allocation fails, no virStreamAbort() is called despite -1 being returned. It's the same story with argument sanity checks and a lot of other checks. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
Problem with our error reporting is that the error object is a thread local variable. That means if there's an error reported within the I/O thread it gets logged and everything, but later when the event loop aborts the stream it doesn't see the original error. So we are left with some generic error. We can do better if we copy the error message between the threads. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
When the I/O thread quits (e.g. due to an I/O error, lseek() error, whatever), any subsequent virFDStream API should return error too. Moreover, when invoking stream event callback, we must set the VIR_STREAM_EVENT_ERROR flag so that the callback knows something bad happened. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Cole Robinson 提交于
This is only used in qemu_command.c, so move it, and clarify that it's really about identifying if the serial config is a platform device or not. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Some qemu arch/machine types have built in platform devices that are always implicitly available. For platform serial devices, the current code assumes that only old style -serial config can be used for these devices. Apparently though since -chardev was introduced, we can use -chardev in these cases, like this: -chardev pty,id=foo -serial chardev:foo Since -chardev enables all sorts of modern features, use this method for platform devices. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Every qemu version we support has QEMU_CAPS_CHARDEV, so stop explicitly tracking it and blacklist it like we've done for many other feature flags. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
AFAIK there aren't any cases where we will/should hit the old code path for our supported qemu versions, so drop the old code. Massive test suite churn follows Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
AFAIK there aren't any cases where we should fail these checks with supported qemu versions, so just drop them. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
AFAIK there aren't any qemu arch/machine types with platform parallel devices that would require old style -parallel config, so we shouldn't ever need this nowadays. Remove a now redundant test Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Rather than try to whitelist all device configs that can't use -chardev, blacklist the only one that really can't, which is the default serial/console target type=isa case. ISA specifically isn't a valid config for arm/aarch64, but we've always implicitly treated it to mean 'default platform device'. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 10 7月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
vcpu properties gathered from query-hotpluggable cpus need to be passed back to qemu. As qemu did not use the node-id property until now and libvirt forgot to pass it back properly (it was parsed but not passed around) we did not honor this. This patch adds node-id to the structures where it was missing and passes it around as necessary. The test data was generated with a VM with following config: <numa> <cell id='0' cpus='0,2,4,6' memory='512000' unit='KiB'/> <cell id='1' cpus='1,3,5,7' memory='512000' unit='KiB'/> </numa> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1452053
-
- 08 7月, 2017 5 次提交
-
-
由 Sri Ramanujam 提交于
Introduces support for virDomainSetMemory. This also serves an an example for how to use the new method invocation API with a more complicated method, this time including an EPR and embedded param.
-
由 Sri Ramanujam 提交于
This commit adds support for virDomainSendKey. It also serves as an example of how to use the new method invocation APIs with a single "simple" type parameter.
-
由 Sri Ramanujam 提交于
This commit adds support for invoking methods on remote objects via hypervInvokeMethod.
-
由 Sri Ramanujam 提交于
Update the generator to generate basic property type information for each CIM object representation. Right now, it generates arrays of hypervCimType structs: struct _hypervCimType { const char *name; const char *type; bool isArray; };
-
由 Sri Ramanujam 提交于
This commit introduces functionality for creating and working with invoke parameters. This commit does not include any code for serializing and actually performing the method invocations; it merely defines the functions and API for using invocation parameters in driver code. HYPERV_DEFAULT_PARAM_COUNT was chosen because almost no method invocations have more than 4 parameters. Functions added: * hypervInitInvokeParamsList * hypervFreeInvokeParams * hypervAddSimpleParam * hypervAddEprParam * hypervCreateEmbeddedParam * hypervSetEmbeddedProperty * hypervAddEmbeddedParam * hypervFreeEmbeddedParam
-
- 07 7月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Commit f9758109 did not put a newline after the element it added.
-
- 05 7月, 2017 2 次提交
-
-
由 Daniel P. Berrange 提交于
The log category for virnetdaemon.c was mistakenly set to rpc.netserver. Some useful info about the inhibitor file descriptor was also never logged. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The DBus conditional was renamed way back: commit da77f04e Author: Daniel P. Berrange <berrange@redhat.com> Date: Thu Sep 20 15:05:39 2012 +0100 Convert HAVE_DBUS to WITH_DBUS but the shutdown inhibit code was not updated. Thus libvirt was never inhibiting shutdown by a logged in user when VMs are running. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 04 7月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
It's obvious that unsigned long long is 64 bit and also our web page generator would misplace the comment after the return value due to the way it's parsing them.
-
- 29 6月, 2017 2 次提交
-
-
由 Mikhail Feoktistov 提交于
-
由 Mikhail Feoktistov 提交于
-
- 28 6月, 2017 2 次提交
-
-
由 Peter Krempa 提交于
Replace the switch statement with a simpler if statement. This also removes the fallthrough path that coverity was complaining about.
-
由 John Ferlan 提交于
Combine and "clean up" a bit two places that are removing the vport
-