From acdb11e3ef29387d25f9a20da2fd70d8fd374ba8 Mon Sep 17 00:00:00 2001 From: Sergey Novikov Date: Thu, 16 Mar 2017 13:17:12 +0400 Subject: [PATCH] Remove a deprecated fuel migration test Change-Id: I1f9a0f909c823b4baf50891f943e0e4f8be8bbd3 Closes-Bug: 1671805 --- system_test/core/config.py | 8 -- system_test/tests/test_fuel_migration.py | 131 ----------------------- 2 files changed, 139 deletions(-) delete mode 100644 system_test/tests/test_fuel_migration.py diff --git a/system_test/core/config.py b/system_test/core/config.py index 8e1d301e6..5776b8f9e 100644 --- a/system_test/core/config.py +++ b/system_test/core/config.py @@ -84,11 +84,3 @@ def define_custom_groups(): add_group(group="system_test.strength", systest_group="system_test.failover.destroy_controllers.second", config_name="1ctrl_ceph_2ctrl_1comp_1comp_ceph_neutronVLAN") - - add_group(group="fuel_master_migrate", - systest_group="system_test.fuel_migration", - config_name="1ctrl_1comp_neutronVLAN") - - add_group(group="fuel_master_migrate", - systest_group="system_test.fuel_migration", - config_name="1ctrl_1comp_neutronTUN") diff --git a/system_test/tests/test_fuel_migration.py b/system_test/tests/test_fuel_migration.py deleted file mode 100644 index 75772139c..000000000 --- a/system_test/tests/test_fuel_migration.py +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright 2015 Mirantis, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE_2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -from devops.helpers.helpers import icmp_ping -from devops.helpers.helpers import wait -from proboscis.asserts import assert_equal - -from system_test import logger -from system_test import testcase -from system_test import action -from system_test import deferred_decorator - -from system_test.tests import ActionTest -from system_test.actions import BaseActions -from system_test.actions import FuelMasterActions - -from system_test.helpers.decorators import make_snapshot_if_step_fail - - -@testcase(groups=['system_test', 'system_test.fuel_migration']) -class FuelMasterMigrate(ActionTest, BaseActions, FuelMasterActions): - """Fuel master migration to VM - - Scenario: - 1. Create environment - 2. Run network checker - 3. Deploy environment - 4. Run network checker - 5. Migrate Fuel Master to the compute node - 6. Run network checker - 7. Run OSTF - """ - - actions_order = [ - 'setup_master', - 'config_release', - 'make_slaves', - 'revert_slaves', - 'create_env', - 'add_nodes', - 'network_check', - 'deploy_cluster', - 'network_check', - 'start_fuel_migration', - 'check_migration_status', - 'network_check', - 'health_check' - ] - - @deferred_decorator([make_snapshot_if_step_fail]) - @action - def start_fuel_migration(self): - """Migrate Fuel Master to a compute""" - - # Get a compute to migrate Fuel Master to - cluster_id = self.fuel_web.get_last_created_cluster() - compute = self.fuel_web.get_nailgun_cluster_nodes_by_roles( - cluster_id, ['compute'])[0] - logger.info( - 'Fuel Master will be migrated to {0} ' - 'compute'.format(compute['name'])) - - # Start migrating Fuel Master - with self.env.d_env.get_admin_remote() as remote: - slave_name = compute['name'].split('_')[0] - slave_ip = self.fuel_web.get_nailgun_node_by_name(slave_name)['ip'] - result = remote.execute( - 'fuel-migrate {0} >/dev/null &'.format(slave_ip)) - assert_equal(result['exit_code'], 0, - 'Failed to start fuel master migration') - - @deferred_decorator([make_snapshot_if_step_fail]) - @action - def check_migration_status(self): - """Check periodically the status of Fuel Master migration process""" - - logger.info('First reboot of Master node...') - - logger.info('Wait for Master node become offline') - wait(lambda: not icmp_ping(self.env.get_admin_node_ip()), - timeout=60 * 10, - timeout_msg='Master node did not become offline') - - logger.info('Wait for echo from Master node') - wait(lambda: icmp_ping(self.env.get_admin_node_ip()), - timeout=60 * 10, - timeout_msg='Master node did not respond after reboot') - - logger.info('Wait for Master node become online') - self.env.d_env.nodes().admin.await( - network_name='admin', - timeout=60 * 10) - - logger.info('Second reboot of Master node...') - - logger.info('Wait for Master node become offline') - wait(lambda: not icmp_ping(self.env.get_admin_node_ip()), - timeout=60 * 40, - timeout_msg='Master node did not become offline') - - logger.info('Wait for echo from Master node') - wait(lambda: icmp_ping(self.env.get_admin_node_ip()), - timeout=60 * 10, - timeout_msg='Master node did not respond after reboot') - - logger.info('Wait for Master node become online') - self.env.d_env.nodes().admin.await( - network_name='admin', - timeout=60 * 10) - - logger.info("Wait for file 'migration-done' appears") - with self.env.d_env.get_admin_remote() as remote: - wait(lambda: remote.exists("/tmp/migration-done"), - timeout=60 * 10, - timeout_msg="File /tmp/migration-done wasn't appeared") - logger.info("Migration complete!") - - logger.info("Wait for Slave nodes become online") - self.fuel_web.wait_nodes_get_online_state( - self.env.d_env.nodes().slaves[:2], timeout=60 * 20)