Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved Network check failure and mariadb service failure #2736

Merged
merged 4 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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