Project

General

Profile

Actions

Bug #12379

closed

Jinja2 templating: Shows error in output even when successful

Added by Florian Heigl about 6 years ago. Updated almost 2 years ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

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

rudder-j2.png (339 KB) rudder-j2.png Florian Heigl, 2018-04-05 22:24
sshd_config.j2 (1.38 KB) sshd_config.j2 Florian Heigl, 2018-04-05 22:37
DA_SSH_Blues.cf (850 Bytes) DA_SSH_Blues.cf Florian Heigl, 2018-04-05 22:37
Actions #1

Updated by Florian Heigl about 6 years ago

Actions #3

Updated by Florian Heigl about 6 years ago

the node property "sshgroups" which is being read contains:

{
"skifahrer": "ski",
"rennfahrer": "auto",
"autofahrer": "auto",
"oraadmin": "java-fans",
"sftp1": "sftp-chroot"
}

Actions #4

Updated by Florian Heigl about 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.

Actions #5

Updated by Alexis Mousset about 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
Actions #6

Updated by Alexis Mousset about 6 years ago

  • Target version changed from 4.2.5 to 4.1.11
Actions #7

Updated by Alexis Mousset about 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!

Actions #8

Updated by Alexis Mousset about 6 years ago

  • Status changed from New to In progress
Actions #9

Updated by Alexis Mousset about 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
Actions #10

Updated by Rudder Quality Assistant about 6 years ago

  • Assignee changed from Benoît PECCATTE to Alexis Mousset
Actions #11

Updated by Alexis Mousset about 6 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:c22a74a8aba355cc9b456551438b6b4b7ecb9eb7.

Actions #12

Updated by Alexis Mousset about 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.

Actions #13

Updated by Alexis Mousset about 6 years ago

  • 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.

Actions #14

Updated by Alexis Mousset almost 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
Actions

Also available in: Atom PDF