Skip to content

Commit cac843c

Browse files
committed
additional lint/script fixes
1 parent c1ac237 commit cac843c

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

data/data/agent/files/usr/local/bin/add-node.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@ printf '\nHost %s is ready for installation\n' "${HOST_ID}" 1>&2
3838
clear_issue "${status_issue}"
3939

4040
# Add the current host to the cluster
41-
res=$(curl -X POST -s -S "${BASE_URL}/infra-envs/${INFRA_ENV_ID}/hosts/${HOST_ID}/actions/install")
42-
code=$(echo "$res" | jq -r '.code')
43-
message=$(echo "$res" | jq -r '.message')
44-
if [[ $res = "200" ]]; then
45-
printf "\nHost installation started\n" 1>&2
41+
res=$(curl -X POST -s -S -w "%{http_code}\\n" -o /dev/null "${BASE_URL}/infra-envs/${INFRA_ENV_ID}/hosts/${HOST_ID}/actions/install")
42+
if [[ $res = "202" ]]; then
43+
printf '\nHost installation started\n' 1>&2
4644
else
47-
printf '\nHost installation failed: %s\n' "${message}" 1>&2
45+
printf '\nHost installation failed\n' 1>&2
46+
exit 1
4847
fi

pkg/asset/agent/image/releaseextract.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ type release struct {
6161
streamGetter CoreOSBuildFetcher
6262
}
6363

64-
// NewRelease is used to set up the executor to run oc commands
64+
// NewRelease is used to set up the executor to run oc commands.
6565
func NewRelease(config Config, releaseImage string, pullSecret string, mirrorConfig []mirror.RegistriesConfig, streamGetter CoreOSBuildFetcher) Release {
6666
return &release{
6767
config: config,
@@ -259,7 +259,7 @@ func (r *release) extractFileFromImage(image, file, cacheDir string, architectur
259259
return matches, nil
260260
}
261261

262-
// Get hash from rhcos.json
262+
// Get hash from rhcos.json.
263263
func (r *release) getHashFromInstaller(architecture string) (bool, string) {
264264
// Get hash from metadata in the installer
265265
ctx, cancel := context.WithTimeout(context.TODO(), 30*time.Second)

0 commit comments

Comments
 (0)