Bug #12379
closedJinja2 templating: Shows error in output even when successful
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
Updated by Florian Heigl over 6 years ago
- File DA_SSH_Blues.cf DA_SSH_Blues.cf added
- File sshd_config.j2 sshd_config.j2 added
Updated by Florian Heigl over 6 years ago
the node property "sshgroups" which is being read contains:
{
"skifahrer": "ski",
"rennfahrer": "auto",
"autofahrer": "auto",
"oraadmin": "java-fans",
"sftp1": "sftp-chroot"
}
Updated by Florian Heigl over 6 years ago
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.
Updated by Alexis Mousset over 6 years ago
- 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
Updated by Alexis Mousset over 6 years ago
- Target version changed from 4.2.5 to 4.1.11
Updated by Alexis Mousset over 6 years ago
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!
Updated by Alexis Mousset over 6 years ago
- Status changed from New to In progress
Updated by Alexis Mousset over 6 years ago
- 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
Updated by Rudder Quality Assistant over 6 years ago
- Assignee changed from Benoît PECCATTE to Alexis Mousset
Updated by Alexis Mousset over 6 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset commit:c22a74a8aba355cc9b456551438b6b4b7ecb9eb7.
Updated by Alexis Mousset over 6 years ago
- 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.
Updated by Alexis Mousset over 6 years ago
- Status changed from Pending release to Released
Updated by Alexis Mousset over 2 years ago
- Project changed from 41 to Rudder
- Category changed from Generic methods - File Management to Generic methods
- Priority changed from 32 to 0