Bug #25438
closed
The severity ERROR for Node with ID ‘xxx’ was not found in Rudder’ is too strict
Added by Nicolas CHARLES 10 months ago.
Updated 10 months ago.
Description
It might be legit to query for a non-existant node , so a WARN would be more meaningful
Files
- Priority changed from N/A to 1 (highest)
@Clark ANDRIANASOLO started to look but it's more complicated than anticipated because it would change ALL API error log level.
Actually, we want:
- a different logger
- and message in info level. Else we have user errors at ops error level, which makes no sens:
2024-09-12 15:24:42+0200 INFO compliance - [metrics] global compliance (number of components): 1 [p:0 s:1 r:0 e:0 u:0 m:0 nr:0 na:0 rd:0 c:0 ana:0 nc:0 ae:0 bpm:0]
2024-09-12 15:24:50+0200 INFO policy.generation - Node 'poc-infotel-platformAgent4.rudder.local' (a76d33ff-89ba-4a64-ae7f-f17967836e4f) is a Windows node and a we do not know how to generate a hash yet
2024-09-12 15:31:11+0200 ERROR api-processing - Inconsistency: Group with id '4e0c8aca-47f4-45b4-9b68-45b23ecafcde' was not found'
2024-09-12 15:31:35+0200 ERROR api-processing - Inconsistency: Group with id 'has-policyServer-root' was not found'
2024-09-12 15:32:15+0200 ERROR api-processing - Inconsistency: Could not delete group 'hasPolicyServer-root', cause is: system groups cannot be deleted.
- Status changed from New to In progress
- Assignee set to François ARMAND
The logger name will have the same name than the error field in the returned message, api-processing.response-error
:

- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Clark ANDRIANASOLO
- Pull Request set to https://github.com/Normation/rudder/pull/5874
- Status changed from Pending technical review to Pending release
- Fix check changed from To do to Checked
Checked :
- on "old" lift-json API the
curl http://localhost:8080/rudder/api/latest/nodes/roo -H "X-API-TOKEN: $(cat /var/rudder/run/api-token)"
command logs :
2024-09-18 16:49:01+0200 INFO api-processing.response-error - "An error was encountered when looking for node with ID 'roo': Inconsistency: Node is missing"
- on a zio-json API the
curl http://localhost:8080/rudder/api/latest/groups/roo -H "X-API-TOKEN: $(cat /var/rudder/run/api-token)"
command logs :
2024-09-18 16:51:10+0200 INFO api-processing.response-error - Inconsistency: Group with id 'roo' was not found'
- Status changed from Pending release to Released
This bug has been fixed in Rudder 8.1.7 which was released today.
Also available in: Atom
PDF