Skip to content

Commit 4107e2b

Browse files
committed
Use rendezvous-host.env as environment file
Don't source /etc/assisted/rendezvous-host.env in shell script when it can be used as a systemd EnvironmentFile.
1 parent 3de8400 commit 4107e2b

File tree

5 files changed

+3
-8
lines changed

5 files changed

+3
-8
lines changed

data/data/agent/files/usr/local/bin/start-agent.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#!/bin/bash
22

3-
# shellcheck disable=SC1091
4-
source /etc/assisted/rendezvous-host.env
5-
63
>&2 echo "Waiting for infra-env-id to be available"
74
INFRA_ENV_ID=""
85
until [[ $INFRA_ENV_ID != "" && $INFRA_ENV_ID != "null" ]]; do

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

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

44
source issue_status.sh
55

6-
wait-for-assisted-service.sh
7-
86
BASE_URL="${SERVICE_BASE_URL}api/assisted-install/v2"
97

108
cluster_id=""

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#!/bin/bash
22
set -e
33

4-
# shellcheck disable=SC1091
5-
source /etc/assisted/rendezvous-host.env
6-
74
echo "Waiting for assisted-service to be ready"
85
until curl --output /dev/null --silent --fail "${SERVICE_BASE_URL}/api/assisted-install/v2/infra-envs"; do
96
printf '.'

data/data/agent/systemd/units/agent.service.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Restart=always
44
RestartSec=3
55
StartLimitInterval=0
66
TimeoutStartSec=3000
7+
EnvironmentFile=/etc/assisted/rendezvous-host.env
78
ExecStartPre=/usr/local/bin/extract-agent.sh
89
ExecStart=/usr/local/bin/start-agent.sh
910

data/data/agent/systemd/units/start-cluster-installation.service

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ ConditionPathExists=/etc/assisted/node0
88

99
[Service]
1010
EnvironmentFile=/usr/local/share/assisted-service/assisted-service.env
11+
EnvironmentFile=/etc/assisted/rendezvous-host.env
12+
ExecStartPre=/usr/local/bin/wait-for-assisted-service.sh
1113
ExecStart=/usr/local/bin/start-cluster-installation.sh
1214

1315
KillMode=none

0 commit comments

Comments
 (0)