<commit_before># This file shares common code between mkcloud-${mkclouddriver}.sh files and qa_crowbarsetup.sh

# defaults for generic common variables
: ${arch:=$(uname -m)}
: ${admin_image_password:='<PASSWORD>'}
: ${images_dir:="cloud/images/$arch"}
: ${clouddatadns:=clouddata.nue.suse.com}
: ${clouddata:=$(dig -t A +short $clouddatadns)}
: ${clouddata_base_path:="/repos"}
: ${clouddata_nfs:=$clouddata}
: ${clouddata_nfs_dir:='srv/nfs'}
: ${distsuse:=dist.nue.suse.com}
distsuseip=$(dig -t A +short $distsuse)
: ${susedownload:=download.nue.suse.com}
: ${smturl:="http://$susedownload/update/build.suse.de"}
if [[ $UID != 0 ]] ; then
    : ${sudo:=sudo}
    PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH
fi
: ${libvirt_type:=kvm}
: ${networkingplugin:=openvswitch}
: ${architectures:='aarch64 x86_64 s390x'}
: ${nodenumberlonelynode:=0}
: ${want_mtu_size:=1500}

function max
{
    echo $(( $1 > $2 ? $1 : $2 ))
}

function wait_for
{
    local timecount=${1:-300}
    local timesleep=${2:-1}
    local condition=${3:-'/bin/true'}
    local waitfor=${4:-'unknown process'}
    local error_cmd=${5:-'exit 11'}
    local print_while=${6:-'echo -n .'}

    local original_xstatus=${-//[^x]/}
    timesleep=$((timesleep*${want_timescaling:-1}))
    set +x
    echo "Waiting for: $waitfor"
    echo "  until this condition is true: $condition"
    echo "  waiting $timecount cycles of $timesleep seconds = $(( $timecount * $timesleep )) seconds"
    local n=$timecount
    while test $n -gt 0 && ! eval $condition
    do
        eval "$print_while"
        sleep $timesleep
        n=$(($n - 1))
        [[ $(( ($timecount - $n) % 75)) != 0 ]] || echo
    done
    echo
<commit_msg>mkcloud: dont try to deploy services that cannot work<commit_after># This file shares common code between mkcloud-${mkclouddriver}.sh files and qa_crowbarsetup.sh

# defaults for generic common variables
: ${arch:=$(uname -m)}
: ${admin_image_password:='<PASSWORD>'}
: ${images_dir:="cloud/images/$arch"}
: ${clouddatadns:=clouddata.nue.suse.com}
: ${clouddata:=$(dig -t A +short $clouddatadns)}
: ${clouddata_base_path:="/repos"}
: ${clouddata_nfs:=$clouddata}
: ${clouddata_nfs_dir:='srv/nfs'}
: ${distsuse:=dist.nue.suse.com}
distsuseip=$(dig -t A +short $distsuse)
: ${susedownload:=download.nue.suse.com}
: ${smturl:="http://$susedownload/update/build.suse.de"}
if [[ $UID != 0 ]] ; then
    : ${sudo:=sudo}
    PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH
fi
: ${libvirt_type:=kvm}
: ${networkingplugin:=openvswitch}
: ${architectures:='aarch64 x86_64 s390x'}
: ${nodenumberlonelynode:=0}
: ${want_mtu_size:=1500}

# service dependencies
[[ $want_ceilometer_proposal = 0 ]] && want_aodh_proposal=0

function max
{
    echo $(( $1 > $2 ? $1 : $2 ))
}

function wait_for
{
    local timecount=${1:-300}
    local timesleep=${2:-1}
    local condition=${3:-'/bin/true'}
    local waitfor=${4:-'unknown process'}
    local error_cmd=${5:-'exit 11'}
    local print_while=${6:-'echo -n .'}

    local original_xstatus=${-//[^x]/}
    timesleep=$((timesleep*${want_timescaling:-1}))
    set +x
    echo "Waiting for: $waitfor"
    echo "  until this condition is true: $condition"
    echo "  waiting $timecount cycles of $timesleep seconds = $(( $timecount * $timesleep )) seconds"
    local n=$timecount
    while test $n -gt 0 && ! eval $condition
    do
        eval "$print_while"
        sleep $timesleep
        n=$(($n - 1))
        [[ $(( ($timecount - $n) % 75)) != 0 ]] || echo
    done
    echo

{'fraction_non_alphanumeric': 0.1942053930005737, 'fraction_numerical': 0.021801491681009755, 'mean_word_length': 4.010057471264368, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2987551', 'n_tokens_mistral': 1390, 'n_tokens_neox': 1316, 'n_words': 262}