Skip to content

Conversation

bobmaerten
Copy link

I had weird error messages since upgrade of puppetmaster to 3.2.1, so I finally manage to make it work again as intended by specifying UTF8 content explicitly to ruby on startup.

Sory

I had weird error messages since upgrade of puppetmaster to 3.2.1, so I finally manage to make it work again as intended by specifying UTF8 content explicitly to ruby on startup.
@puppetcla
Copy link

CLA Signed by bobmaerten on 2013-05-24 09:48:38 -0700

@djmitche
Copy link
Contributor

The config.ru changes for Puppet-3.x tripped up a lot of people. Is there a way to do this elsewhere?

@bobmaerten
Copy link
Author

You could evenutally set your env system variable LC_ALL, but I was told it was not a good idea. Someone else on twitter said I should switch to ruby 2.0, I'll try that on a VM tomorrow.

@djmitche
Copy link
Contributor

I don't know what Puppet's policy is wrt ruby versions.

My suggestion is that this could be done in one of the Puppet .rb files, rather than requiring users to edit their .ru file. Is there a reason that won't work?

@zaphod42
Copy link
Contributor

My concern with this is that puppet doesn't support UTF-8 and turning on some flags is almost certainly not enough to get it all to work correctly. That said, I do agree with @djmitche that this doesn't belong in config.ru. The ability of puppet to support UTF-8 correctly will most likely cut across various parts of the codebase and so it not a rack configuration setting.

@bobmaerten, I've requested some more information in the bug report so that we can get a better picture of what was going wrong. Once that is available, then this issue will need to be updated to address @djmitche's comment about a more appropriate place for this code. You'll also need to add a test for whatever it turns out was not working correctly that this fixed.

@adrienthebo
Copy link
Contributor

For reference, https://projects.puppetlabs.com/issues/20897#note-2 was the issue update asking for more information on this ticket.

@bobmaerten
Copy link
Author

@zaphod42, I didn't know that puppet was not supporting UTF-8! I certainly wouldn't have use this if I knew as 100% of our hosts and servers are configured this way...

But puppet seemed to be rather functionnal until this upgrade.

@adrienthebo I completed the tickets with more informations, but I don't think it will be mush useful. :-\

@jeffmccune
Copy link
Contributor

@zaphod42 https://github.com/zaphod42, I didn't know that puppet was
not supporting UTF-8! I certainly wouldn't have use this if I knew as 100%
of our hosts and servers are configured this way...

We do support UTF-8. In fact, UTF-8 is the only encoding we've said we
"officially" support beyond ANSII-C. I think Andy is referring to some
known issues that remain with the way Puppet behaves in a UTF-8
environment. These issues are bugs though and if there are any that are
not reported then please report them.

So, to recap, we do support UTF-8 and any problems that are encountered
with the way we operate with UTF-8 should be filed and we'll almost
certainly accept them as a valid issue that should be fixed.

-Jeff

@adrienthebo
Copy link
Contributor

@zaphod42 @jeffmccune @Sharpie what do you guys think about this pull request? This may not address the full problem but it could improve things for end users. In addition since it's in ext/ it's not a massive functional change, so can we get a yay/nay on this PR?

@zaphod42
Copy link
Contributor

I vote -1 on this, since there is a lot of uncertainty about what this will affect. Reading over the docs for default_external and default_internal I can see a lot of possibilities for this actually resulting in other odd errors that will be hard to track down.

Also, if this is fixing a specific problem, we have no test cases for what the problem is.

@Sharpie
Copy link
Member

Sharpie commented May 31, 2013

My feelings are similar to what Andy expressed above: we don't have a good handle on the implications of this change. Also, I feel this is a pretty large functional change since it will affect all aspects of a Puppet master running under Rack set up by users who consult the config.ru template in ext/.

@bobmaerten
Copy link
Author

I understand completly. Once again, this was my contribution for my little statup problem, as it works for me in my environment. Maybe it will be useful for others in the same situation to find some infos here.

Cheers.

@bobmaerten bobmaerten closed this May 31, 2013
stephenrjohnson added a commit to stephenrjohnson/puppetmodule that referenced this pull request Jun 16, 2014
Ruby 1.9 cares about encoding, and apache starts up as US-ASCII in most
cases.  If you have a manifest that is UTF-8, then puppet won't be able to
handle it.  To work around that, we change the default encoding.  See
https://tickets.puppetlabs.com/browse/PUP-1386 and
puppetlabs/puppet#1666 for more details.
stephenrjohnson pushed a commit to stephenrjohnson/puppetmodule that referenced this pull request May 17, 2015
Ruby 1.9 cares about encoding, and apache starts up as US-ASCII in most
cases.  If you have a manifest that is UTF-8, then puppet won't be able to
handle it.  To work around that, we change the default encoding.  See
https://tickets.puppetlabs.com/browse/PUP-1386 and
puppetlabs/puppet#1666 for more details.
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

Successfully merging this pull request may close these issues.

7 participants