fuel-qa/fuelweb_test/tests/tests_scale/test_scale_group_4.py
Andrey Lavrentyev fcdb73a51b Update docstring test descriptions
Change docstring test steps in test_admin_node.py in check_rpm_packages_signed()
Change docstring test steps in test_admin_node.py
  in check_remote_packages_and_mos_repositories_signed()
Change docstring test steps in test_cli.py in cli_selected_nodes_deploy()
Change docstring test steps in test_ssl.py in master_node_with_https_only()
Change docstring test steps and show_step() numbers in test_ssl.py
  in endpoints_with_disabled_ssl()
Change docstring test steps and show_step() numbers in test_cli_deploy.py
  in cli_deploy_neutron_tun()
Change docstring test steps and show_step() numbers in test_cli_deploy.py
  in cli_deploy_tasks()
Change docstring test steps and show_step() numbers in test_cli_deploy_ceph.py
  in cli_deploy_ceph_neutron_tun()
Change docstring test steps and show_step() numbers in test_cli_deploy_ceph.py
  in cli_deploy_ceph_neutron_vlan()
Change docstring test steps and show_step() numbers in test_cli_role.py
  in cli_update_role()
Change docstring test steps and show_step() numbers in test_cli_role.py
  in cli_create_role()
Change docstring test steps and show_step() numbers in test_cli_role.py
  in cli_create_role_with_has_primary()
Change docstring test steps and show_step() numbers in test_cli_role.py
  in cli_delete_role()
Change docstring test steps and show_step() numbers in test_cli_role.py
  in cli_incorrect_update_role()
Change docstring test steps in test_ha_tun_group_1.py in tun_controller_base_os()
Change docstring test steps in test_ha_tun_group_1.py
  in tun_ceph_for_images_and_objects()
Change docstring test steps in test_ha_tun_group_2.py in tun_ha_ceph_base_os()
Change docstring test steps in test_ha_tun_group_2.py in tun_ceph_all()
Change docstring test steps in test_ha_tun_group_3.py
  in tun_no_volumes_ceph_for_images_and_ephemeral()
Change docstring test steps in test_ha_tun_group_3.py
  in tun_5_ctrl_ceph_ephemeral()
Change docstring test steps in test_ha_vlan_group_1.py
  in cinder_ceph_for_images()
Change docstring test steps in test_ha_vlan_group_1.py
  in ceph_for_volumes_swift()
Change docstring test steps in test_ha_vlan_group_2.py
  in cinder_ceph_for_ephemeral()
Change docstring test steps in test_ha_vlan_group_2.py
  in cinder_ceph_for_images_ephemeral()
Change docstring test steps in test_ha_vlan_group_3.py
  in no_storage_for_volumes_swift()
Change docstring test steps and show_step() in test_ha_vlan_group_3.py
  in ceph_volumes_ephemeral()
Change docstring test steps in test_ha_vlan_group_4.py
  in four_controllers()
Change docstring test steps and show_step() in test_ha_vlan_group_4.py
  in ceph_rados_gw_no_storage_volumes()
Change docstring test steps and show_step() in test_ha_vlan_group_5.py
  in ceph_for_volumes_images_ephemeral_rados()
Change docstring test steps and show_step() in test_ha_vlan_group_5.py
  in cinder_ceph_for_images_ephemeral_rados()
Change docstring test steps and show_step() in test_ha_vlan_group_6.py
  in ceph_for_images_ephemeral_rados()
Change docstring test steps and show_step() in test_ha_vlan_group_6.py
  in ceph_for_volumes_images_ephemeral()
Change docstring test steps in test_ha_vlan_group_7.py
  in ceph_for_images()
Change docstring test steps in test_ha_vlan_group_7.py
  in ha_vlan_operating_system()
Change docstring test description in test_use_mirror.py
  in deploy_with_custom_mirror()
Change docstring test steps in test_mongo_multirole.py
  in ha_ceilometer_untag_network()
Change docstring test steps and show_step() in test_multirole_group_1.py
  in controller_ceph_and_compute_cinder()
Change docstring test steps and show_step() in test_multirole_group_1.py
  in controller_ceph_cinder_compute_ceph_cinder()
Change docstring test steps and show_step() in test_mixed_os_components.py
  in mixed_components_murano_sahara_ceilometer()
Change docstring test description in test_scale_group_1.py
  in add_controllers_stop()
Change docstring test description in test_scale_group_1.py
  in add_ceph_stop()
Change docstring test description in test_scale_group_2.py
  in replace_primary_controller()
Change docstring test description in test_scale_group_2.py
  in remove_controllers()
Change docstring test steps and show_step() in test_scale_group_3.py
  in add_delete_compute()
Change docstring test steps and show_step() in test_scale_group_3.py
  in add_delete_cinder()
Change docstring test steps in test_scale_group_4.py
  in add_delete_ceph()
Change docstring test steps and show_step() in test_scale_group_4.py
  in add_delete_cinder_ceph()
Correct misspelling in test_scale_group_5.py
Correct misspelling in test_scale_group_6.py
Add show_step() in test_deploy_platform_components.py
Change docstring test steps and show_step() in test_deploy_platform_components.py
  in acceptance_deploy_platform_components_ceilometer()
Change docstring test steps in test_separate_db_ceph.py
  in separate_db_ceph_service()
Change docstring test steps in test_separate_keystone_ceph.py
  in separate_keystone_ceph_service()
Change docstring test steps in test_separate_rabbitmq_ceph.py
  in separate_rabbit_ceph_service()
Change docstring test steps in test_failover_group_1.py
  in lock_db_access_from_primary_controller()
Change docstring test steps in test_failover_group_1.py
  in recovery_neutron_agents_after_restart()
Change docstring test steps in test_failover_group_1.py
  in safe_reboot_primary_controller()
Change docstring test steps in test_failover_group_1.py
  in hard_reset_primary_controller()
Change docstring test steps and swap order of ostf tests and network verification
  in test_failover_group_1.py in power_outage_cinder_cluster()
Change docstring test steps in test_failover_group_2.py
  in safe_reboot_primary_controller_ceph()
Change docstring test steps and show_step() in test_failover_group_2.py
  in hard_reboot_primary_controller_ceph()
Change docstring test steps in test_failover_mongo.py
  in kill_mongo_processes()
Change docstring test steps in test_failover_mongo.py
  in close_connections_for_mongo()
Change docstring test steps in test_failover_mongo.py
  in shut_down_mongo_node()

Change-Id: I570478614682d237fd95c67d51597a35b94c610c
Closes-Bug: #1560931
2016-04-05 15:38:15 +03:00

263 lines
8.8 KiB
Python

# 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 proboscis import test
from fuelweb_test.helpers.decorators import log_snapshot_after_test
from fuelweb_test.settings import DEPLOYMENT_MODE
from fuelweb_test.tests.base_test_case import SetupEnvironment
from fuelweb_test.tests.base_test_case import TestBasic
@test(groups=["ha_scale_group_4"])
class HaScaleGroup4(TestBasic):
"""HaScaleGroup4.""" # TODO documentation
@test(depends_on=[SetupEnvironment.prepare_slaves_9],
groups=["add_delete_ceph"])
@log_snapshot_after_test
def add_delete_ceph(self):
"""Deployment with 3 controllers, NeutronVlan, with add, delete,
add/delete ceph node
Scenario:
1. Create cluster: Neutron VLAN, ceph for volumes and images,
ceph for ephemeral and Rados GW
2. Add 3 controller, 1 compute, 3 ceph nodes
3. Deploy the cluster
4. Add 1 ceph node
5. Deploy changes
6. Verify network
7. Run OSTF
8. Add 1 ceph node and delete one deployed ceph node
9. Deploy changes
10. Run OSTF
11. Verify networks
12. Delete one ceph node
13. Deploy changes
14. Verify networks
15. Run OSTF
Duration 120m
Snapshot add_delete_ceph
"""
self.env.revert_snapshot("ready_with_9_slaves")
self.show_step(1, initialize=True)
cluster_id = self.fuel_web.create_cluster(
name=self.__class__.__name__,
mode=DEPLOYMENT_MODE,
settings={
'volumes_lvm': False,
'volumes_ceph': True,
'images_ceph': True,
'ephemeral_ceph': True,
'objects_ceph': True
}
)
self.show_step(2)
self.fuel_web.update_nodes(
cluster_id,
{
'slave-01': ['controller'],
'slave-02': ['controller'],
'slave-03': ['controller'],
'slave-04': ['compute'],
'slave-05': ['ceph-osd'],
'slave-06': ['ceph-osd'],
'slave-07': ['ceph-osd']
}
)
self.show_step(3)
self.fuel_web.deploy_cluster_wait(cluster_id)
self.show_step(4)
nodes = {'slave-08': ['ceph-osd']}
self.fuel_web.update_nodes(
cluster_id, nodes,
True, False
)
self.show_step(5)
self.fuel_web.deploy_cluster_wait(cluster_id)
self.show_step(6)
self.fuel_web.verify_network(cluster_id)
self.show_step(7)
self.fuel_web.run_ostf(cluster_id=cluster_id)
self.show_step(8)
nodes = {'slave-09': ['ceph-osd']}
self.fuel_web.update_nodes(
cluster_id, nodes,
True, False
)
with self.fuel_web.get_ssh_for_node('slave-05') as remote_ceph:
self.fuel_web.prepare_ceph_to_delete(remote_ceph)
nodes = {'slave-05': ['ceph-osd']}
self.fuel_web.update_nodes(
cluster_id, nodes,
False, True
)
self.show_step(9)
self.fuel_web.deploy_cluster_wait(cluster_id)
self.show_step(10)
self.fuel_web.verify_network(cluster_id)
self.show_step(11)
self.fuel_web.run_ostf(cluster_id=cluster_id)
self.show_step(12)
with self.fuel_web.get_ssh_for_node('slave-07') as remote_ceph:
self.fuel_web.prepare_ceph_to_delete(remote_ceph)
nodes = {'slave-07': ['ceph-osd']}
self.fuel_web.update_nodes(
cluster_id, nodes,
False, True
)
self.show_step(13)
self.fuel_web.deploy_cluster_wait(cluster_id)
self.show_step(14)
self.fuel_web.verify_network(cluster_id)
self.show_step(15)
self.fuel_web.run_ostf(cluster_id=cluster_id)
self.env.make_snapshot("add_delete_ceph")
@test(depends_on=[SetupEnvironment.prepare_slaves_9],
groups=["add_delete_cinder_ceph"])
@log_snapshot_after_test
def add_delete_cinder_ceph(self):
"""Deployment with 3 controllers, NeutronVLan, with add, delete,
add/delete cinder and ceph node
Scenario:
1. Create cluster: Neutron VLAN, cinder for volumes
and ceph for images
2. Add 3 controller+ceph, 1 compute and 1 cinder nodes
3. Deploy the cluster
4. Add 1 ceph node and 1 cinder node
5. Deploy changes
6. Verify network
7. Run OSTF
8. Add 1 cinder node and delete 1 deployed cinder node
9. Deploy changes
10. Verify network
11. Run OSTF
12. Add 1 ceph node and delete 1 deployed ceph node
13. Deploy changes
14. Verify network
15. Run OSTF
16. Delete 1 cinder and 1 ceph node
17. Deploy changes
18. Verify network
19. Run OSTF
Duration 120m
Snapshot add_delete_cinder_ceph
"""
self.env.revert_snapshot("ready_with_9_slaves")
self.show_step(1, initialize=True)
cluster_id = self.fuel_web.create_cluster(
name=self.__class__.__name__,
mode=DEPLOYMENT_MODE,
settings={
'volumes_lvm': True,
'images_ceph': True
}
)
self.show_step(2)
self.fuel_web.update_nodes(
cluster_id,
{
'slave-01': ['controller', 'ceph-osd'],
'slave-02': ['controller', 'ceph-osd'],
'slave-03': ['controller', 'ceph-osd'],
'slave-04': ['compute'],
'slave-05': ['cinder']
}
)
self.show_step(3)
self.fuel_web.deploy_cluster_wait(cluster_id)
self.show_step(4)
nodes = {'slave-06': ['cinder'],
'slave-07': ['ceph-osd']}
self.fuel_web.update_nodes(
cluster_id, nodes,
True, False
)
self.show_step(5)
self.fuel_web.deploy_cluster_wait(cluster_id)
self.show_step(6)
self.fuel_web.verify_network(cluster_id)
self.show_step(7)
self.fuel_web.run_ostf(cluster_id=cluster_id)
self.show_step(8)
nodes = {'slave-08': ['cinder']}
self.fuel_web.update_nodes(
cluster_id, nodes,
True, False
)
nodes = {'slave-06': ['cinder']}
self.fuel_web.update_nodes(
cluster_id, nodes,
False, True
)
self.show_step(9)
self.fuel_web.deploy_cluster_wait(cluster_id)
self.show_step(10)
self.fuel_web.verify_network(cluster_id)
self.show_step(11)
self.fuel_web.run_ostf(cluster_id=cluster_id)
self.show_step(12)
nodes = {'slave-09': ['ceph-osd']}
self.fuel_web.update_nodes(
cluster_id, nodes,
True, False
)
with self.fuel_web.get_ssh_for_node('slave-07') as remote_ceph:
self.fuel_web.prepare_ceph_to_delete(remote_ceph)
nodes = {'slave-07': ['ceph-osd']}
self.fuel_web.update_nodes(
cluster_id, nodes,
False, True
)
self.show_step(13)
self.fuel_web.deploy_cluster_wait(cluster_id)
self.show_step(14)
self.fuel_web.verify_network(cluster_id)
self.show_step(15)
self.fuel_web.run_ostf(cluster_id=cluster_id)
self.show_step(16)
nodes = {'slave-08': ['cinder']}
self.fuel_web.update_nodes(
cluster_id, nodes,
False, True
)
with self.fuel_web.get_ssh_for_node('slave-09') as remote_ceph:
self.fuel_web.prepare_ceph_to_delete(remote_ceph)
nodes = {'slave-09': ['ceph-osd']}
self.fuel_web.update_nodes(
cluster_id, nodes,
False, True
)
self.show_step(17)
self.fuel_web.deploy_cluster_wait(cluster_id)
self.show_step(18)
self.fuel_web.verify_network(cluster_id)
self.show_step(19)
self.fuel_web.run_ostf(cluster_id=cluster_id)
self.env.make_snapshot("add_delete_cinder_ceph")