Project

General

Profile

Actions

Bug #25388

closed

Add log for error in JSON campaigns on FS

Added by François ARMAND 3 months ago. Updated about 2 months ago.

Status:
Released
Priority:
N/A
Category:
Architecture - Code maintenance
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No

Description

When we have an error in the JSON for stored campaign, we don't know what files is in error.

Actions #1

Updated by François ARMAND 3 months ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND
Actions #2

Updated by François ARMAND 3 months ago

  • 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/5850
Actions #3

Updated by Anonymous 3 months ago

  • Status changed from Pending technical review to Pending release
Actions #4

Updated by Clark ANDRIANASOLO 2 months ago

  • Fix check changed from To do to Checked

Checked !
But I was surprised to find that there are two consecutive logs when a single file is invalid when opening the campaigns timeline in the UI :

root@test8_1_server:/home/vagrant# vim /var/rudder/configuration-repository/campaigns/a16becf8-6f32-4949-99c7-e27fb18c53af.json 
root@test8_1_server:/home/vagrant# tail -f /var/log/rudder/webapp/2024_09_12.stderrout.log
2024-09-12 13:25:03+0000 INFO  policy.generation.timing - Build current rule values     :          1 ms
2024-09-12 13:25:03+0000 INFO  policy.generation.timing - Build target configuration    :         26 ms
2024-09-12 13:25:03+0000 INFO  policy.generation.timing - Write node configurations     :       1967 ms
2024-09-12 13:25:03+0000 INFO  policy.generation.timing - Save expected reports         :          6 ms
2024-09-12 13:25:03+0000 INFO  policy.generation.timing - Run post generation hooks     :        156 ms
2024-09-12 13:25:03+0000 INFO  policy.generation.timing - Number of nodes updated       :          1   
2024-09-12 13:25:03+0000 INFO  policy.generation.timing - Policy generation succeeded in:        2 s
2024-09-12 13:25:03+0000 INFO  policy.generation.manager - Successful policy update '11' [started 2024-09-12 13:25:00 - ended 2024-09-12 13:25:03]
2024-09-12 13:25:38+0000 ERROR campaign - Error when parsing campaign file at '/var/rudder/configuration-repository/campaigns/a16becf8-6f32-4949-99c7-e27fb18c53af.json'; cause was: Inconsistency: (expected string or '}' got 'n')
2024-09-12 13:25:38+0000 ERROR campaign - Error when parsing campaign file at '/var/rudder/configuration-repository/campaigns/a16becf8-6f32-4949-99c7-e27fb18c53af.json'; cause was: Inconsistency: (expected string or '}' got 'n')
^C
root@test8_1_server:/home/vagrant# ls /var/rudder/configuration-repository/campaigns/
a16becf8-6f32-4949-99c7-e27fb18c53af.json

The reason for this is the UI makes 2 requests, but with different filters. I don't think it needs to be changed, it is just normal behavior, having duplicate logs seems okay

Actions #5

Updated by Vincent MEMBRÉ about 2 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 8.1.7 which was released today.

Actions

Also available in: Atom PDF