Merge "Added wait to check if ceph is recovered"
This commit is contained in:
commit
1a1e7857d9
|
@ -18,6 +18,7 @@ from fuelweb_test import logwrap
|
|||
from proboscis.asserts import assert_equal
|
||||
from proboscis.asserts import assert_false
|
||||
from proboscis.asserts import assert_true
|
||||
from devops.helpers.helpers import wait
|
||||
|
||||
import os
|
||||
from time import sleep
|
||||
|
@ -25,10 +26,11 @@ import urllib
|
|||
|
||||
|
||||
@logwrap
|
||||
def check_ceph_health(ssh, recovery_timeout=False):
|
||||
if recovery_timeout:
|
||||
logger.debug("Timeout for ceph recovery.")
|
||||
sleep(300)
|
||||
def check_ceph_health(ssh):
|
||||
wait(
|
||||
lambda: 'HEALTH_OK' in ''.join(ssh.execute('ceph -s')['stdout']),
|
||||
interval=120,
|
||||
timeout=360)
|
||||
|
||||
# Check Ceph node disk configuration:
|
||||
disks = ''.join(ssh.execute(
|
||||
|
|
|
@ -133,16 +133,14 @@ class CephHARestart(TestBasic):
|
|||
|
||||
# Destroy osd-node
|
||||
self.env.nodes().slaves[5].destroy()
|
||||
check_ceph_health(self.env.get_ssh_to_remote_by_name('slave-01'),
|
||||
recovery_timeout=True)
|
||||
check_ceph_health(self.env.get_ssh_to_remote_by_name('slave-01'))
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
should_fail=0)
|
||||
|
||||
# Destroy compute node
|
||||
self.env.nodes().slaves[4].destroy()
|
||||
check_ceph_health(self.env.get_ssh_to_remote_by_name('slave-01'),
|
||||
recovery_timeout=True)
|
||||
check_ceph_health(self.env.get_ssh_to_remote_by_name('slave-01'))
|
||||
self.fuel_web.run_ostf(cluster_id=cluster_id)
|
||||
|
||||
# Cold restart
|
||||
|
|
Loading…
Reference in New Issue