-
Notifications
You must be signed in to change notification settings - Fork 136
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
chocolatey.config broken after puppet provider execution #120
Comments
I'm guessing BOM characters. Did you place a file in before choco did? |
What version of the puppet provider? What version of Chocolatey? |
I control chocolatey.config by puppet. During execution puppet agent - error ocur, and choco not work. In the end of manifest puppet rewrite chocolatey.config to clean an ok state without "п»ї" in 1st line. And on next execution all is ok. |
Yeah, controlling the config outside of Chocolatey is not recommended. When choco sees a need to change the file it will. If you must control it, ensure your template is utf8 with the BOM (byte order mark). We are working on bringing all the config to types. |
And every new version of choco is almost guaranteed to change the config. You need to ensure on your end you are not causing resource thrashing. |
So it's best to run choco once to model the config changes for your template when taking on new versions. |
All pc run chocolatey 0.9.9.11. I take on one valid chocolatey.config put them to puppet server. If i disable controlling chocolatey.config, chocolatey will be broken and in puppet log always will be - Could not evaluate: undefined method `each' for nil:NilClass. |
What version of Puppet? I knew I forgot to ask something. |
puppet server and client - 3.8.6 |
I believe choco is smart enough not to try to change the encoding. |
I check config on puppet server. It is utf8 with BOM. Template can't be wrong because it works on many workstations. And only in some cases above error occur. |
Puppet run in different env than choco. There are some problesm with ruby 1.9 and codepages in windows. BOM - 3 bytes and in my exampe there is 3 wrong symbols. I think it because puppet run choco with different codepage or something like this. And choco want to rewtite config and add BOM to 1st line, but because codepage wrong it add wrong 3 symbols. |
My theory was wrong. The problem occur when puppet master unavaliable, and then agent use cached catalog. And when int compare current choco config and cached in catalog, it think that here different and rewrite config, but new config is bad with wrong BOM symbols. What alternative now compare to controll choco config from puppet? |
That last thing you mentioned is fixed in newer Puppet versions. I believe On Monday, April 4, 2016, bodyakov [email protected] wrote:
Rob http://codebetter.com/robreynolds |
3.8.6 is last in 3.x branch. |
Yes, BOM is forbidden if you are using source. I should adjust choco to only use BOM if necessary. |
(WIN-231) Change curl_on command to add path to cacert bundle
During the execution puppet chocolatey provider if unavailable chocolatey repository configuration file is broken. It add some symbols to 1st line, and as result on check next packet in log will appear next error:
Could not evaluate: undefined method `each' for nil:NilClass
if execute choco list -lo in command prompt next error occur:
error deserializing response of type chocolatey.infrastructure.app.configuration.ConfigFileSettings:
Wrong choco config:
https://gist.github.com/bodyakov/65f25171cf3a2b8d1b43a213e1801f8b#file-config_bad
The text was updated successfully, but these errors were encountered: