- 24 2月, 2014 3 次提交
-
-
由 Michal Privoznik 提交于
Systemd does not forget about the cases, where client service needs to wait for daemon service to initialize and start accepting new clients. Setting a dependency in client is not enough as systemd doesn't know when the daemon has initialized itself and started accepting new clients. However, it offers a mechanism to solve this. The daemon needs to call a special systemd function by which the daemon tells "I'm ready to accept new clients". This is exactly what we need with libvirtd-guests (client) and libvirtd (daemon). So now, with this change, libvirt-guests.service is invoked not any sooner than libvirtd.service calls the systemd notify function. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
I've noticed that in some cases systemd was quick enough and even if libvirt-guests.service is marked to be started after the libvirtd.service my guests were not resumed as libvirt-guests.sh failed to connect. This is because of a simple fact: systemd correctly starts libvirt-guests after it execs libvirtd. However, the daemon is not able to accept connections right from the start. It's doing some initialization which may take ages. This problem is not limited to systemd only, indeed. Any init system that is able to startup services in parallel (e.g. OpenRC) may run into this situation. The fix is to try connecting not only once, but continuously a few times with a small sleep in between tries. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1031696 When creating a new domain, we let systemd know about it by calling CreateMachine() function via dbus. Systemd then creates a scope and places domain into it. However, later when the host is shutting down, systemd computes the shutdown order to see what processes can be shut down in parallel. And since we were not setting dependencies at all, the slices (and thus domains) were most likely killed before libvirt-guests.service. So user domains that had to be saved, shut off, whatever were in fact killed. This problem can be solved by letting systemd know that scopes we're creating must not be killed before libvirt-guests.service. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 22 2月, 2014 2 次提交
-
-
由 Eric Blake 提交于
vircgrouptest.c: In function 'testCgroupGetPercpuStats': vircgrouptest.c:543: warning: integer constatnt is too large for 'long' type Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Based on a report from Pavel Hrdina, gnulib was fixed to support AC_PROG_SED even when using ancient autoconf 2.59 of RHEL 5. * .gnulib: Update to latest, to fix build on RHEL 5. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 21 2月, 2014 12 次提交
-
-
由 Ján Tomko 提交于
There has been a new field introduced in iscsiadm --mode session output [1], but our regex only expects four fields. This breaks startup of iscsi pools: error: Failed to start pool iscsi error: internal error: cannot find session Fix this by ignoring anything after the fourth field. https://bugzilla.redhat.com/show_bug.cgi?id=1067173 [1] https://github.com/mikechristie/open-iscsi/commit/181af9a
-
由 Eric Blake 提交于
Among other things, gnulib now allows overriding of sed during 'make syntax-check'. * .gnulib: Update to latest, for maint.mk improvements. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Add 'virsh net-event --list' and 'virsh net-event [net] --event=name [--loop] [--timeout]'. Very similar to 'virsh event'. * tools/virsh.pod (net-event): Document new command. * tools/virsh-network.c (vshNetworkEventToString, vshNetEventData) (vshEventLifecyclePrint, cmdNetworkEvent): New struct and functions. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Add 'virsh event --list' and 'virsh event [dom] --event=name [--loop] [--timeout]'. Borrows somewhat from event-test.c, but defaults to a one-shot notification, and takes advantage of the event loop integration to allow Ctrl-C to interrupt the wait for an event. For now, this just does lifecycle events. * tools/virsh.pod (event): Document new command. * tools/virsh-domain.c (vshDomainEventToString) (vshDomainEventDetailToString, vshDomEventData) (vshEventLifecyclePrint, cmdEvent): New struct and functions. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
I plan to add 'virsh event' to virsh-domain.c and 'virsh net-event' to virsh-network.c; but as they will share quite a bit of common boilerplate, it's better to set that up now in virsh.c. * tools/virsh.h (_vshControl): Add fields. (vshEventStart, vshEventWait, vshEventDone, vshEventCleanup): New prototypes. * tools/virsh.c (vshEventFd, vshEventOldAction, vshEventInt) (vshEventTimeout): New helper variables and functions. (vshEventStart, vshEventWait, vshEventDone, vshEventCleanup): Implement new functions. (vshInit, vshDeinit, main): Manage event timeout. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Several virsh commands ask for a --timeout parameter in seconds, then use it to control interfaces that operate on millisecond limits; I also plan on adding a 'virsh event' command that also does this. Factor this into a common function. * tools/virsh.h (vshCommandOptTimeoutToMs): New prototype. * tools/virsh.c (vshCommandOptTimeoutToMs): New function. * tools/virsh-domain.c (cmdBlockCommit, cmdBlockCopy) (cmdBlockPull, cmdMigrate): Use it. (vshWatchJob): Adjust timeout scale. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Jim Fehlig 提交于
Emit libvirt shutdown event when receiving LIBXL_SHUTDOWN_REASON_POWEROFF event from libxl. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 John Ferlan 提交于
Recent autotest/virt-test testing on f20 discovered an anomaly in how the bandwidth options are documented and used. This was discovered due to a bug fix in the /sbin/tc utility found in iproute-3.11.0.1 (on f20) in which overflow was actually caught and returned as an error. The fix was first introduced in iproute-3.10 (search on iproute2 commit 'a303853e'). The autotest/virt-test test for virsh domiftune was attempting to send the largest unsigned integer value (4294967295) for maximum value testing. The libvirt xml implementation was designed to manage values in kilobytes thus when this value was passed to /sbin/tc, it (now) properly rejected the 4294967295kbps value. Investigation of the problem discovered that formatdomain.html.in and formatnetwork.html.in described the elements and property types slightly differently, although they use the same code - virNetDevBandwidthParseRate() (shared by portgroups, domains, and networks xml parsers). Rather than have the descriptions in two places, this patch will combine and reword the description under formatnetwork.html.in and have formatdomain.html.in link to that description. This documentation faux pas was continued into the virsh man page where the bandwidth description for both 'attach-interface' and 'domiftune' did not indicate the format of each value, thus leading to the test using largest unsigned integer value assuming "bps" rather than "kbps", which ultimately was wrong.
-
由 Jim Fehlig 提交于
Commit e4a0e900 missed calling libxlVmCleanupJob in the shutdown handler when processing a reboot event. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1038363 If a domain has a different maximum for persistent and live maxmem or max vcpus, then it is possible to hit cases where libvirt refuses to adjust the current values or gets halfway through the adjustment before failing. Better is to determine up front if the change is possible for all requested flags. Based on an idea by Geoff Franks. * src/qemu/qemu_driver.c (qemuDomainSetMemoryFlags): Compute correct maximum if both live and config are being set. (qemuDomainSetVcpusFlags): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Roman Bogorodskiy 提交于
-
- 20 2月, 2014 23 次提交
-
-
由 Daniel P. Berrange 提交于
The virDomainGetRootFilesystem method can be generalized to allow any filesystem path to be obtained. While doing this, start a new test case for purpose of testing various helper methods in the domain_conf.{c,h} files, such as this one. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The previous OOM testing support would re-run the entire "main" method each iteration, failing a different malloc each time. When a test suite has 'n' allocations, the number of repeats requires is (n * (n + 1) ) / 2. This gets very large, very quickly. This new OOM testing support instead integrates at the virtTestRun level, so each individual test case gets repeated, instead of the entire test suite. This means the values of 'n' are orders of magnitude smaller. The simple usage is $ VIR_TEST_OOM=1 ./qemuxml2argvtest ... 29) QEMU XML-2-ARGV clock-utc ... OK Test OOM for nalloc=36 .................................... OK 30) QEMU XML-2-ARGV clock-localtime ... OK Test OOM for nalloc=36 .................................... OK 31) QEMU XML-2-ARGV clock-france ... OK Test OOM for nalloc=38 ...................................... OK ... the second lines reports how many mallocs have to be failed, and thus how many repeats of the test will be run. If it crashes, then running under valgrind will often show the problem $ VIR_TEST_OOM=1 ../run valgrind ./qemuxml2argvtest When debugging problems it is also helpful to select an individual test case $ VIR_TEST_RANGE=30 VIR_TEST_OOM=1 ../run valgrind ./qemuxml2argvtest When things get really tricky, it is possible to request that just specific allocs are failed. eg to fail allocs 5 -> 12, use $ VIR_TEST_RANGE=30 VIR_TEST_OOM=1:5-12 ../run valgrind ./qemuxml2argvtest In the worse case, you might want to know the stack trace of the alloc which was failed then VIR_TEST_OOM_TRACE can be set. If it is set to 1 then it will only print if it thinks a mistake happened. This is often not reliable, so setting it to 2 will make it print the stack trace for every alloc that is failed. $ VIR_TEST_OOM_TRACE=2 VIR_TEST_RANGE=30 VIR_TEST_OOM=1:5-5 ../run valgrind ./qemuxml2argvtest 30) QEMU XML-2-ARGV clock-localtime ... OK Test OOM for nalloc=36 !virAllocN /home/berrange/src/virt/libvirt/src/util/viralloc.c:180 virHashCreateFull /home/berrange/src/virt/libvirt/src/util/virhash.c:144 virDomainDefParseXML /home/berrange/src/virt/libvirt/src/conf/domain_conf.c:11745 virDomainDefParseNode /home/berrange/src/virt/libvirt/src/conf/domain_conf.c:12646 virDomainDefParse /home/berrange/src/virt/libvirt/src/conf/domain_conf.c:12590 testCompareXMLToArgvFiles /home/berrange/src/virt/libvirt/tests/qemuxml2argvtest.c:106 virtTestRun /home/berrange/src/virt/libvirt/tests/testutils.c:250 mymain /home/berrange/src/virt/libvirt/tests/qemuxml2argvtest.c:418 (discriminator 2) virtTestMain /home/berrange/src/virt/libvirt/tests/testutils.c:750 ?? ??:0 _start ??:? FAILED Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virCgroupXXX APIs' return value must be checked for being less than 0, not equal to 0. An VIR_ERR_OPERATION_INVALID error must also be raised when the VM is not running to prevent a crash on NULL priv->cgroup field. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Thorsten Behrens 提交于
-
由 Thorsten Behrens 提交于
-
由 Thorsten Behrens 提交于
-
由 Thorsten Behrens 提交于
-
由 Thorsten Behrens 提交于
And provide domain summary stat in that case, for lxc backend. Use case is a container inheriting all devices from the host, e.g. when doing application containerization.
-
由 Thorsten Behrens 提交于
Adds lxcDomainBlockStatsFlags and lxcDomainBlockStats functions.
-
由 Thorsten Behrens 提交于
-
由 Thorsten Behrens 提交于
To reuse this from other drivers, like lxc.
-
由 Thorsten Behrens 提交于
-
由 Thorsten Behrens 提交于
This reads blkio stats from blkio.throttle.io_service_bytes and blkio.throttle.io_serviced.
-
由 Jincheng Miao 提交于
When start a guest with --pass-fd, if the argument of --pass-fd is invalid, virsh will exit, but doesn't free the variable 'dom'. The valgrind said: ... ==24569== 63 (56 direct, 7 indirect) bytes in 1 blocks are definitely lost in loss record 130 of 234 ==24569== at 0x4C2A1D4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==24569== by 0x4E879A4: virAllocVar (viralloc.c:544) ==24569== by 0x4EBD625: virObjectNew (virobject.c:190) ==24569== by 0x4F3A18A: virGetDomain (datatypes.c:226) ==24569== by 0x4F9311F: remoteDomainLookupByName (remote_driver.c:6636) ==24569== by 0x4F44F20: virDomainLookupByName (libvirt.c:2277) ==24569== by 0x12F616: vshCommandOptDomainBy (virsh-domain.c:105) ==24569== by 0x131C79: cmdStart (virsh-domain.c:3330) ==24569== by 0x12C4AB: vshCommandRun (virsh.c:1752) ==24569== by 0x127001: main (virsh.c:3218) https://bugzilla.redhat.com/show_bug.cgi?id=1067338Signed-off-by: NJincheng Miao <jmiao@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Richard Weinberger 提交于
Destroying a suspended domain needs special action. We cannot simply terminate all process because they are frozen. Do deal with that we send them SIGKILL and thaw them. Upon wakeup the process sees the pending signal and dies immediately. Signed-off-by: NRichard Weinberger <richard@nod.at>
-
由 Ján Tomko 提交于
IN6ADDR_ANY_INIT does not seem to be working as expected on MinGW: error: missing braces around initializer [-Werror=missing-braces] .sin6_addr = IN6ADDR_ANY_INIT, Use the in6addr_any variable instead. Reported by Daniel P. Berrange.
-
由 Michal Privoznik 提交于
Currently, networkRunHook() is called in networkAllocateActualDevice and friends. These functions, however, doesn't necessarily work on networks, For example, if domain's interface is defined in this fashion: <interface type='bridge'> <mac address='52:54:00:0b:3b:16'/> <source bridge='virbr1'/> <model type='rtl8139'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> </interface> The networkAllocateActualDevice jumps directly onto 'validate' label as the interface is not type of 'network'. Hence, @network is left initialized to NULL and networkRunHook(network, ...) is called. One of the things that the hook function does is dereference @network. Soupir. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jim Fehlig 提交于
Modify operation that needs to wait in the queue of modify jobs. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Jim Fehlig 提交于
Setting autostart is a modify operation that needs to wait in the queue of modify jobs. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Jim Fehlig 提交于
These operations aren't necessarily time consuming, but need to wait in the queue of modify jobs. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Jim Fehlig 提交于
These operations aren't necessarily time consuming, but need to wait in the queue of modify jobs. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Jim Fehlig 提交于
Dumping a domain's core can take considerable time. Use the recently added job functions and unlock the virDomainObj while dumping core. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Jim Fehlig 提交于
Saving domain memory and cpu state can take considerable time. Use the recently added job functions and unlock the virDomainObj while saving the domain. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-