Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of U+2013 (EN DASH) in trusty template causes puppetdb errors #105

Closed
linuxdaemon opened this issue Jan 14, 2019 · 6 comments
Closed

Comments

@linuxdaemon
Copy link
Contributor

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.10.10
  • Ruby: ruby 2.1.9p490 (2016-03-30 revision 54437) [x86_64-linux]
  • Distribution: `Ubuntu Server 14.04 (Trusty)
  • Module version: 2.4.1

How to reproduce (e.g Puppet code you use)

class { 'fail2ban':
  config_file_template => "fail2ban/${::lsbdistcodename}/etc/fail2ban/jail.conf.epp",
  action               => 'action_',
  whitelist            => ['127.0.0.1/8'],
}

What are you seeing

2019-01-14 22:50:21,673 ERROR [p.p.command] [251,279] [replace catalog] Retrying after attempt 0 for <node>, due to: org.postgresql.util.PSQLException: ERROR: character with byte sequence 0xe2 0x80 0x93 in encoding "UTF8" has no equivalent in encoding "LATIN1"
org.postgresql.util.PSQLException: ERROR: character with byte sequence 0xe2 0x80 0x93 in encoding "UTF8" has no equivalent in encoding "LATIN1"

What behaviour did you expect instead

No errors, standard run

Output log

See What are you seeing

Any additional information you'd like to impart

This error causes exported resources to not properly save and share with other nodes. I'm not 100% sure that the template file is the culprit, but it is the only file deployed containing the byte sequence puppetdb is logging. It appears that U+2018 and U+2019 (LEFT SINGLE QUOTATION MARK and RIGHT SINGLE QUOTATION MARK respectively) cause this issue as well, and they also appear in both the trust and jessie templates

@bastelfreak
Copy link
Member

HI @linuxdaemon, which version of puppetdb are you using? I assume this isn't the latest one. If not, is it possible that you update and check if the error is still present? This happenend alot in the 2.X or 3.X releases of PuppetDB, but got fixed afterwards.

@linuxdaemon
Copy link
Contributor Author

Hi @bastelfreak, I'm running 4.4.0 according to puppetdb --version.

@linuxdaemon
Copy link
Contributor Author

The exact line causing the issue is

# ALERT – tried to register forbidden variable ‘GLOBALS’
confirmed by removing said line and re-running puppet on the failing node

@bastelfreak
Copy link
Member

could you provide a patch for it?

@linuxdaemon
Copy link
Contributor Author

I can, I'm just not sure if that is meant to be documenting a specific format for that log, containing those specific characters.

@bastelfreak
Copy link
Member

I'm pretty sure that it should be a normal single quote like ' and it got messed up during some copy and paste.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants