diff --git a/.buildkite/scripts/tooling.sh b/.buildkite/scripts/tooling.sh index d1b85ad0b..2b13975b9 100755 --- a/.buildkite/scripts/tooling.sh +++ b/.buildkite/scripts/tooling.sh @@ -101,8 +101,8 @@ upload_safe_logs() { local source="$2" local target="$3" - if ! ls ${source} 2>&1 > /dev/null ; then - echo "upload_safe_logs: artifacts files not found, nothing will be archived" + if ! ls ${source} > /dev/null 2>&1; then + echo "upload_safe_logs: artifacts files not found at ${source}, nothing will be archived" return fi diff --git a/internal/profile/testdata/migration-home-legacy/profiles/default/stack/kibana_healthcheck.sh b/internal/profile/testdata/migration-home-legacy/profiles/default/stack/kibana_healthcheck.sh index 09bc39c35..8345f2f5a 100644 --- a/internal/profile/testdata/migration-home-legacy/profiles/default/stack/kibana_healthcheck.sh +++ b/internal/profile/testdata/migration-home-legacy/profiles/default/stack/kibana_healthcheck.sh @@ -2,5 +2,5 @@ set -e -curl -s --cacert /usr/share/kibana/config/certs/ca-cert.pem -f https://localhost:5601/login | grep kbn-injected-metadata 2>&1 >/dev/null +curl -s --cacert /usr/share/kibana/config/certs/ca-cert.pem -f https://localhost:5601/login | grep kbn-injected-metadata >/dev/null curl -s --cacert /usr/share/kibana/config/certs/ca-cert.pem -f -u elastic:changeme "https://elasticsearch:9200/_cat/indices/.security-*?h=health" | grep -v red diff --git a/internal/profile/testdata/migration-home-legacy/profiles/default/stack/snapshot.yml b/internal/profile/testdata/migration-home-legacy/profiles/default/stack/snapshot.yml index 780d8b5fa..3e3f6778a 100644 --- a/internal/profile/testdata/migration-home-legacy/profiles/default/stack/snapshot.yml +++ b/internal/profile/testdata/migration-home-legacy/profiles/default/stack/snapshot.yml @@ -91,7 +91,7 @@ services: kibana: condition: service_healthy healthcheck: - test: "curl --cacert /etc/ssl/elastic-agent/ca-cert.pem -f https://localhost:8220/api/status | grep -i healthy 2>&1 >/dev/null" + test: "curl --cacert /etc/ssl/elastic-agent/ca-cert.pem -f https://localhost:8220/api/status | grep -i healthy >/dev/null" start_period: 60s interval: 5s hostname: docker-fleet-server diff --git a/internal/stack/_static/fleet-server-healthcheck.sh b/internal/stack/_static/fleet-server-healthcheck.sh index 57b437a8a..50b82b0e9 100644 --- a/internal/stack/_static/fleet-server-healthcheck.sh +++ b/internal/stack/_static/fleet-server-healthcheck.sh @@ -6,7 +6,7 @@ NUMBER_SUCCESSES="$1" WAITING_TIME="$2" healthcheck() { - curl -s --cacert /etc/ssl/certs/elastic-package.pem -f https://localhost:8220/api/status | grep -i healthy 2>&1 >/dev/null + curl -s --cacert /etc/ssl/certs/elastic-package.pem -f https://localhost:8220/api/status | grep -i healthy >/dev/null } # Fleet Server can restart after announcing to be healthy, agents connecting during this restart will diff --git a/internal/stack/_static/kibana-healthcheck.sh.tmpl b/internal/stack/_static/kibana-healthcheck.sh.tmpl index 386b55add..5f4120440 100644 --- a/internal/stack/_static/kibana-healthcheck.sh.tmpl +++ b/internal/stack/_static/kibana-healthcheck.sh.tmpl @@ -2,5 +2,5 @@ set -e -curl -s --cacert /usr/share/kibana/config/certs/ca-cert.pem -f https://localhost:5601/login | grep kbn-injected-metadata 2>&1 >/dev/null +curl -s --cacert /usr/share/kibana/config/certs/ca-cert.pem -f https://localhost:5601/login | grep kbn-injected-metadata >/dev/null curl -s --cacert /usr/share/kibana/config/certs/ca-cert.pem -f -u {{ fact "username" }}:{{ fact "password" }} "https://elasticsearch:9200/_cat/indices/.security-*?h=health" | grep -v red