add failover test manila_shut_reb_compute

Change-Id: I4d9198b546ca6e2f13a4482d59fe75ca243d21f5
This commit is contained in:
Volodymyr Rozhanskyy 2016-10-05 14:11:56 +03:00
parent 50ce137cd9
commit 28dde0df94
1 changed files with 81 additions and 0 deletions

View File

@ -113,3 +113,84 @@ class TestManilaIntegration(TestBasic):
self.show_step(10)
TestPluginCheck(self).verify_manila_functionality()
@test(depends_on=[SetupEnvironment.prepare_slaves_3],
groups=["manila_shut_reb_compute"])
@log_snapshot_after_test
def manila_shut_reb_compute(self):
"""Check that manila-service works after compute shutdown/reboot.
Scenario:
1. Upload plugins and install.
2. Create environment :
* Networking: Neutron with VLAN segmentation
* Block Storage: LVM
* Other Storages: default
* Additional services: disabled
3. Enable plugin and add nodes with following roles:
* Controller + Cinder + Manila-share + Manila-data
* Compute
* Compute
4. Deploy cluster with plugin.
5. Shutdown first and reboot second compute node.
6. Run OSTF
7. Verify Manila service basic functionality (share create/mount).
8. Shutdown second and turn on first compute node
9. Run OSTF.
10. Verify Manila service basic functionality (share add/mount).
"""
self.env.revert_snapshot("ready_with_3_slaves")
self.show_step(1)
plugin.install_manila_plugin(self.ssh_manager.admin_ip)
plugin.upload_manila_image(self.ssh_manager.admin_ip)
self.show_step(2)
cluster_id = self.fuel_web.create_cluster(
name=self.__class__.__name__,
settings={}
)
self.show_step(3)
plugin.enable_plugin_manila(cluster_id, self.fuel_web)
self.fuel_web.update_nodes(
cluster_id,
{'slave-01': ['controller', 'cinder', 'manila-share',
'manila-data'],
'slave-02': ['compute'],
'slave-03': ['compute']
}
)
self.show_step(4)
self.fuel_web.deploy_cluster_wait(cluster_id)
self.show_step(5)
d_comp_1 = self.fuel_web.get_devops_node_by_nailgun_node(
self.fuel_web.get_nailgun_node_by_base_name(
base_node_name='slave-02'))
d_comp_2 = self.fuel_web.get_devops_node_by_nailgun_node(
self.fuel_web.get_nailgun_node_by_base_name(
base_node_name='slave-03'))
self.fuel_web.warm_shutdown_nodes([d_comp_1])
self.fuel_web.cold_restart_nodes([d_comp_2], wait_online=True)
self.show_step(6)
cluster_id = self.fuel_web.get_last_created_cluster()
self.fuel_web.run_ostf(cluster_id=cluster_id,
test_sets=['smoke', 'sanity'])
self.show_step(7)
TestPluginCheck(self).verify_manila_functionality()
self.show_step(8)
self.fuel_web.warm_start_nodes([d_comp_1])
self.fuel_web.warm_shutdown_nodes([d_comp_2])
self.show_step(9)
self.fuel_web.run_ostf(cluster_id=cluster_id,
test_sets=['smoke', 'sanity'])
self.show_step(10)
TestPluginCheck(self).verify_manila_functionality()