Ejemplo n.º 1
0
    def health_checker(self):
        """
        Check Ceph health

        """
        try:
            status = ceph_health_check_base()
            if status:
                log.info("Health check passed")
        except CephHealthException as e:
            # skip because ceph is not in good health
            pytest.skip(str(e))
Ejemplo n.º 2
0
def health_checker(request):
    node = request.node
    # Limit the health check for tier4a, tier4b, tier4c
    tier4_marks = ['tier4', 'tier4a', 'tier4b', 'tier4c']
    for mark in node.iter_markers():
        if mark.name in tier4_marks:
            log.info("Checking for Ceph Health OK ")
            try:
                status = ceph_health_check_base()
                if status:
                    log.info("Health check passed")
                    return
            except CephHealthException:
                # skip because ceph is not in good health
                pytest.skip("Ceph Health check failed")