From 04de61631cdf65b501c5c44b1b00158a307926a6 Mon Sep 17 00:00:00 2001 From: Alexis Mousset Date: Fri, 9 Jun 2023 15:49:00 +0200 Subject: [PATCH] fixup! Fixes #22870: Use 8080 port to talk with the webapp in hooks Fixes #22870: Use 8080 port to talk with the webapp in hooks --- .../node-inventory-received-pending/auto-accept-nodes.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/sources/rudder/rudder-core/src/main/resources/hooks.d/node-inventory-received-pending/auto-accept-nodes.example b/webapp/sources/rudder/rudder-core/src/main/resources/hooks.d/node-inventory-received-pending/auto-accept-nodes.example index 717b994f046..f40f37f6f42 100644 --- a/webapp/sources/rudder/rudder-core/src/main/resources/hooks.d/node-inventory-received-pending/auto-accept-nodes.example +++ b/webapp/sources/rudder/rudder-core/src/main/resources/hooks.d/node-inventory-received-pending/auto-accept-nodes.example @@ -44,7 +44,7 @@ echo "[$(date --iso-8601=s)] received inventory for pending node '${RUDDER_NODE_ # https://docs.rudder.io/reference/current/usage/advanced_node_management.html#_creating_a_node_inventory_hook ). # We will use `jq` to extract the relevant information from the API call response. -MODE=$(curl -k -X GET -H "X-API-TOKEN: $(cat /var/rudder/run/api-token)" -H "Content-Type: application/json" \ +MODE=$(curl -X GET -H "X-API-TOKEN: $(cat /var/rudder/run/api-token)" -H "Content-Type: application/json" \ "http://localhost:8080/rudder/api/latest/nodes/${RUDDER_NODE_ID}?include=minimal,properties" | \ jq -r '.data.nodes[0].properties | map(select(.name = "accept"))[0].value') @@ -53,7 +53,7 @@ MODE=$(curl -k -X GET -H "X-API-TOKEN: $(cat /var/rudder/run/api-token)" -H "Con # if [ "${MODE}" == "auto-accept" ]; then # accept node - curl -f -k -X POST -H "X-API-TOKEN: $(cat /var/rudder/run/api-token)" \ + curl -f -X POST -H "X-API-TOKEN: $(cat /var/rudder/run/api-token)" \ "http://localhost:8080/rudder/api/latest/nodes/pending/${RUDDER_NODE_ID}" -d 'status=accepted' if [ "$?" -eq 0 ]; then