-
Notifications
You must be signed in to change notification settings - Fork 2.2k
(#20897) Added lines to handle UTF_8 systems at startup #1666
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
Conversation
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.
CLA Signed by bobmaerten on 2013-05-24 09:48:38 -0700 |
The |
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. |
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? |
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. |
For reference, https://projects.puppetlabs.com/issues/20897#note-2 was the issue update asking for more information on this ticket. |
@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. :-\ |
We do support UTF-8. In fact, UTF-8 is the only encoding we've said we So, to recap, we do support UTF-8 and any problems that are encountered -Jeff |
@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 |
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. |
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 |
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. |
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.
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.
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