Re: [Puppet Users] How to use Agent on localized Windows?

147 views
Skip to first unread message

Josh Cooper

unread,
Jan 2, 2013, 6:17:25 PM1/2/13
to puppet...@googlegroups.com
Hi Евгений,

On Fri, Dec 21, 2012 at 2:57 AM, Евгений Верещагин
<e.vere...@gmail.com> wrote:
> I try configure Puppet for manage Windows. My OS is localized, all system
> users and paths are renamed. If I write some russian text, puppet agent
> can't work correctly. For example, if I create user:
>
> user { 'Тест2':
> comment => 'Test user2 comment',
> password => 'pass',
> }
>
> I have bad name of user (in attach). This problem appears because Puppet use
> UTF, bat Windows cmd.exe use 866-codepage for Russian. I try add chcp 65001
> command to puppet bat-files, but it did not help.
> I try write manifest in 866-codepage, but Puppet Agent crash on startup.
>
> My platforms:
> Server 3.0.1 on Debian Wheezy.
> Agent 3.0.1 on Windows 7 Ultimate, Russian 64-bit.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/Wy8ghUFWP2QJ.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

I'm able to reproduce this problem and I've filed the issue as
https://projects.puppetlabs.com/issues/18323. Using ruby 1.9 and
fixing the computer_name method as mentioned in the ticket, I am able
to create a user. If you are seeing other issues, e.g. file names,
etc, please let us know.

Thanks,
Josh

--
Josh Cooper
Developer, Puppet Labs

Евгений Верещагин

unread,
Jan 8, 2013, 2:35:33 PM1/8/13
to puppet...@googlegroups.com
Yes, this problem made impossible create (or use) non-ANSI file-names, folders, comment and other. It is very sad, my project stopped. Can I hope for the next bugfix release?

четверг, 3 января 2013 г., 3:17:25 UTC+4 пользователь Josh Cooper написал:

Josh Cooper

unread,
Jan 8, 2013, 3:05:12 PM1/8/13
to puppet...@googlegroups.com
On Tue, Jan 8, 2013 at 11:35 AM, Евгений Верещагин
<e.vere...@gmail.com> wrote:
> Yes, this problem made impossible create (or use) non-ANSI file-names,
> folders

Does this occur when using a simple file resource when owner, group
and mode are not specified? If so, could you try the latest ruby 1.9
on windows from http://rubyinstaller.org?

Евгений Верещагин

unread,
Jan 9, 2013, 5:56:05 AM1/9/13
to puppet...@googlegroups.com
OK, I try this;

1. Create site.pp with strings:

file { 'D:/тест.txt':
content => 'Hello, world!',
}

2. Run Puppet Agent.
3. Make file on D: with unreadable name (screenshot)
4. Download zip-file from http://rubyinstaller.org (ruby-1.9.3-p362)
5. Unzip to C:/Program Files/Puppet Labs/Puppet/sys/ruby with rewriting.
6. Run Agent.
7. I saw a lot of new problems (screenshot): not enough some GEMs.


среда, 9 января 2013 г., 0:05:12 UTC+4 пользователь Josh Cooper написал:
create-1.9-ruby.png
file-create.png

Josh Cooper

unread,
Jan 9, 2013, 5:43:12 PM1/9/13
to puppet...@googlegroups.com
On Wed, Jan 9, 2013 at 2:56 AM, Евгений Верещагин
<e.vere...@gmail.com> wrote:
> OK, I try this;
>
> 1. Create site.pp with strings:
>
> file { 'D:/тест.txt':
> content => 'Hello, world!',
> }
>
> 2. Run Puppet Agent.
> 3. Make file on D: with unreadable name (screenshot)

This is definitely a bug in ruby 1.8.7. I can see, using Process
Monitor, that ruby is calling CreateFile with a mangled filename.

> 4. Download zip-file from http://rubyinstaller.org (ruby-1.9.3-p362)
> 5. Unzip to C:/Program Files/Puppet Labs/Puppet/sys/ruby with rewriting.
> 6. Run Agent.
> 7. I saw a lot of new problems (screenshot): not enough some GEMs.

You'll need to use puppet 3, the latest stable release is 3.0.2:

https://downloads.puppetlabs.com/windows/

Евгений Верещагин

unread,
Jan 10, 2013, 12:37:00 AM1/10/13
to puppet...@googlegroups.com


This is definitely a bug in ruby 1.8.7. I can see, using Process
Monitor, that ruby is calling CreateFile with a mangled filename.

I think, that bug is in Windows codepage. In Russian console it is cp866. I can change codepage to UTF: chcp 65001, but it work in current session of cmd.exe only. I see such solutions:
1. Try switch console codepage to UTF before Puppet Agent read non-ANSI
characters from manifest.
2. Convert UTF to system codepage.
3. Disable check codepage in manifest files and write windows-manifest in windows codepage.


You'll need to use puppet 3, the latest stable release is 3.0.2:

All my experiments I spend with version 3.0.2, but it use ruby 1.8.

Евгений Верещагин

unread,
Jan 22, 2013, 11:11:12 PM1/22/13
to puppet...@googlegroups.com
is there any news?

Josh Cooper

unread,
Jan 23, 2013, 1:27:24 AM1/23/13
to puppet...@googlegroups.com
On Tue, Jan 22, 2013 at 8:11 PM, Евгений Верещагин
<e.vere...@gmail.com> wrote:
> is there any news?

Your best option is going to be to install ruby 1.9.3, and then
install the necessary windows gems contained in the Gemfile[1]. You
can either do that manually via `gem install ...`, or if you're
familiar with bundler, do `bundle install` followed by `bundle exec
puppet apply ...`

Josh

[1] https://github.com/puppetlabs/puppet/blob/master/Gemfile#L30

Евгений Верещагин

unread,
Jan 28, 2013, 3:38:59 AM1/28/13
to puppet...@googlegroups.com

Puppet client 3.1b2 write other message. It works with US-ASCII only.

пятница, 21 декабря 2012 г., 14:57:50 UTC+4 пользователь Евгений Верещагин написал:
Reply all
Reply to author
Forward
0 new messages