Skip to content

Commit ab141c6

Browse files
committed
Remove hardware data update code
1 parent 6b0b73f commit ab141c6

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

data/data/bootstrap/baremetal/files/usr/local/bin/master-bmh-update.sh

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
set -euo pipefail
44

5-
# shellcheck disable=SC1091
6-
. /usr/local/bin/release-image.sh
7-
85
export KUBECONFIG=/opt/openshift/auth/kubeconfig-loopback
96

107
# Wait till the baremetalhosts are populated
@@ -16,7 +13,6 @@ done
1613
AUTH_DIR=/opt/metal3/auth
1714
set +x
1815
ironic_url="$(printf 'http://%s:%s@localhost:6385/v1' "$(cat "${AUTH_DIR}/ironic/username")" "$(cat "${AUTH_DIR}/ironic/password")")"
19-
inspector_url="$(printf 'http://%s:%s@localhost:5050/v1' "$(cat "${AUTH_DIR}/ironic-inspector/username")" "$(cat "${AUTH_DIR}/ironic-inspector/password")")"
2016

2117
# Wait for a master to appear.
2218
while [ "$(curl -s "${ironic_url}/nodes" | jq '.nodes[] | .uuid' | wc -l)" -lt 1 ]; do
@@ -33,22 +29,6 @@ done
3329

3430
echo Nodes are all active
3531

36-
BAREMETAL_OPERATOR_IMAGE=$(image_for baremetal-operator)
37-
38-
for node in $(curl -s "${ironic_url}/nodes" | jq -r '.nodes[] | .uuid'); do
39-
name=$(curl -H "X-OpenStack-Ironic-API-Version: 1.9" -s "${ironic_url}/nodes/${node}" | jq -r .name | cut -d "~" -f 2)
40-
echo "Host $name, UUID: $node"
41-
# And use the baremetal operator tool to load the introspection data into
42-
# the BareMetalHost CRs as annotations, which BMO then picks up.
43-
HARDWARE_DETAILS=$(podman run --quiet --net=host \
44-
--rm \
45-
--entrypoint /get-hardware-details \
46-
"${BAREMETAL_OPERATOR_IMAGE}" \
47-
"${inspector_url}" "$node" | jq '{hardware: .}')
48-
49-
oc annotate --overwrite -n openshift-machine-api baremetalhosts "$name" 'baremetalhost.metal3.io/status'="$HARDWARE_DETAILS" 'baremetalhost.metal3.io/paused-'
50-
done
51-
5232
# Shut down ironic containers so that the API VIP can fail over to the control
5333
# plane.
5434
echo "Stopping provisioning services..."

0 commit comments

Comments
 (0)