Actions
Bug #27087
closedrudder agent run output exit code 0 when in initial policies and cannot update from the server
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No
Description
If a node is in initial policy mode and cannot update from the server (because it is not accepted or ignored), then the exit code is 0
The same node, with non initial policy, would output exit code 2
As a result, running `rudder agent reset` effectively makes the node always exit 0 rather than the expected 2
Updated by François ARMAND 24 days ago
- Assignee set to Alexis Mousset
- Priority changed from To review to 1 (highest)
Updated by Alexis Mousset 10 days ago
- Status changed from New to Rejected
This behavior is actually intentional.
In #20996 we changed the logic to exit with 0 in this case:
elif [ $code -eq 1 ]; then
printf "${GREEN}ok${NORMAL}: Rudder node waiting to be accepted.\n"
exit 0
On the node side there is no way to make a difference between a node not yet accepted or ignored, and the former is more common.
The workaround is to grep the error in the output. Closing this issue.
Actions