- 04 10月, 2013 1 次提交
-
-
由 Cole Robinson 提交于
Makes things more readable IMO
-
- 03 10月, 2013 25 次提交
-
-
由 Laine Stump 提交于
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1012824 https://bugzilla.redhat.com/show_bug.cgi?id=1012834 Note that a similar problem was reported in: https://bugzilla.redhat.com/show_bug.cgi?id=827519 but the fix only worked for <interface type='hostdev'>, *not* for <interface type='network'> where the network itself was a pool of hostdevs. The symptom in both cases was this error message: internal error: Unable to determine device index for network device In both cases the cause was lack of proper handling for netdevs (<interface>) of type='hostdev' when scanning the netdev list looking for alias names in qemuAssignDeviceNetAlias() - those that aren't type='hostdev' have an alias of the form "net%d", while those that are hostdev use "hostdev%d". This special handling was completely lacking prior to the fix for Bug 827519 which was: When searching for the highest alias index, libvirt looks at the alias for each netdev and if it is type='hostdev' it ignores the entry. If the type is not hostdev, then it expects the "net%d" form; if it doesn't find that, it fails and logs the above error message. That fix works except in the case of <interface type='network'> where the network uses hostdev (i.e. the network is a pool of VFs to be assigned to the guests via PCI passthrough). In this case, the check for type='hostdev' would fail because it was done as: def->net[i]->type == VIR_DOMAIN_NET_TYPE_HOSTDEV (which compares what was written in the config) when it actually should have been: virDomainNetGetActualType(def->net[i]) == VIR_DOMAIN_NET_TYPE_HOSTDEV (which compares the type of netdev that was actually allocated from the network at runtime). Of course the latter wouldn't be of any use if the netdevs of type='network' hadn't already acquired their actual network connection yet, but manual examination of the code showed that this is never the case. While looking through qemu_command.c, two other places were found to directly compare the net[i]->type field rather than getting actualType: * qemuAssignDeviceAliases() - in this case, the incorrect comparison would cause us to create a "net%d" alias for a netdev with type='network' but actualType='hostdev'. This alias would be subsequently overwritten by the proper "hostdev%d" form, so everything would operate properly, but a string would be leaked. This patch also fixes this problem. * qemuAssignDevicePCISlots() - would defer assigning a PCI address to a netdev if it was type='hostdev', but not for type='network + actualType='hostdev'. In this case, the actual device usually hasn't been acquired yet anyway, and even in the case that it has, there is no practical difference between assigning a PCI address while traversing the netdev list or while traversing the hostdev list. Because changing it would be an effective NOP (but potentially cause some unexpected regression), this usage was left unchanged.
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Join the worker thread no matter if it is running or zombie already. With current implementation the thread is joined iff @running is true. However, when worker executes the last line, @running is set to false. Hence qemuMonitorTestFree() won't join it (and free resources) even though we can clearly see worker has run (nobody else sets @running = false). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Right now, we are testing qemuMonitorSystemPowerdown instead of qemuMonitorJSONSystemPowerdown. It makes no harm, as both functions have the same header and the former is just a wrapper over the latter. But we should be consistent as we're testing the JSON functions only in here.
-
由 Daniel P. Berrange 提交于
The XML parser reserves 'vnet' as a prefix for automatically generated NIC device names. Switch the veth device creation to use this prefix, so it does not have to worry about clashes with user specified names in the XML. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The veth device creation code run in two steps, first it looks for two free veth device names, then it runs ip link to create the veth pair. There is an obvious race between finding free names and creating them, when guests are started in parallel. Rewrite the code to loop and re-try creation if it fails, to deal with the race condition. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
If veth device allocation has a fatal error, the veths array may contain NULL device names. Avoid calling the virNetDevVethDelete function on such names. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The kernel automatically destroys veth devices when cleaning up the container network namespace. During normal shutdown, it is thus likely that the attempt to run 'ip link del vethN' will fail. If it fails, check if the device exists, and avoid reporting an error if it has gone. This switches to use the virCommand APIs instead of virRun too. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
During container cleanup there is a race where the kernel may have destroyed the veth device before we try to set it offline. This causes log error messages. Given that we're about to delete the device entirely, setting it offline is pointless. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Michal Privoznik 提交于
And so do qemuMonitorJSONSetMigrationCapability.
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
Also do qemuMonitorJSONGetBlockIoThrottle.
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
While the reply can be reused test qemuMonitorJSONGetBlockExtent and qemuMonitorJSONGetBlockExtent too.
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
-
由 Michal Privoznik 提交于
After successful @cmd construction the memory where @keys points to is part of @cmd. Avoid double freeing it.
-
由 Michal Privoznik 提交于
When querying for kvm, we try to find 'enabled' field. Hence the error message should report we haven't found 'enabled' and not 'running' (which is not even in the reply). Probably a typo or copy-paste error.
-
- 02 10月, 2013 2 次提交
-
-
由 Michal Privoznik 提交于
The qemuDomainChangeNet() is called when 'virsh update-device' is invoked on a NIC. Currently, we fail to update the QoS even though we have routines for that. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
So far the virNetDevBandwidthEqual() expected both ->in and ->out items to be allocated for both @a and @b compared. This is not necessary true for all our code. For instance, running 'update-device' twice over a NIC with the very same XML results in SIGSEGV-ing in this function. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 01 10月, 2013 12 次提交
-
-
由 Cole Robinson 提交于
This is just stolen from qemu_driver.c with tweaks to fit the test driver.
-
由 Cole Robinson 提交于
Also add a <test:hasmanagedsave> element to set this data when starting the connection.
-
由 Cole Robinson 提交于
Similar to the runstate commit, allow a boolean <test:transient/> element for setting domain persistence at driver startup.
-
由 Cole Robinson 提交于
We can dereference graphics[0] even if guest has no graphics device configured. I screwed this up in a216e648 https://bugzilla.redhat.com/show_bug.cgi?id=1014088
-
由 Ján Tomko 提交于
Use virSocketAddrIsWildcard instead of STREQ to check for the ANY address and put brackets around the address if it contains ':'.
-
由 Laine Stump 提交于
This should resolve: https://bugzilla.redhat.com/show_bug.cgi?id=1012085 libvirt previously recognized NFS, GFS2, OCFS2, and AFS filesystems as "shared", and thus eligible for exceptions to certain rules/actions about chowning image files before handing them off to a guest. This patch widens the definition of "shared filesystem" to include SMB and CIFS filesystems (aka "Windows file sharing"); both of these use the same protocol, but different drivers so there are different magic numbers for each.
-
由 Michal Privoznik 提交于
This test is there to ensure that our capabilities detection code isn't broken somehow. How to gather test data: Firstly, the data is split into two separate files. The former (with suffix .replies) contains all the qemu replies. This is very fragile as introducing a new device can mean yet another monitor command and hence edit of this file in the future. But there's no better way of doing this. To get this data simply turn on debug logs and copy all the QEMU_MONITOR_IO_PROCESS lines. But be careful to not copy incomplete ones (yeah, we report some incomplete lines too). Long story short, at the libvirtd startup, a dummy qemu is spawn to get all the capabilities. The latter (with suffix .caps) contains capabilities XML. Just start a domain and copy the corresponding part from its state XML file. Including <qemuCaps> tag. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
In a few cases we might want to not care if monitor command executed on the mocked monitor matches the one we have reply for. Sounds crazy, but if we just want monitor to return certain values (e.g. read from a file) there is no need to care about command match. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Currently, when creating a new mocked monitor, the greeting can't be chosen. This is crucial for next patches, because some info as qemu version is obtained in the greeting message. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
This basically covers the talking-to-monitor part of virQEMUCapsInitQMP. The patch itself has no real value, but it creates an entity to be tested in the next patches. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel Veillard 提交于
- configure.ac docs/news.html.in libvirt.spec.in: update for release - po/*.po*: updated localization and regenerated
-