Merge "Added wait to check if ceph is recovered"

This commit is contained in:
Jenkins 2014-04-07 14:00:22 +00:00 committed by Gerrit Code Review
commit 1a1e7857d9
2 changed files with 8 additions and 8 deletions

View File

@ -18,6 +18,7 @@ from fuelweb_test import logwrap
from proboscis.asserts import assert_equal from proboscis.asserts import assert_equal
from proboscis.asserts import assert_false from proboscis.asserts import assert_false
from proboscis.asserts import assert_true from proboscis.asserts import assert_true
from devops.helpers.helpers import wait
import os import os
from time import sleep from time import sleep
@ -25,10 +26,11 @@ import urllib
@logwrap @logwrap
def check_ceph_health(ssh, recovery_timeout=False): def check_ceph_health(ssh):
if recovery_timeout: wait(
logger.debug("Timeout for ceph recovery.") lambda: 'HEALTH_OK' in ''.join(ssh.execute('ceph -s')['stdout']),
sleep(300) interval=120,
timeout=360)
# Check Ceph node disk configuration: # Check Ceph node disk configuration:
disks = ''.join(ssh.execute( disks = ''.join(ssh.execute(

View File

@ -133,16 +133,14 @@ class CephHARestart(TestBasic):
# Destroy osd-node # Destroy osd-node
self.env.nodes().slaves[5].destroy() self.env.nodes().slaves[5].destroy()
check_ceph_health(self.env.get_ssh_to_remote_by_name('slave-01'), check_ceph_health(self.env.get_ssh_to_remote_by_name('slave-01'))
recovery_timeout=True)
self.fuel_web.run_ostf( self.fuel_web.run_ostf(
cluster_id=cluster_id, cluster_id=cluster_id,
should_fail=0) should_fail=0)
# Destroy compute node # Destroy compute node
self.env.nodes().slaves[4].destroy() self.env.nodes().slaves[4].destroy()
check_ceph_health(self.env.get_ssh_to_remote_by_name('slave-01'), check_ceph_health(self.env.get_ssh_to_remote_by_name('slave-01'))
recovery_timeout=True)
self.fuel_web.run_ostf(cluster_id=cluster_id) self.fuel_web.run_ostf(cluster_id=cluster_id)
# Cold restart # Cold restart