<commit_before>#!/bin/bash

CURDIR="$(dirname $(readlink -f ${0}))"
source "${CURDIR}/../../scripts/logger.sh"
source "${CURDIR}/test_func.sh"

#parameters:
# {1} path to folder with installation scripts, roles,... (usually templates/install)
SYSTEMTESTS_DIR=${1}
OPENSHIFT_URL=${OPENSHIFT_URL:-https://localhost:8443}
DOCKER=${DOCKER:-docker}


stop_and_check_openshift
check_if_ansible_ready

ansible-playbook ${SYSTEMTESTS_DIR}/ansible/playbooks/environment.yml \
    --extra-vars "{\"openshift_client_url\": \"$(get_oc_url)\"}" -t openshift,kubectl

clean_docker_images
clean_oc_location

replace_docker_log_driver "${DOCKER}"
DOCKER_STATUS=$(sudo systemctl show --property ActiveState ${DOCKER} | sed -n -e 's/^ActiveState=//p')
if [[ "${DOCKER_STATUS}" != "active" ]]; then
    info "Docker service is not running"
    info "Starting docker service"
    sudo systemctl restart ${DOCKER}
    sudo chmod 777 /var/run/${DOCKER}.sock
fi

OC_CLUSTER_ARGS=$(get_oc_args)
if ! oc cluster up ${OC_CLUSTER_ARGS} ; then
    warn "OpenShift cluster didn't start properly, wait for 30s and try to restart..."
    sleep 30
    oc cluster down<commit_msg>Remove setting for docker log driver (#1994)<commit_after>#!/bin/bash

CURDIR="$(dirname $(readlink -f ${0}))"
source "${CURDIR}/../../scripts/logger.sh"
source "${CURDIR}/test_func.sh"

#parameters:
# {1} path to folder with installation scripts, roles,... (usually templates/install)
SYSTEMTESTS_DIR=${1}
OPENSHIFT_URL=${OPENSHIFT_URL:-https://localhost:8443}
DOCKER=${DOCKER:-docker}


stop_and_check_openshift
check_if_ansible_ready

ansible-playbook ${SYSTEMTESTS_DIR}/ansible/playbooks/environment.yml \
    --extra-vars "{\"openshift_client_url\": \"$(get_oc_url)\"}" -t openshift,kubectl

clean_docker_images
clean_oc_location

DOCKER_STATUS=$(sudo systemctl show --property ActiveState ${DOCKER} | sed -n -e 's/^ActiveState=//p')
if [[ "${DOCKER_STATUS}" != "active" ]]; then
    info "Docker service is not running"
    info "Starting docker service"
    sudo systemctl restart ${DOCKER}
    sudo chmod 777 /var/run/${DOCKER}.sock
fi

OC_CLUSTER_ARGS=$(get_oc_args)
if ! oc cluster up ${OC_CLUSTER_ARGS} ; then
    warn "OpenShift cluster didn't start properly, wait for 30s and try to restart..."
    sleep 30
    oc cluster down
{'fraction_non_alphanumeric': 0.14954088325317008, 'fraction_numerical': 0.013992129427197202, 'mean_word_length': 4.912144702842378, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5381051', 'n_tokens_mistral': 826, 'n_tokens_neox': 766, 'n_words': 191}