Add test for checking HA after scaling of vCenter enviroment

Change-Id: I7a0f3c47e1029894e811bc886c32b04c5773a3de
Closes-bug: #1611820
This commit is contained in:
ibumarskov 2016-08-16 17:38:02 +03:00 committed by Ilya Bumarskov
parent 74bc13f2cd
commit 89db499ebd
2 changed files with 21 additions and 15 deletions

View File

@ -665,7 +665,7 @@ class VMwareActions(object):
"""Return name of controller with VIPs."""
for node in self.env.d_env.nodes().slaves:
ng_node = self.env.fuel_web.get_nailgun_node_by_devops_node(node)
if ng_node['online']:
if ng_node['online'] and 'controller' in ng_node['roles']:
hosts_vip = self.fuel_web.get_pacemaker_resource_location(
ng_node['devops_name'], 'vip__management')
logger.info('Now primary controller is '
@ -754,11 +754,14 @@ class VMwareActions(object):
@deferred_decorator([make_snapshot_if_step_fail])
@action
def ostf_with_services_fail(self):
def ostf_with_haproxy_fail(self):
"""Run OSTF tests (one should fail)."""
self.env.fuel_web.run_ostf(
self.cluster_id, should_fail=1,
failed_test_name='Check that required services are running')
self.cluster_id,
test_sets=['sanity', 'smoke', 'ha'],
should_fail=1,
failed_test_name=['Check state of haproxy backends on controllers']
)
@deferred_decorator([make_snapshot_if_step_fail])
@action

View File

@ -84,15 +84,17 @@ class ShutdownPrimaryWithVMware(ActionTest, BaseActions, VMwareActions):
6. Configure vmware settings (depends on yaml config)
7. Deploy the cluster
8. Create instances on Nova and vCenter
9. Shutdown primary controller
10. Verify networks
11. Ensure that VIPs are moved to other controller
12. Ensure connectivity between VMs
13. Run OSTF tests (one should fail)
14. Turn on primary controller
15. Wait 5-10 minutes
16. Verify networks
17. Run OSTF tests
9. Add nodes (depends on yaml config)
10 Deploy changes
11. Shutdown primary controller
12. Verify networks
13. Ensure that VIPs are moved to other controller
14. Ensure connectivity between VMs
15. Run OSTF tests (one should fail)
16. Turn on primary controller
17. Wait 5-10 minutes
18. Verify networks
19. Run OSTF tests
Duration 3h 00min
Snapshot vcenter_shutdown_ctrl
@ -110,13 +112,14 @@ class ShutdownPrimaryWithVMware(ActionTest, BaseActions, VMwareActions):
'configure_vcenter',
'deploy_cluster',
'create_instances',
'scale_node',
'deploy_changes',
'shutdown_primary',
'wait_ha_services',
'network_check',
'check_up_vips',
'check_vm_connect',
'delete_instances',
'ostf_with_services_fail',
'ostf_with_haproxy_fail',
'turn_on_primary',
'wait_ha_services',
'network_check',