From b771e05acb6a0046b8222867e87f0c9a786d172a Mon Sep 17 00:00:00 2001 From: varac Date: Sun, 3 Jul 2016 21:13:19 +0200 Subject: remove trailing whitespaces --- leap-platform-test | 56 +++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/leap-platform-test b/leap-platform-test index 6c0d3ca..bc36369 100755 --- a/leap-platform-test +++ b/leap-platform-test @@ -2,7 +2,7 @@ # -# in case the script gets canceled, use a trap to finally remove the +# in case the script gets canceled, use a trap to finally remove the # lockfile that indicates a running process trap "cleanup" INT TERM @@ -37,7 +37,7 @@ COMMANDS init_deploy initialize node, then do a deploy destroy_deploy destroy vms, init, and deploy reset_deploy reset and deploy node(s) - test run leap test + test run leap test EOF } @@ -80,12 +80,12 @@ bootstrap_nodes() { # deploying these classes have too much dependencies, # this is done now by the "~/vagrant/bootstrap_only.sh" provisioner #$LEAP_CMD $OPTS deploy "$vm" --tags site_apt::dist_upgrade,site_config::hosts,site_squid_deb_proxy::client - + # make sure machines are rebooted in order to be able to load kernel modules after a kernel update # https://leap.se/code/issues/6494 cd ${PROVIDERDIR}/test - vagrant reload $vm + vagrant reload $vm $LEAP_CMD $OPTS local save "$vm" done @@ -100,7 +100,7 @@ cleanup () { check_for_running_instances() { if [[ -f $LOCKFILE ]] - then + then echo "Lockfile found at $LOCKFILE - maybe other process(es) found running for $(basename "$0") - exiting. Please investigate and then remove lockfile." exit 1 fi @@ -117,13 +117,13 @@ check_for_running_instances() { fi exit 1 else - rm $FAILURE_LOCKFILE + rm $FAILURE_LOCKFILE fi fi } create_provider() { - + if [ -e "$PROVIDERDIR" ] then @@ -149,7 +149,7 @@ create_provider() { git init git add . - git commit -m"finished create_provider" + git commit -m"finished create_provider" } deploy() { @@ -160,17 +160,17 @@ deploy() { FILTER_CLI=' - \[.*\] Changed /etc/hostname to| - \[.*\] Changed hostname to|= read|= loading|= no change| - executing| = executing| = applying| = ran git| = checking| = synching| = skipping file_path| - cd .*; rsync -| - hiera| = created hiera/| = updated hiera/| = updated secrets.json| - cd /root/| - rolling backexecuting| - files/|\[bin,tests,puppet\] ->|] Hostname updated.| = Updating submodule puppet/modules|Warning: Permanently added.*to the list of known hosts.| = leap command v| = leap platform v| - \[.*\] ok| - \[.*\] STARTING APPLY| - \[.*\] APPLY COMPLETE|net.ssh.authentication.agent.*could not connect to ssh-agent|Deploying | - mx/dkim.pub, mx/dkim.key -> .*/srv/leap/files' FILTER_PUPPET="] notice: |^Notice: |] No change to hostname|] Puppet apply complete \(changes made\).|] completed in |] warning: Dynamic lookup|] warning: Scope\(Class|Skipping because of failed dependencies|warning: You cannot collect without storeconfigs being set|warning: Not collecting exported resources without storeconfigs|warning: default \`to_a' will be obsolete|Warning: Found multiple default providers for vcsrepo" - + #FILTER_PUPPET_DEPREC="templatewrapper.rb:76:in \`method_missing" if [ -n "$FILTER_COMMON" ] - then + then #FILTER_ALL="($FILTER_CLI|$FILTER_PUPPET|$FILTER_PUPPET_DEPREC|$FILTER_COMMON)" FILTER_ALL="($FILTER_CLI|$FILTER_PUPPET|$FILTER_COMMON)" else #FILTER_ALL="($FILTER_CLI|$FILTER_PUPPET|$FILTER_PUPPET_DEPREC)" FILTER_ALL="($FILTER_CLI|$FILTER_PUPPET)" - fi + fi for vm in "$@" @@ -207,11 +207,11 @@ deploy() { msg="${msg}Tested on $( date ) on \"$vm\" with following versions/git commit IDs: \n\n$versions" - cat "$ERRLOG1" - + cat "$ERRLOG1" + if [ "$MAIL_TO" != '' ]; then echo "Sending this mail to $MAIL_TO:" - sendemail -f "$MAIL_FROM" -t "$MAIL_TO" -o tls=no -m "${msg}" -u "${subj}" + sendemail -f "$MAIL_FROM" -t "$MAIL_TO" -o tls=no -m "${msg}" -u "${subj}" fi else echo "Deploy to $vm on $( date ) went fine."| tee -a "$LOG1" "$LOG2" @@ -219,7 +219,7 @@ deploy() { fi done return $returncode -} +} get_ip () { grep ip_address "$PROVIDERDIR/nodes/$1.json" |cut -f 2 -d:|sed 's/[ ",]//g' @@ -313,7 +313,7 @@ init_deploy() { echo "Waiting until last deploy process has finished..." wait - if [ -e "$FAILURE_LOCKFILE" ] + if [ -e "$FAILURE_LOCKFILE" ] then print_global_errorlog deploy_failure_email @@ -367,7 +367,7 @@ reset_deploy() { echo "Waiting until last deploy process has finished..." wait - if [ -e "$FAILURE_LOCKFILE" ] + if [ -e "$FAILURE_LOCKFILE" ] then print_global_errorlog deploy_failure_email @@ -417,7 +417,7 @@ destroy_deploy() { echo "Waiting until last deploy process has finished..." wait - if [ -e "$FAILURE_LOCKFILE" ] + if [ -e "$FAILURE_LOCKFILE" ] then print_global_errorlog deploy_failure_email @@ -459,7 +459,7 @@ run_tests () { TEST_FILTER='net.ssh.authentication.agent.*could not connect to ssh-agent' - echo -e "\nRunning leap test on $date" | tee -a "$TEST_LOG1" "$TEST_LOG2" + echo -e "\nRunning leap test on $date" | tee -a "$TEST_LOG1" "$TEST_LOG2" if $verbose then @@ -468,10 +468,10 @@ run_tests () { test_failure=${PIPESTATUS[0]} egrep -iv "$TEST_FILTER" $TEST_LOG2 | tee -a "$TEST_LOG1" "$TEST_LOG2" > /dev/null else - $LEAP_CMD $OPTS test --continue 2>&1 | egrep -iv "$TEST_FILTER" | tee -a "$TEST_LOG1" "$TEST_LOG2" + $LEAP_CMD $OPTS test --continue 2>&1 | egrep -iv "$TEST_FILTER" | tee -a "$TEST_LOG1" "$TEST_LOG2" test_failure=${PIPESTATUS[0]} fi - + if [ "$test_failure" -ne 0 ] then echo 'WARNING - "leap test" failed !' | tee -a "$TEST_LOG1" "$TEST_LOG2" @@ -498,7 +498,7 @@ update_platform () { # throw away local uncommitted changes git reset --hard HEAD # remove untracked files - git clean -f + git clean -f git fetch git checkout master @@ -516,7 +516,7 @@ versions () { if [ -z "$provider_head" ] then provider_head='not under version control' - fi + fi echo "Provider config ($PROVIDERDIR): $provider_head" echo @@ -552,11 +552,11 @@ IP_PREFIX='10.5.5' if ! options=$(getopt -o avVlc:h -l all,lock,verbose,versions,config:,help -- "$@") -then +then # something went wrong, getopt will put out an error message for us usage exit 1 -fi +fi eval set -- "$options" @@ -568,7 +568,7 @@ do -h|--help) usage; exit 1;; -l|--lock) lock=true;; -v|--verbose) verbose=true;; - -V|--versions) print_versions=true;; + -V|--versions) print_versions=true;; (--) shift; break;; (-*) echo "$0: error - unrecognized option $1" 1>&2; exit 1;; (*) break;; @@ -618,7 +618,7 @@ then exit 0 fi -if [ -z "$LEAP_CMD" -o -z "$LEAP_SRC" ] +if [ -z "$LEAP_CMD" -o -z "$LEAP_SRC" ] then echo "please provide a path to the leap_cli binary and the source in the config file, using the LEAP_CMD and LEAP_SRC var." exit 1 @@ -643,7 +643,7 @@ else fi -case $cmd in +case $cmd in add_nodes) add_nodes "$nodes";; bootstrap) bootstrap_nodes "$nodes";; create_provider) create_provider;; -- cgit v1.2.3