Actions
User story #17666
closedNode status API must not return an error when the node is not here
Pull Request:
UX impact:
Suggestion strength:
Want - This would make my life a lot easier but I can manage without
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Name check:
To do
Fix check:
Checked
Regression:
Description
We don't have a good way to get a node status. If we ask for node information, we get an error:
And lots of errors if we need to wait for node to appears, like in RTF when a node is created:
while ! curl --insecure --silent --header \"X-API-Token: \$(cat /var/rudder/run/api-token)\" https://localhost/rudder//api/latest/nodes/959531df-4401-4092-8202-b8d1d5276157 | grep -q success; do sleep 1; done; curl --insecure --silent --header \"X-API-Token: \$(cat /var/rudder/run/api-token)\" --request POST https://localhost/rudder//api/latest/nodes/pending/959531df-4401-4092-8202-b8d1d5276157 --data \"status=accepted\"'" -- {"action":"changePendingNodeStatus","result":"success","data":{"nodes":[{"id":"959531df-4401-4092-8202-b8d1d5276157","status":"accepted","hostname":"agent3.rudder.local","osName":"Centos","osVersion":"[6.10]","machineType":"Virtual"}]}}Connection to 127.0.0.1 closed.
We need a "nodes/uuid/status" API that returns just node status, and "missing" is an expected result for it.
Files
Actions