diff --git a/README.md b/README.md index b05d545b..bcf1b976 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Directory structure: These health checks are available in `/usr/lib/greenboot/check`, a read-only directory in rpm-ostree systems. If you find a bug in any of them or you have an improvement, please create a PR with such fix/feature and we'll review it and potentially include it. - **Check if repositories URLs are still DNS solvable**: This script is under `/usr/lib/greenboot/check/required.d/01_repository_dns_check.sh` and makes sure that DNS queries to repository URLs are still available. -- **Check if update platforms are still reachable**: This script is under `/usr/lib/greenboot/check/wanted.d/01_update_platform_check.sh` and tries to connect and get a 2XX or 3XX HTTP code from the update platforms defined in `/etc/ostree/remotes.d`. +- **Check if update platforms are still reachable**: This script is under `/usr/lib/greenboot/check/wanted.d/01_update_platform_check.sh` and tries to connect and get a 2XX or 3XX HTTP code from the update platforms defined by `ostree remote list`. - **Check if current boot has been triggered by hardware watchdog**: This script is under `/usr/lib/greenboot/check/required.d/02_watchdog.sh` and checks whether the current boot has been watchdog-triggered or not. If it is, but the reboot has occurred after a certain grace period (default of 24 hours, configurable via `GREENBOOT_WATCHDOG_GRACE_PERIOD=number_of_hours` in `/etc/greenboot/greenboot.conf`), Greenboot won't mark the current boot as red and won't rollback to the previous deployment. If has occurred within the grace period, at the moment the current boot will be marked as red, but Greenboot won't rollback to the previous deployment. It is enabled by default but it can be disabled by modifying `GREENBOOT_WATCHDOG_CHECK_ENABLED` in `/etc/greenboot/greenboot.conf` to `false`. ### Health Checks with systemd services diff --git a/usr/lib/greenboot/check/wanted.d/01_update_platforms_check.sh b/usr/lib/greenboot/check/wanted.d/01_update_platforms_check.sh index 35ea691e..064d3f46 100644 --- a/usr/lib/greenboot/check/wanted.d/01_update_platforms_check.sh +++ b/usr/lib/greenboot/check/wanted.d/01_update_platforms_check.sh @@ -5,7 +5,7 @@ REPOS_DIRECTORY=/etc/ostree/remotes.d URLS_WITH_PROBLEMS=() get_update_platform_urls() { - mapfile -t UPDATE_PLATFORM_URLS < <(grep -P -ho 'http[s]?.*' "${REPOS_DIRECTORY}"/*) + mapfile -t UPDATE_PLATFORM_URLS < <(ostree remote list | xargs ostree remote show-url) if [[ ${#UPDATE_PLATFORM_URLS[@]} -eq 0 ]]; then echo "No update platforms found, this can be a mistake" exit 1