Fix fuel master node migration test

- Move assigned_slaves attribute from class scope of BaseActions
class to instance scope of ActionTest class. This is to have this
attribute reset before each template based test of the same run
(otherwise it brings slave info from the 1st test to 2nd and so on).
- Add waiting for cluster nodes to be online after migration.

Change-Id: Ie6e6df4932603e84f66023c6843d58a0d9470f68
Partial-Bug: #1559050
(cherry picked from commit ac04cb9c94)
This commit is contained in:
Dmitriy Kruglov 2016-03-24 08:58:51 +00:00
parent 1d43e9a3ca
commit 4289bee5de
3 changed files with 6 additions and 5 deletions

View File

@ -195,7 +195,6 @@ class BaseActions(PrepareActions, HealthCheckActions, PluginsActions):
base_group = None base_group = None
actions_order = None actions_order = None
cluster_id = None cluster_id = None
assigned_slaves = set()
scale_step = 0 scale_step = 0
def _add_node(self, nodes_list): def _add_node(self, nodes_list):

View File

@ -22,3 +22,4 @@ class ActionTest(base_test_case.TestBasic, ActionsFactory):
def __init__(self, config_file=None): def __init__(self, config_file=None):
super(ActionTest, self).__init__() super(ActionTest, self).__init__()
self.config_file = config_file self.config_file = config_file
self.assigned_slaves = set()

View File

@ -40,9 +40,8 @@ class FuelMasterMigrate(ActionTest, BaseActions, FuelMasterActions):
3. Deploy environment 3. Deploy environment
4. Run network checker 4. Run network checker
5. Migrate Fuel Master to the compute node 5. Migrate Fuel Master to the compute node
6. Check that containers are up and running on the Fuel Master 6. Run network checker
7. Run network checker 7. Run OSTF
8. Run OSTF
""" """
actions_order = [ actions_order = [
@ -57,7 +56,6 @@ class FuelMasterMigrate(ActionTest, BaseActions, FuelMasterActions):
'network_check', 'network_check',
'start_fuel_migration', 'start_fuel_migration',
'check_migration_status', 'check_migration_status',
'check_containers',
'network_check', 'network_check',
'health_check' 'health_check'
] ]
@ -129,3 +127,6 @@ class FuelMasterMigrate(ActionTest, BaseActions, FuelMasterActions):
wait(lambda: not remote.exists("/notready"), wait(lambda: not remote.exists("/notready"),
timeout=900, timeout=900,
timeout_msg="File wasn't removed in 900 sec") timeout_msg="File wasn't removed in 900 sec")
self.fuel_web.wait_nodes_get_online_state(
self.env.d_env.nodes().slaves[:2])