nova/nova/tests/unit/virt/libvirt
Daniel P. Berrange 6bc37dccec virt: set address space & CPU time limits when running qemu-img
This uses the new 'prlimit' parameter for oslo.concurrency execute
method, to set an address space limit of 1GB and CPU time limit
of 2 seconds, when running qemu-img.

This is a re-implementation of the previously reverted commit

commit da217205f5
Author: Tristan Cacqueray <tdecacqu@redhat.com>
Date:   Wed Aug 5 17:17:04 2015 +0000

    virt: Use preexec_fn to ulimit qemu-img info call

NOTE (kchamart) [stable/liberty]: Add a check for the presence of
'ProcessLimits' attribute (which is only present in
oslo.concurrency>=2.6.1; and a conditional check for 'prlimit' parameter
in qemu_img_info() method.

Upstream discussion[1][2] that led to merging this patch to
stable/liberty branch.

[1] http://lists.openstack.org/pipermail/openstack-dev/2016-September/104091.html
[2] http://lists.openstack.org/pipermail/openstack-dev/2016-September/104303.html

Closes-Bug: #1449062
Change-Id: I135b5242af1bfdcb0ea09a6fcda21fc03a6fbe7d
(cherry picked from commit 068d851561)
2016-09-22 13:35:24 +02:00
..
storage libvirt: Fix/implement revert-resize for RBD-backed images 2016-02-18 12:41:25 +11:00
volume Merge "libvirt:Rsync compression removed" 2015-09-10 17:50:22 +00:00
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
fake_imagebackend.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
fake_libvirt_utils.py libvirt: Fix/implement revert-resize for RBD-backed images 2016-02-18 12:41:25 +11:00
fake_os_brick_connector.py Switch to using os-brick 2015-07-27 10:47:22 -07:00
fakelibvirt.py Limit parallel live migrations in progress 2015-08-13 07:06:56 -07:00
test_blockinfo.py Add ppcle architectures to libvirt blockinfo 2016-03-16 16:37:18 +00:00
test_compat.py Workaround for race condition in libvirt 2015-03-14 20:17:41 -03:00
test_config.py Merge "libvirt-vif: Allow to configure a script on bridge interface" 2015-09-16 00:04:37 +00:00
test_designer.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
test_driver.py virt: set address space & CPU time limits when running qemu-img 2016-09-22 13:35:24 +02:00
test_fakelibvirt.py Removed unused variables 2015-05-20 14:31:33 +03:00
test_firewall.py libvirt: retry to undefine network filters during _post_live_migration 2015-04-29 10:48:23 -07:00
test_guest.py Add retry logic for detaching device using LibVirt 2016-02-12 17:31:47 +00:00
test_host.py libvirt: don't attempt to get baseline cpu features if host cpu model is None 2016-03-21 19:55:52 +00:00
test_imagebackend.py compute: improve exceptions related to disk size checks 2015-08-19 12:54:56 -07:00
test_imagecache.py Get py34 subunit.run test discovery to work 2015-07-28 10:40:56 +00:00
test_utils.py virt: set address space & CPU time limits when running qemu-img 2016-09-22 13:35:24 +02:00
test_vif.py stop setting mtu when plugging vhost-user ports 2016-04-14 13:27:25 +02:00