Project

General

Profile

Bug #12379

Jinja2 templating: Shows error in output even when successful

Added by Florian Heigl about 1 year ago. Updated about 1 year ago.

Status:
Released
Priority:
N/A
Category:
Generic methods - File Management
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
32

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

Associated revisions

Revision c22a74a8 (diff)
Added by Alexis MOUSSET about 1 year ago

Fixes #12379: Jinja2 templating: Shows error in output but does not do Error report

History

#1

Updated by Florian Heigl about 1 year ago

#3

Updated by Florian Heigl about 1 year ago

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

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

#4

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

#5

Updated by Alexis MOUSSET about 1 year ago

  • Project changed from Rudder to ncf
  • Category changed from Agent to Generic methods - File Management
  • Assignee set to Alexis MOUSSET
  • Target version set to 4.2.5
#6

Updated by Alexis MOUSSET about 1 year ago

  • Target version changed from 4.2.5 to 4.1.11
#7

Updated by Alexis MOUSSET about 1 year 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!

#8

Updated by Alexis MOUSSET about 1 year ago

  • Status changed from New to In progress
#9

Updated by Alexis MOUSSET about 1 year 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
#10

Updated by Rudder Quality Assistant about 1 year ago

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

Updated by Alexis MOUSSET about 1 year ago

  • Status changed from Pending technical review to Pending release
#12

Updated by Alexis MOUSSET about 1 year 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.

#13

Updated by Alexis MOUSSET about 1 year 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.

Also available in: Atom PDF