Bug #12379
closed
Jinja2 templating: Shows error in output even when successful
Added by Florian Heigl over 6 years ago.
Updated over 2 years ago.
Severity:
Minor - inconvenience | misleading | easy workaround
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Description
So, seems I found a little danger thing here:
First:
No, this is not about my data.
Second:
Yes, this is about that it says error, but then does not report an error.
I assume this can cause data loss, but I'm not certain about it.
What I can verify is that the file is being templated (i deleted it, it comes back)
The content looks ok.
I can't tell if its a cosmetic error, but it does not instil trust.
I'll attach all the stuff you need as I go.
Files
the node property "sshgroups" which is being read contains:
{
"skifahrer": "ski",
"rennfahrer": "auto",
"autofahrer": "auto",
"oraadmin": "java-fans",
"sftp1": "sftp-chroot"
}
That's all. Please let me know if you also get that line saying
R: Templating error:
rudder info: Deleted file '/var/rudder/templates/sshd_config.j2.datastate.4322.json'
R: [INFO] Promise repaired, made a change: Remove file /var/rudder/templates/sshd_config.j2.datastate.4322.json
rudder info: Deleted file '/var/rudder/templates/sshd_config.j2.4322.new'
R: [INFO] Promise repaired, made a change: Remove file /var/rudder/templates/sshd_config.j2.4322.new
I think this is a problem.
- Project changed from Rudder to 41
- Category changed from Agent to Generic methods - File Management
- Assignee set to Alexis Mousset
- Target version set to 4.2.5
- Target version changed from 4.2.5 to 4.1.11
This looks like a small reporting bug, the error report seems done before actual templating.
I'll try to reproduce, thanks for the detailed bug report!
- Status changed from New to In progress
- Status changed from In progress to Pending technical review
- Assignee changed from Alexis Mousset to Benoît PECCATTE
- Pull Request set to https://github.com/Normation/ncf/pull/728
- Assignee changed from Benoît PECCATTE to Alexis Mousset
- Status changed from Pending technical review to Pending release
- Subject changed from Jinja2 templating: Shows error in output but does not do Error report to Jinja2 templating: Shows error in output even when successful
This has no impact on the behavior of the agent or of Rudder reporting, and was only a wrong message displayed when running the agent with -i or more.
- Status changed from Pending release to Released
This bug has been fixed in Rudder 4.1.11, 4.2.5 and 4.3.0~rc3 which were released today.
- Project changed from 41 to Rudder
- Category changed from Generic methods - File Management to Generic methods
- Priority changed from 32 to 0
Also available in: Atom
PDF