- 12 2月, 2016 9 次提交
-
-
由 Mikhail Feoktistov 提交于
Race condition: User calls defineXML to create new instance. The main thread from vzDomainDefineXMLFlags() creates new instance by prlsdkCreateVm. Then this thread calls prlsdkAddDomain to add new domain to domains list. The second thread receives notification from hypervisor that new VM was created. It calls prlsdkHandleVmAddedEvent() and also tries to add new domain to domains list. These two threads call virDomainObjListFindByUUID() from prlsdkAddDomain() and don't find new domain. So they add two domains with the same uuid to domains list. This fix splits logic of prlsdkAddDomain() into two functions. 1. vzNewDomain() creates new empty domain in domains list with the specific uuid. 2. prlsdkLoadDomain() add data from VM to domain object. New algorithm for creating an instance: In vzDomainDefineXMLFlags() we add new domain to domain list by calling vzNewDomain() and only after that we call CreateVm() to create VM. It means that we "reserve" domain object with the specific uuid. After creation of new VM we add info from this VM to reserved domain object by calling prlsdkLoadDomain(). Before this patch prlsdkLoadDomain() worked in 2 different cases: 1. It creates and initializes new domain. Then updates it from sdk handle. 2. It updates existed domain from sdk handle. In this patch we remove code which creates new domain from LoadDomain() and move it to vzNewDomain(). Now prlsdkLoadDomain() only updates domain from skd handle. In notification handler prlsdkHandleVmAddedEvent() we check the existence of a domain and if it doesn't exist we add new domain by calling vzNewDomain() and load info from sdk handle via prlsdkLoadDomain().
-
由 Mikhail Feoktistov 提交于
Bug cause: Update the domain that is subscribed to hypervisor notification. LoadDomain() rewrites notifications fields in vzDomObj structure and makes domain as "unsubscribed". Fix: Initialize notification fields in vzDomObj only if we create a new domain. And do not reinitialize these fields if we update domain (by calling LoadDomain with olddom argument)
-
由 Mikhail Feoktistov 提交于
In commit 7039bb3c we have removed code that saves uuid to vzDomObj.uuid So this field is no longer needed.
-
由 Mikhail Feoktistov 提交于
prlsdkGetDomainIds() returns name and uuid for specified instance. Now output arguments can be NULL. It allows to get only necessary info(name or uuid).
-
由 Maxim Nestratov 提交于
Add Maxim Nestratov to the commiters list. Move Dmitry Guryanov to the previous maintainers list.
-
由 Andrea Bolognani 提交于
All mock libraries were called vir*mock except for this one; now the naming is consistent across the board.
-
由 Andrea Bolognani 提交于
virportallocatormock was the only one using it, and has been changed accordingly.
-
由 Andrea Bolognani 提交于
As mock libraries are not to be linked against libvirt, the sc_prohibit_close syntax-check rule does not apply. This fixes a syntax-check failure introduced by commit a03cbfe0.
-
由 Andrea Bolognani 提交于
Instead of compiling either the mock or the non-mock part of the file based on a compiler flag, split the mock part off to its own file.
-
- 11 2月, 2016 21 次提交
-
-
由 Peter Krempa 提交于
The snapshot name generator truncates the original file name after a '.' and replaces the suffix with the snapshot name. If two disks source images differ only in the suffix portion, the generated name will be duplicate. Since this is a corner case just error out stating that a duplicate name was generated. The user can work around this situation by providing the file names explicitly. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1283085
-
由 Peter Krempa 提交于
Get rid of one indentation level by negating condition and remove ugly pointer arithmetic at the cost of one extra allocation.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Stick to the naming pattern.
-
由 Andrea Bolognani 提交于
Mock libraries should not be linked against libvirt, but some of them did - fix that. On the other hand, not linking against gnulib can cause build failures on mingw, so define a new $(MOCKLIBS_LIBS) variable and use it everywhere.
-
由 Andrea Bolognani 提交于
The virportallocatortest.c file is compiled both as a test case and as a mock library; in the latter case, it can't use VIR_FORCE_CLOSE() because mock libraries are not linked against libvirt. Replace VIR_FORCE_CLOSE() with plain close() to solve the issue.
-
由 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>
-
由 Andrea Bolognani 提交于
This reverts commit 6aa90452. Turns out that not linking against libvirt and gnulib is okay for regular Linux (and FreeBSD) builds, but makes mingw very unhappy. .../virnetserverclientmock_la-virnetserverclientmock.o: In function `virNetSocketGetSELinuxContext': .../virnetserverclientmock.c:61: undefined reference to `rpl_strdup' .../libvirportallocatormock_la-virportallocatortest.o: In function `init_syms': .../virportallocatortest.c:61: undefined reference to `virFileClose'
-
由 Andrea Bolognani 提交于
Mock libraries are used with LD_PRELOAD from test binaries that are already linked against those libraries, so they will be able to resolve the symbols anyway.
-
- 10 2月, 2016 10 次提交
-
-
由 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>
-
由 Cole Robinson 提交于
Clarify the point of some of the test cases by renaming them. Add more xml2xml tests.
-
由 Cole Robinson 提交于
We use the PreFormat callback for this. Many test cases need to be extended to pass in proper qemuCaps flags so AssignAddresses doesn't throw errors. One test case (pcie-root-port-too-many) is dropped, since it was meant only for checking an error condition in qemuxml2argv, and one we add in AssignAddresses it errors here too. Long term I think AssignAddresses should be handled in qemu's PostParse callback, but that's not entirely straightforward. Handling it here means we can get the test suite churn over with.
-
由 Cole Robinson 提交于
This allows individual driver tests to hook in their own code before the def is formatted and compared. We will eventually use this in the qemuxml2xml
-
由 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)
-
由 Cole Robinson 提交于
Similar to how we do it for qemuxml2argvtest. This will be used in future patches.
-
由 Cole Robinson 提交于
QEMU_CAPS_DEVICE is always enabled for qemu binaries we support. Sync qemuxml2* to match, and regenerate all test output.
-
由 Cole Robinson 提交于
When we unconditionally enable QEMU_CAPS_DEVICE, these tests need some massaging, so do it ahead of time to not mix it in with the big test refresh. - minimal-s390 is not a real world working config, so drop it - disk-usb was testing for an old code path that will be removed. instead use it to test lack of USB disk support, and rename it to disk-usb-nosupport. Switch xml2xml to use disk-usb-device for input. - cputune-numatune was needlessly using q35, switch it to an older machine type
-