Merge "Changing of test description for ha_neutron_disconnect_controllers"

This commit is contained in:
Jenkins 2015-09-10 12:40:51 +00:00 committed by Gerrit Code Review
commit 8eb76e2e6a
3 changed files with 9 additions and 14 deletions

View File

@ -2004,9 +2004,9 @@ class FuelWebClient(object):
@logwrap
def get_nailgun_primary_node(self, slave, role='primary-controller'):
# returns controller or mongo that is primary in nailgun
remote = self.get_ssh_for_node(slave.name)
data = yaml.load(''.join(
remote.execute('cat /etc/astute.yaml')['stdout']))
with self.get_ssh_for_node(slave.name) as remote:
data = yaml.load(''.join(
remote.execute('cat /etc/astute.yaml')['stdout']))
node_name = [node['fqdn'] for node in data['nodes']
if node['role'] == role][0]
logger.debug("node name is {0}".format(node_name))

View File

@ -73,13 +73,10 @@ class TestHaNeutronFailover(TestHaFailoverBase):
Scenario:
1. Block traffic on br-mgmt of the first controller
2. Check pacemaker status
3. Revert environment
4. Block traffic on br-mgmt of the second controller
5. Check pacemaker status
6. Wait until MySQL Galera is UP on some controller
7. Run OSTF
3. Wait until MySQL Galera is UP on some controller
4. Run OSTF
Duration 45m
Duration 15m
"""
super(self.__class__, self).ha_disconnect_controllers()

View File

@ -162,10 +162,11 @@ class TestHaFailoverBase(TestBasic):
should_fail=1)
def ha_disconnect_controllers(self):
if not self.env.d_env.has_snapshot(self.snapshot_name):
if not self.env.revert_snapshot(self.snapshot_name):
raise SkipTest()
self.env.revert_snapshot(self.snapshot_name)
cluster_id = self.fuel_web.client.get_cluster_id(
self.__class__.__name__)
with self.fuel_web.get_ssh_for_node(
self.env.d_env.nodes().slaves[0].name) as remote:
@ -174,9 +175,6 @@ class TestHaFailoverBase(TestBasic):
'iptables -I OUTPUT -o br-mgmt -j DROP')
remote.check_call(cmd)
cluster_id = self.fuel_web.client.get_cluster_id(
self.__class__.__name__)
# Wait until MySQL Galera is UP on some controller
self.fuel_web.wait_mysql_galera_is_up(['slave-02'])
try: