- 05 8月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
Currently, even if max_client limit is hit, we accept() incoming connection request, but close it immediately. This has disadvantage of not using listen() queue. We should accept() only those clients we know we can serve and let all other wait in the (limited) queue.
-
- 04 8月, 2013 3 次提交
-
-
由 Laine Stump 提交于
* The functions qemuDomainPCIAddressReserveAddr and qemuDomainPCIAddressReserveSlot were very similar (and should have been more similar) and were about to get more code added to them which would create even more duplicated code, so this patch gives qemuDomainPCIAddressReserveAddr a "reserveEntireSlot" arg, then replaces the body of qemuDomainPCIAddressReserveSlot with a call to qemuDomainPCIAddressReserveAddr. You will notice that addrs->lastaddr was previously set in qemuDomainPCIAddressReserveAddr (but *not* set in qemuDomainPCIAddressReserveSlot). For consistency and cleanliness of code, that bit was removed and put into the one caller of qemuDomainPCIAddressReserveAddr (there is a similar place where the caller of qemuDomainPCIAddressReserveSlot sets lastaddr). This does guarantee identical functionality to pre-patch code, but in practice isn't really critical, because lastaddr is just keeping track of where to start when looking for a free slot - if it isn't updated, we will just start looking on a slot that's already occupied, then skip up to one that isn't. * qemuCollectPCIAddress was essentially doing the same thing as qemuDomainPCIAddressReserveAddr, but with some extra special case checking at the beginning. The duplicate code has been replaced with a call to qemuDomainPCIAddressReserveAddr. This required adding a "fromConfig" boolean, which is only used to change the log error code from VIR_ERR_INTERNAL_ERROR (when the address was auto-generated by libvirt) to VIR_ERR_XML_ERROR (when the address is coming from the config); without this differentiation, it would be difficult to tell if an error was caused by something wrong in libvirt's auto-allocate code or just bad config. * the bit of code in qemuDomainPCIAddressValidate that checks the connect type flags is going to be used in a couple more places where we don't need to also check the slot limits (because we're generating the slot number ourselves), so that has been pulled out into a separate qemuDomainPCIAddressFlagsCompatible function.
-
由 Laine Stump 提交于
* qemuDomainPCIAddressSetNextAddr The name of this function was confusing because 1) other functions in the file that end in "Addr" are only operating on a single function of one PCI slot, not the entire slot, while functions that do something with the entire slot end in "Slot", and 2) it didn't contain a verb describing what it is doing (the "Set" refers to the set that contains all PCI buses in the system, used to keep track of which slots in which buses are already reserved for use). It is now renamed to qemuDomainPCIAddressReserveNextSlot, which more clearly describes what it is doing. Arguably, it could have been changed to qemuDomainPCIAddressSetReserveNextSlot, but 1) the word "set" is confusing in this context because it could be intended as a verb or as a noun, and 2) most other functions that operate on a single slot or address within this set are also named qemuDomainPCIAddress... rather than qemuDomainPCIAddressSet... Only the Create, Free, and Grow functions for an address set (which modify the entire set, not just one element) use "Set" in their name. * qemuPCIAddressAsString, qemuPCIAddressValidate All the other functions in this set are named qemuDomainPCIAddressxxxxx, so I renamed these to be consistent.
-
由 Laine Stump 提交于
The parser shouldn't be doing arch-specific things like adding in implicit controllers to the config. This should instead be done in the hypervisor's post-parse callback. This patch removes the auto-add of a usb controller from the domain parser, and puts it into the qemu driver's post-parse callback (just as is already done with the auto-add of the pci-root controller). In the future, any machine/arch that shouldn't have a default usb controller added should just set addDefaultUSB = false in this function. We've recently seen that q35 and ARMV7L domains shouldn't get a default USB controller, so I've set addDefaultUSB to false for both of those.
-
- 02 8月, 2013 12 次提交
-
-
由 Jiri Denemark 提交于
As both /var/lib/libvirt/qemu and /var/lib/libvirt/qemu/channel/target are owned by us, the intermediate /var/lib/libvirt/qemu/channel should be owned by us too.
-
由 Daniel P. Berrange 提交于
If upgrading from a libvirt that is older than 1.0.5, we can not assume that vm->def->resource is non-NULL. This bogus assumption caused libvirtd to crash Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The journald code would crash if a NULL was passed for the filename / funcname in the logging code. This shouldn't happen in general, but it is better to be safe, since there have been bugs triggering this. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virLibConnError macros in libvirt-lxc.c and libvirt-qemu.c were passing NULL for the filename. This causes a crash if the logging code is configured to use journald. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The python/tests files were recently deleted, but a reference was left in the RPM %doc entry Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Peter Krempa 提交于
When allocation of memory failed the error path didn't call va_end() causing a coverity failure. Reported by John Ferlan.
-
由 Peter Krempa 提交于
The shutdown test utilizes waiting for condition to exit the test. This addition will return an error for the shutdown command to see if the condition waiting code will not hang.
-
由 Peter Krempa 提交于
Coverity complained about unused variable that contains the shutdown mode. The original intention was to check it against the requested mode. Also the fixed check revealed a mistake in the expected shutdown mode. Reported by John Ferlan.
-
由 Roman Bogorodskiy 提交于
* Move platform specific things (e.g. firewalling and route collision checks) into bridge_driver_platform * Create two platform specific implementations: - bridge_driver_linux: Linux implementation using iptables, it's actually the code moved from bridge_driver.c - bridge_driver_nop: dumb implementation that does nothing Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 John Ferlan 提交于
More tests are now using the path - adjust the filter to include any path from a test through pthread_create to _dl_allocate_tls
-
由 John Ferlan 提交于
Coverity reported the existing missing check of the return value and subsequent use from a call to virJSONValueFromString() in testJSONAddRemove().
-
由 Jincheng Miao 提交于
When building libvirt with -O0 flag in fedora 19, it will fail to generate qemuagenttest, a link error occurs like: ./.libs/libqemumonitortestutils.a(qemumonitortestutils.o): In function `qemuMonitorTestFree': libvirt/tests/qemumonitortestutils.c:346: undefined reference to `qemuMonitorClose' ./.libs/libqemumonitortestutils.a(qemumonitortestutils.o): In function `qemuMonitorTestNew': libvirt/tests/qemumonitortestutils.c:870: undefined reference to `qemuMonitorOpen' collect2: error: ld returned 1 exit status Fix it by listing libraries in the correct order to avoid lazy linkage. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 01 8月, 2013 10 次提交
-
-
由 Eric Blake 提交于
Autoconf 2.59 says that AC_OUTPUT with arguments is obsolete, and we are already using the replacement for some, but not all, of our output files. * configure.ac (AC_OUTPUT): Rewrite to use AC_CONFIG_FILES. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Guannan Ren 提交于
For disk with startupPolicy support, such as cdrom and floppy when its chain is broken, the startup policy will apply, otherwise, report an error.
-
由 Guannan Ren 提交于
*src/util/virstoragefile.c: Add a helper function to get the first name of missing backing files, if the name is NULL, it means the diskchain is not broken. *src/qemu/qemu_domain.c: qemuDiskChainCheckBroken(disk) to check if its chain is broken
-
由 Guannan Ren 提交于
Refactor this function to make it focus on disk presence checking, including diskchain checking, and not only for CDROM and Floppy. This change is good for the following patches.
-
由 Mooli Tayer 提交于
This will create a respawn behaviour in case libvirt process exits due to nonzero exit code, is terminated by a signal, an operation times out or the configured watchdog timeout is triggered. see http://www.freedesktop.org/software/systemd/man/systemd.service.html and https://bugzilla.redhat.com/show_bug.cgi?id=981974Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Stefan Bader 提交于
The virDomainDef is allocated by the caller and also used after calling to xenDaemonCreateXML. So it must not get freed by the callee. Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
-
由 Daniel P. Berrange 提交于
Make the virCgroupNewMachine method try to use systemd-machined first. If that fails, then fallback to using the traditional cgroup setup code path. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
When systemd is involved in managing processes, it may start killing off & tearing down croups associated with the process while we're still doing virCgroupKillPainfully. We must explicitly check for ENOENT and treat it as if we had finished killing processes Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Systemd uses a named cgroup mount for tracking processes. Add it as another type of controller, albeit one which we have to special case in a number of places. In particular we must never create/delete directories there, nor add tasks. Essentially the systemd mount is to be considered read-only for libvirt. With this change both the virCgroupDetectPlacement and virCgroupCopyPlacement methods must be invoked. The copy placement method will copy setup for resource controllers only. The detect placement method will probe for any named controllers, or resource controllers not already setup. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
There are some interesting escaping rules to consider when dealing with systemd slice/scope names. Thus it is helpful to have APIs for formatting names Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 31 7月, 2013 14 次提交
-
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
This patch exports a few utility functions and adds testing of shutdown commands of the guest agent.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Add a basic test framework with two simple tests to test guest agent interaction.
-
由 Peter Krempa 提交于
This patch adds helpers that allow to check for argument values in commands sent to the monitor.
-
由 Peter Krempa 提交于
Use the JSON error messages to report errors back to the caller in addition to erroring out. The error reported from the event loop from the mock function of the monitor was later overwritten by the call to the monitor/agent interaction API. This will also allow testing of error reporting.
-
由 Peter Krempa 提交于
Add helper functions to open guest agent connections and a handler for replying to the "guest-sync" command.
-
由 Peter Krempa 提交于
The normal monitor uses windows line endings, where the agent monitor uses only newlines. Change this to tolerate both approaches and allow to use the utilities for guest agent tests.
-
由 Peter Krempa 提交于
Refactor the test helpers to allow adding callbacks to verify the monitor responses instead of simple command name checking and clean up various parts to prepare for adding guest agent tests.
-
由 Peter Krempa 提交于
The instrumentation for the monitor test can be hacked for qemu agent testing. Split out the monitor specific stuff to allow using the code in guest agent tests in the future.
-
由 Peter Krempa 提交于
The qemumonitorjsontest crashed when one of the initialization steps done before starting the worker thread failed. This patch fixes this by trying to pthread_join() the thread only after it was created.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Simplify the code using the existing helpers instead of open coding the same functionality.
-