Skip to content

Commit

Permalink
Merge pull request #2736 from Varying-Vagrant-Vagrants/service_failur…
Browse files Browse the repository at this point in the history
…e_data

Improved Network check failure and mariadb service failure
  • Loading branch information
tomjn authored Sep 20, 2024
2 parents 7ebb457 + b747b6a commit 61453bf
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: YAML Lint
uses: ibiqlik/action-yamllint@v0.0.1
uses: ibiqlik/action-yamllint@v3
with:
file_or_dir: .
- name: PHP Syntax Checker (Lint) PHP 7.3
uses: StephaneBour/actions-php-lint@7.3
- name: PHP Syntax Checker (Lint) PHP 8.2
uses: StephaneBour/actions-php-lint@8.2
with:
dir: '.'
- name: Shell Script Syntax Checks
uses: Klintrup/simple-shell-syntax-check@v2
2 changes: 1 addition & 1 deletion .github/workflows/vvv-provisioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
MYGID=$(id -g -n)
sudo chown -R $MYUID:$MYGID "$GITHUB_WORKSPACE/log"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: logs-on-docker
Expand Down
13 changes: 11 additions & 2 deletions provision/core/mariadb/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,20 @@ function mysql_setup() {
# happens after a `vagrant halt`. Check to see if it's running before
# deciding whether to start or restart.
if service mariadb status > /dev/null; then
vvv_info " * Starting the mariadb service"
service mariadb restart
vvv_info " * Restarting the mariadb service"
if ! service mariadb restart; then
vvv_error " * Restarting the MariaDB failed! Fetching service status."
service mariadb status
exit 1
fi
else
vvv_info " * Restarting mariadb service"
service mariadb start
if ! service mariadb start; then
vvv_error " * Starting MariaDB failed! Fetching service status."
service mariadb status
exit 1
fi
fi

# IMPORT SQL
Expand Down
3 changes: 2 additions & 1 deletion provision/provision-helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function check_network_connection_to_host() {
return 0
fi
vvv_error " ! Network connection issues found. Unable to reach <url>${url}</url>"
wget --spider --timeout=5 --tries=3 "${url}"
return 1
}
export -f check_network_connection_to_host
Expand Down Expand Up @@ -119,7 +120,7 @@ function network_check() {
vvv_error " "
vvv_error "VVV tried to check several domains it needs for provisioning but ${#failed_hosts[@]} of ${#hosts_to_test[@]} failed:"
vvv_error " "
for url in "${hosts_to_test[@]}"; do
for url in "${failed_hosts[@]}"; do
echo -e "${CRESET} [${RED}x${CRESET}] ${url}${RED}|"
done
vvv_error " "
Expand Down

0 comments on commit 61453bf

Please sign in to comment.