Generalize configuration for controller access.
Add comment about libvirt resize. Fix stress bug. Change-Id: Ieb751abd24fb7a5bc4747550c465541ab2fbfc9e
This commit is contained in:
parent
e7c423e8a2
commit
30fe84adbd
@ -21,6 +21,9 @@ build_interval=10
|
|||||||
build_timeout=600
|
build_timeout=600
|
||||||
catalog_type=compute
|
catalog_type=compute
|
||||||
create_image_enabled=true
|
create_image_enabled=true
|
||||||
|
# For resize to work with libvirt/kvm, one of the following must be true:
|
||||||
|
# Single node: allow_resize_to_same_host=True must be set in nova.conf
|
||||||
|
# Cluster: the 'nova' user must have scp access between cluster nodes
|
||||||
resize_available=true
|
resize_available=true
|
||||||
|
|
||||||
[image]
|
[image]
|
||||||
|
@ -23,14 +23,15 @@ Environment
|
|||||||
------------
|
------------
|
||||||
This particular framework assumes your working Nova cluster understands Nova
|
This particular framework assumes your working Nova cluster understands Nova
|
||||||
API 2.0. The stress tests can read the logs from the cluster. To enable this
|
API 2.0. The stress tests can read the logs from the cluster. To enable this
|
||||||
you have to
|
you have to provide the hostname to call 'nova-manage' and
|
||||||
provide the private key and user name for ssh to the cluster in the
|
the private key and user name for ssh to the cluster in the
|
||||||
[stress] section of tempest.conf. You also need to provide the
|
[stress] section of tempest.conf. You also need to provide the
|
||||||
value of --logdir in nova.conf:
|
value of --logdir in nova.conf:
|
||||||
|
|
||||||
host_private_key_path=<path to private ssh key>
|
host_private_key_path=<path to private ssh key>
|
||||||
host_admin_user=<name of user for ssh command>
|
host_admin_user=<name of user for ssh command>
|
||||||
nova_logdir=<value of --logdir in nova.conf>
|
nova_logdir=<value of --logdir in nova.conf>
|
||||||
|
controller=<hostname for calling nova-manage>
|
||||||
|
|
||||||
The stress test needs the top-level tempest directory to be on PYTHONPATH
|
The stress test needs the top-level tempest directory to be on PYTHONPATH
|
||||||
if you are not using nosetests to run.
|
if you are not using nosetests to run.
|
||||||
|
@ -41,3 +41,8 @@ class StressConfig(object):
|
|||||||
def nova_logdir(self):
|
def nova_logdir(self):
|
||||||
"""Directory containing log files on the compute nodes"""
|
"""Directory containing log files on the compute nodes"""
|
||||||
return self.get("nova_logdir", None)
|
return self.get("nova_logdir", None)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def controller(self):
|
||||||
|
"""Controller host"""
|
||||||
|
return self.get("controller", None)
|
||||||
|
@ -57,7 +57,8 @@ class TestCreateVM(test_case.StressTestCase):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
_key_name = kwargs.get('key_name', '')
|
_key_name = kwargs.get('key_name', '')
|
||||||
_timeout = int(kwargs.get('timeout', 60))
|
_timeout = int(kwargs.get('timeout',
|
||||||
|
manager.config.compute.build_timeout))
|
||||||
_image_ref = kwargs.get('image_ref', manager.config.compute.image_ref)
|
_image_ref = kwargs.get('image_ref', manager.config.compute.image_ref)
|
||||||
_flavor_ref = kwargs.get('flavor_ref',
|
_flavor_ref = kwargs.get('flavor_ref',
|
||||||
manager.config.compute.flavor_ref)
|
manager.config.compute.flavor_ref)
|
||||||
@ -172,7 +173,7 @@ class TestKillActiveVM(test_case.StressTestCase):
|
|||||||
self._logger.info('no ACTIVE instances to delete')
|
self._logger.info('no ACTIVE instances to delete')
|
||||||
return
|
return
|
||||||
|
|
||||||
_timeout = kwargs.get('timeout', 600)
|
_timeout = kwargs.get('timeout', manager.config.compute.build_timeout)
|
||||||
|
|
||||||
target = random.choice(active_vms)
|
target = random.choice(active_vms)
|
||||||
killtarget = target[0]
|
killtarget = target[0]
|
||||||
@ -240,7 +241,7 @@ class TestKillAnyVM(test_case.StressTestCase):
|
|||||||
self._logger.info('no active instances to delete')
|
self._logger.info('no active instances to delete')
|
||||||
return
|
return
|
||||||
|
|
||||||
_timeout = kwargs.get('timeout', 60)
|
_timeout = kwargs.get('timeout', manager.config.compute.build_timeout)
|
||||||
|
|
||||||
target = random.choice(vms)
|
target = random.choice(vms)
|
||||||
killtarget = target[0]
|
killtarget = target[0]
|
||||||
@ -276,7 +277,7 @@ class TestUpdateVMName(test_case.StressTestCase):
|
|||||||
self._logger.info('no active instances to update')
|
self._logger.info('no active instances to update')
|
||||||
return
|
return
|
||||||
|
|
||||||
_timeout = kwargs.get('timeout', 600)
|
_timeout = kwargs.get('timeout', manager.config.compute.build_timeout)
|
||||||
|
|
||||||
target = random.choice(active_vms)
|
target = random.choice(active_vms)
|
||||||
update_target = target[0]
|
update_target = target[0]
|
||||||
|
@ -20,13 +20,8 @@ from stress.driver import *
|
|||||||
from tempest import openstack
|
from tempest import openstack
|
||||||
|
|
||||||
choice_spec = [
|
choice_spec = [
|
||||||
BasherAction(TestCreateVM(), 50,
|
BasherAction(TestCreateVM(), 50),
|
||||||
kargs={'timeout': '600',
|
BasherAction(TestKillActiveVM(), 50)
|
||||||
'image_ref': 2,
|
|
||||||
'flavor_ref': 1}
|
|
||||||
),
|
|
||||||
BasherAction(TestKillActiveVM(), 50,
|
|
||||||
kargs={'timeout': '600'})
|
|
||||||
]
|
]
|
||||||
|
|
||||||
nova = openstack.Manager()
|
nova = openstack.Manager()
|
||||||
|
@ -21,10 +21,9 @@ from stress.driver import *
|
|||||||
from tempest import openstack
|
from tempest import openstack
|
||||||
|
|
||||||
choice_spec = [
|
choice_spec = [
|
||||||
BasherAction(TestCreateVM(), 50,
|
BasherAction(TestCreateVM(), 50),
|
||||||
kargs={'timeout': '600'}),
|
|
||||||
BasherAction(TestRebootVM(), 50,
|
BasherAction(TestRebootVM(), 50,
|
||||||
kargs={'type': 'HARD'}),
|
kargs={'type': 'HARD'})
|
||||||
]
|
]
|
||||||
|
|
||||||
nova = openstack.Manager()
|
nova = openstack.Manager()
|
||||||
|
@ -32,6 +32,7 @@ def scp(keypath, args):
|
|||||||
|
|
||||||
|
|
||||||
def ssh(keypath, user, node, command, check=True):
|
def ssh(keypath, user, node, command, check=True):
|
||||||
|
command = 'sudo ' + command
|
||||||
command = "ssh %s %s@%s %s" % (get_ssh_options(keypath), user,
|
command = "ssh %s %s@%s %s" % (get_ssh_options(keypath), user,
|
||||||
node, command)
|
node, command)
|
||||||
popenargs = shlex.split(command)
|
popenargs = shlex.split(command)
|
||||||
|
@ -202,4 +202,4 @@ class ListImagesTest(unittest.TestCase):
|
|||||||
Simple test to see all fixture images returned
|
Simple test to see all fixture images returned
|
||||||
"""
|
"""
|
||||||
images = self.client.get_images()
|
images = self.client.get_images()
|
||||||
self.assertEqual(10, len(images) - len(cls.original_images))
|
self.assertEqual(10, len(images) - len(self.original_images))
|
||||||
|
Loading…
Reference in New Issue
Block a user