Skip to content

Commit 59a4fb3

Browse files
committed
Remove wait_for_assisted_service from common.sh
We already have a script (that needs to be called from ExecStartPre) to wait for assisted-service, so move the implementation into there.
1 parent b53059f commit 59a4fb3

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

data/data/agent/files/usr/local/bin/common.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@
33
# shellcheck disable=SC1091
44
source /etc/assisted/rendezvous-host.env
55

6-
wait_for_assisted_service() {
7-
echo "Waiting for assisted-service to be ready"
8-
until curl --output /dev/null --silent --fail "${SERVICE_BASE_URL}/api/assisted-install/v2/infra-envs"; do
9-
printf '.'
10-
sleep 5
11-
done
12-
}
13-
146
is_node_zero() {
157
local is_rendezvous_host
168
is_rendezvous_host=$(ip -j address | jq "[.[].addr_info] | flatten | map(.local==\"$NODE_ZERO_IP\") | any")

data/data/agent/files/usr/local/bin/start-cluster-installation.sh.template

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#!/bin/bash
22
set -e
33

4-
source common.sh
54
source issue_status.sh
65

7-
wait_for_assisted_service
6+
wait-for-assisted-service.sh
87

98
BASE_URL="${SERVICE_BASE_URL}api/assisted-install/v2"
109

data/data/agent/files/usr/local/bin/wait-for-assisted-service.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
set -e
33

44
# shellcheck disable=SC1091
5-
source common.sh
5+
source /etc/assisted/rendezvous-host.env
66

7-
wait_for_assisted_service
7+
echo "Waiting for assisted-service to be ready"
8+
until curl --output /dev/null --silent --fail "${SERVICE_BASE_URL}/api/assisted-install/v2/infra-envs"; do
9+
printf '.'
10+
sleep 5
11+
done

0 commit comments

Comments
 (0)