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

View File

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

View File

@ -162,10 +162,11 @@ class TestHaFailoverBase(TestBasic):
should_fail=1) should_fail=1)
def ha_disconnect_controllers(self): 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() 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( with self.fuel_web.get_ssh_for_node(
self.env.d_env.nodes().slaves[0].name) as remote: 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') 'iptables -I OUTPUT -o br-mgmt -j DROP')
remote.check_call(cmd) 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 # Wait until MySQL Galera is UP on some controller
self.fuel_web.wait_mysql_galera_is_up(['slave-02']) self.fuel_web.wait_mysql_galera_is_up(['slave-02'])
try: try: