- 11 2月, 2016 13 次提交
-
-
由 Michal Privoznik 提交于
Apparently we are not the only ones with dumb free functions because dbus_message_unref() does not accept NULL either. But if I were to vote, this one is even more evil. Instead of returning an error just like we do it immediately dereference any pointer passed and thus crash you app. Well done DBus! Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f878ebda700 (LWP 31264)] 0x00007f87be4016e5 in ?? () from /usr/lib64/libdbus-1.so.3 (gdb) bt #0 0x00007f87be4016e5 in ?? () from /usr/lib64/libdbus-1.so.3 #1 0x00007f87be3f004e in dbus_message_unref () from /usr/lib64/libdbus-1.so.3 #2 0x00007f87bf6ecf95 in virSystemdGetMachineNameByPID (pid=9849) at util/virsystemd.c:228 #3 0x00007f879761bd4d in qemuConnectCgroup (driver=0x7f87600a32a0, vm=0x7f87600c7550) at qemu/qemu_cgroup.c:909 #4 0x00007f87976386b7 in qemuProcessReconnect (opaque=0x7f87600db840) at qemu/qemu_process.c:3386 #5 0x00007f87bf6edfff in virThreadHelper (data=0x7f87600d5580) at util/virthread.c:206 #6 0x00007f87bb602334 in start_thread (arg=0x7f878ebda700) at pthread_create.c:333 #7 0x00007f87bb3481bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 (gdb) frame 2 #2 0x00007f87bf6ecf95 in virSystemdGetMachineNameByPID (pid=9849) at util/virsystemd.c:228 228 dbus_message_unref(reply); (gdb) p reply $1 = (DBusMessage *) 0x0 Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
This function returns -1 on allocation error, there's no need to check the path for NULL again.
-
由 Ján Tomko 提交于
Do not store the return value of called functions in the same variable as the (future) return value of the current function. This makes tracking the origin of the value easier and reduces the chance of introducing a new point of exit without resetting the return value back to -1.
-
由 Ján Tomko 提交于
Using strcat directly is more readable than passing strlen of the copied string to strncat.
-
由 Ján Tomko 提交于
-
由 Ján Tomko 提交于
Also fix the curly brace to pass sytnax-check.
-
由 Ján Tomko 提交于
-
由 Ján Tomko 提交于
-
由 Ján Tomko 提交于
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1293351 Since we already have virtio channel events, we know when guest agent within guest has (dis-)connected. Instead of us blindly connecting to a socket that no one is listening to, we can just follow what qemu-ga does. This has a nice benefit that we don't need to 'guest-ping' the agent just to timeout and find out nobody is listening. The way that this commit is implemented: - don't connect in qemuProcessLaunch directly, defer that to event callback (which already follows the agent) - processSerialChangedEvent - after migration is settled, before we resume vCPUs, ask qemu whether somebody is listening on the socket and if so, connect to it. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Extract out the qemuParseCommandLine{String|Pid} into their own separate module - taking with it all the various static functions. Causes a ripple effect with a few other modules to include the new qemu_parse_command.h. Narrowed down the list of #include's in the split out module to those that are necessary for build.
-
由 John Ferlan 提交于
Recent refactors in the vbox code to check the return status for the function tipped Coverity's scales of justice for any functions that do not check status - such as this one. While I'm at it, since the call is essentially the same other than whether starting from val or val+1 when val[0] = '[', just adjust the val pointer by one and have one call instead of two. Additionally, the call to virDomainGraphicsListenGetAddress is redundant since it checking that the address field got filled. It's a leftover from the strndup -> ListenSetAddress conversion (commit id 'ef79fb5b') Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Refactor qemuParseCommandLine to pull out the "-vnc" argument parsing into its own helper function. Modify the code to use "cleanup" instead of "error" and use the standard return processing to indicate success or failure by using ret Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 10 2月, 2016 5 次提交
-
-
由 Michal Privoznik 提交于
The function, like others in our code, returns zero on success and a negative value on error. However, there are two places in xenconfig source code where we check for non-zero value. While the function can't currently return a positive value, those checks look okay, but does not really follow our style. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Joao Martins 提交于
This patch introduces keep alive messages support for P2P migration and it adds two new configuration entries namely 'keepalive_interval' 'keepalive_count' to control it. Behavior of these entries is the same as qemu driver thus the description is copied from there with just a few simplifications. Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
-
由 Joao Martins 提交于
Introduce support for VIR_MIGRATE_PEER2PEER in libvirt migration. Most of the changes occur at the source and no modifications at the receiver. In P2P mode there is only the Perform phase so we must handle the connection with the destination and actually perform the migration. libxlDomainPerformP2P implements the connection to the destination and libxlDoMigrateP2P implements the actual migration logic with virConnectPtr. In this function we take care of doing all phases of migration in the destination similar to virDomainMigrateVersion3Full. We appropriately save the last error reported in each of the phases to provide proper reporting. We don't yet support VIR_MIGRATE_TUNNELED and we always use V3 with extensible params, thus it also makes the implementation simpler. It is worth noting that the receiver didn't have any changes, and since it's still the v3 sequence thus it is possible to migrate from a P2P to non-P2P host. Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
-
由 Michal Privoznik 提交于
The virStringListLength function does not ever modify the passed string list. It merely counts the items in it. Make sure that we reflect this bit in the function header. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> (crobinso: fix up spacing and squash in sheepdog bit suggested by Andrea)
-
由 Michal Privoznik 提交于
Older gcc fails to see that the variable is set iff @hasPriority == true in which case the former is set a value. Initialize the value while declaring it to make the compiler shut up. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 09 2月, 2016 21 次提交
-
-
由 Martin Kletzander 提交于
It does exactly the same thing as virStringListLength() and it's used in one place only. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Ján Tomko 提交于
Remove the extra spaces, do not align them on '='.
-
由 Ján Tomko 提交于
The return type of strlen is 'size_t', which is unsigned and therefore never less than zero. Use STREQ to make the check obvious.
-
由 Ján Tomko 提交于
We free the key right after calling the API. Reuse a single variable to remove the typo.
-
由 Ján Tomko 提交于
Instead of open-coding it.
-
由 Ján Tomko 提交于
Error out if the allocation failed.
-
由 Ján Tomko 提交于
Two VIR_STRDUP calls are redundant - just steal the string converted by VBOX_UTF16_TO_UTF8. Report an error when the third one fails.
-
由 Ján Tomko 提交于
Remove the need to track what type of graphics were present by temporary variables.
-
由 Ján Tomko 提交于
Allocate it as soon as we know we will need it. Add it to def->ngraphics if it's allocated, removing the need to use the addDesktop and totalPresent variables to track this.
-
由 Ján Tomko 提交于
Separate allocation of the def->graphics array from the allocation and initialization of its first element. Note that the only possible values of totalPresent at this point are 0 or 1, because it equals to guiPresent + sdlPresent.
-
由 Ján Tomko 提交于
VIR_ALLOC* already reported an error.
-
由 Ján Tomko 提交于
When FRONTEND/Type is not any of "sdl", "gui", "vrdp", we add a DESKTOP. Use a bool to track this, instead of checking that both totalPresent ("sdl" or "gui" present) and vrdpPresent are zero.
-
由 Ján Tomko 提交于
VRDxEnabled is initialized to false. Put the if (VRDxEnabled) on the top level to reduce nesting.
-
由 Ján Tomko 提交于
Use STREQ_NULLABLE instead of deep nesting.
-
由 Ján Tomko 提交于
Error out on allocation failures instead of creating an incomplete definition. Fixes a possible crash when def->nvideos is 1, but def->videos is NULL.
-
由 Ján Tomko 提交于
For the actions ADD and OLD, split out creating the new lease object, as well as getting the environment variables that do not affect the parsing of command line arguments.
-
由 Peter Krempa 提交于
Since majority of the steps is shared, the function can be reused to simplify code. Similarly to previous path doing this same for vCPUs this also fixes the a similar bug (which is not tracked).
-
由 Peter Krempa 提交于
Rather than iterating 3 times for various settings this function aggregates all the code into single place. One of the other advantages is that it can then be reused for properly setting IOThread info on hotplug.
-
由 Peter Krempa 提交于
Since majority of the steps is shared, the function can be reused to simplify code. Additionally this resolves https://bugzilla.redhat.com/show_bug.cgi?id=1244128 since the cpu bandwidth limiting with cgroups would not be set on the hotplug path. Additionally the code now sets the thread affinity and honors autoCpuset as in the regular startup code path.
-
由 Peter Krempa 提交于
Rather than iterating 3 times for various settings this function aggregates all the code into single place. One of the other advantages is that it can then be reused for properly setting vCPU info on hotplug. With this approach autoCpuset is also used when setting the process affinity rather than just via cgroups.
-
- 08 2月, 2016 1 次提交
-
-
由 Joao Martins 提交于
Commit 8cd1d546 consolidates both daemon and remote driver typed param serialization functions. The consolidation now enforces client to use VIR_TYPED_PARAM_STRING_OKAY flag to properly serialize string parameters, which server has used for quite some time now. And this caused an issue, since the commit had not adjusted client remote calls appropriately, thus causing a failure in blkiotune, numatune and migration APIs (as per Xen CI tests). This patch adjusts both remote_driver.c and gendispatch.pl to properly address this issue. http://lists.xenproject.org/archives/html/xen-devel/2016-02/msg01012.htmlSigned-off-by: NJoao Martins <joao.m.martins@oracle.com> Signed-off-by: NErik Skultety <eskultet@redhat.com>
-