Hello
I have been using puppet for a while now, more or less successfully on
SLES 11 and CentOS 5.5
currently I am using puppet 2.6.6
I now am trying it out on redhat 6, and now i run into an problem with
even the simplest of modules/classes
The error I get is :
debug: /Stage[main]/Motd/File[/etc/motd]/content: Executing ''diff -u /
etc/motd /tmp/puppet-file20110401-3455-malx7x-0''
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:341: [BUG] Segmentation
fault
ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
my motd module is like this:
class motd {
$ascii = generate(''/bin/sh'', ''-c'',
"/bin/echo OS:
$operatingsystem )
file { "/etc/motd":
owner => "root",
group => "root",
mode => "664",
content => template("motd/motd.erb"),
}
}
I tried it with puppet 2.6.7, but got the same error.
I''m not sure whether this is a puppet or a ruby problem.
Can anyone point me in the direction of a solution?
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
On 4/1/2011 5:15 AM, JohnW wrote:> Hello > > I have been using puppet for a while now, more or less successfully on > SLES 11 and CentOS 5.5 > currently I am using puppet 2.6.6 > > I now am trying it out on redhat 6, and now i run into an problem with > even the simplest of modules/classes > > The error I get is : > > debug: /Stage[main]/Motd/File[/etc/motd]/content: Executing ''diff -u / > etc/motd /tmp/puppet-file20110401-3455-malx7x-0'' > /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:341: [BUG] Segmentation > fault > ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux] > > my motd module is like this: > > class motd { > > $ascii = generate(''/bin/sh'', ''-c'', "/bin/echo OS: > $operatingsystem )Is this a direct cut and paste? Because if so, you''re missing a closing double quote here. -- Frank Sweetser fs at wpi.edu | For every problem, there is a solution that WPI Senior Network Engineer | is simple, elegant, and wrong. - HL Mencken GPG fingerprint = 6174 1257 129E 0D21 D8D4 E8A3 8E39 29E3 E2E8 8CEC -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Fri, Apr 01, 2011 at 02:15:41AM -0700, JohnW wrote:> Hello > > I have been using puppet for a while now, more or less successfully on > SLES 11 and CentOS 5.5 > currently I am using puppet 2.6.6 > > I now am trying it out on redhat 6, and now i run into an problem with > even the simplest of modules/classes > > The error I get is : > > debug: /Stage[main]/Motd/File[/etc/motd]/content: Executing ''diff -u / > etc/motd /tmp/puppet-file20110401-3455-malx7x-0'' > /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:341: [BUG] Segmentation > fault > ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux] > > my motd module is like this: > > class motd { > > $ascii = generate(''/bin/sh'', ''-c'', "/bin/echo OS: > $operatingsystem ) >Not an answer to your problem, but isnt this the same as $ascii = "OS: ${operatingsystem}" -Stefan
Sorry for the somewhat late response.
No is was not a direct cut and paste, i left out some personal
information and accidentally cut the ending double quote as well.
I sent this log as an example.
I get the error on any file I want to replace/keep is a certain state.
Like a simple module to keep the issue file the way we want:
class issue
{
file { "/etc/issue":
owner => "root",
group => "root",
mode => "644",
source => "puppet://$puppetmaster/modules/issue/
issue";
}
ends in a similar way:
info: Applying configuration version ''1301906526''
debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw
yaml; using pson
debug: /File[/etc/issue.net]/content: Executing ''diff -u /etc/
issue.net /tmp/puppet-file20110404-27227-u2uokh-0''
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:341: [BUG] Segmentation
fault
ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
Aborted (core dumped)
It seems like the execution of a system command from within the ruby
script fails, but I''m not to good with ruby.
The modules are used without problems on systems with SLES11 and
CentOS 5.5
- John
On Apr 1, 9:36 pm, Frank Sweetser <f...@WPI.EDU>
wrote:> On 4/1/2011 5:15 AM, JohnW wrote:
>
>
>
> > Hello
>
> > I have been using puppet for a while now, more or less successfully on
> > SLES 11 and CentOS 5.5
> > currently I am using puppet 2.6.6
>
> > I now am trying it out on redhat 6, and now i run into an problem with
> > even the simplest of modules/classes
>
> > The error I get is :
>
> > debug: /Stage[main]/Motd/File[/etc/motd]/content: Executing
''diff -u /
> > etc/motd /tmp/puppet-file20110401-3455-malx7x-0''
> > /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:341: [BUG] Segmentation
> > fault
> > ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
>
> > my motd module is like this:
>
> > class motd {
>
> > $ascii = generate(''/bin/sh'',
''-c'', "/bin/echo OS:
> > $operatingsystem )
>
> Is this a direct cut and paste? Because if so, you''re missing a
closing double
> quote here.
>
> --
> Frank Sweetser fs at wpi.edu | For every problem, there is a solution
that
> WPI Senior Network Engineer | is simple, elegant, and wrong. - HL
Mencken
> GPG fingerprint = 6174 1257 129E 0D21 D8D4 E8A3 8E39 29E3 E2E8 8CEC
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
On Apr 4, 3:45 am, JohnW <boerma....@gmail.com> wrote:> info: Applying configuration version ''1301906526'' > debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw > yaml; using pson > debug: /File[/etc/issue.net]/content: Executing ''diff -u /etc/ > issue.net /tmp/puppet-file20110404-27227-u2uokh-0'' > /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:341: [BUG] Segmentation > fault > ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux] > > Aborted (core dumped) > > It seems like the execution of a system command from within the ruby > script fails, but I''m not to good with ruby.A segmentation fault in a Ruby program likely signals a problem in the Ruby runtime, not the program. Does the Ruby you are using ship with RHEL 6? If it was built with a different toolchain or against a different version of the system libraries than RHEL 6 provides, then you might see any number of odd behaviors, segmentation faults among them. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
OK, the problem just got a little stranger. my previous puppetruns were done on RHEL6 installed on a kvm, with a kvm host installed with SLES11sp1 I now installed a physical host with RHEL6, using the same resources, and on that system the same puppetruns run without error. I tried both aforementioned motd and issue modules. This would imply it would be more a problem with virtualisation, then with puppet/ruby. It would mean, I have to report this elsewhere (not sure where yet) @ jcbolllinger: the Ruby that was used, is shipped with RHEL6 On Apr 4, 3:02 pm, jcbollinger <John.Bollin...@stJude.org> wrote:> On Apr 4, 3:45 am, JohnW <boerma....@gmail.com> wrote: > > > info: Applying configuration version ''1301906526'' > > debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw > > yaml; using pson > > debug: /File[/etc/issue.net]/content: Executing ''diff -u /etc/ > > issue.net /tmp/puppet-file20110404-27227-u2uokh-0'' > > /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:341: [BUG] Segmentation > > fault > > ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux] > > > Aborted (core dumped) > > > It seems like the execution of a system command from within the ruby > > script fails, but I''m not to good with ruby. > > A segmentation fault in a Ruby program likely signals a problem in the > Ruby runtime, not the program. Does the Ruby you are using ship with > RHEL 6? If it was built with a different toolchain or against a > different version of the system libraries than RHEL 6 provides, then > you might see any number of odd behaviors, segmentation faults among > them. > > John-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jennings, Jared L CTR USAF AFMC 46 SK/CCI
2011-Apr-04 14:34 UTC
RE: [Puppet Users] Puppet on Redhat 6
> > my motd module is like this: > > > > class motd { > > > > $ascii = generate(''/bin/sh'', ''-c'', "/bin/echo OS: > > $operatingsystem ) > > > > Not an answer to your problem, but isnt this the same as > > $ascii = "OS: ${operatingsystem}" > > -StefanI believe the function is evaluated on the server, whereas the fact is evaluated on the client -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Apr 04, 2011 at 09:34:10AM -0500, Jennings, Jared L CTR USAF AFMC 46 SK/CCI wrote:> > > my motd module is like this: > > > > > > class motd { > > > > > > $ascii = generate(''/bin/sh'', ''-c'', "/bin/echo OS: > > > $operatingsystem ) > > > > > > > Not an answer to your problem, but isnt this the same as > > > > $ascii = "OS: ${operatingsystem}" > > > > -Stefan > > I believe the function is evaluated on the server, whereas the fact is > evaluated on the clientTruth, but since "/bin/echo OS: $operatingsystem" is in double quotes, wouldn''t puppet just substitute $operatingsystem with the client fact. e.g. I run the agent on Solaris and on the server I now execute ''/bin/sh'', ''-c'', ''/bin/echo OS: Solaris'' And that seems a bit to complicated for me. -Stefan> > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >
Jennings, Jared L CTR USAF AFMC 46 SK/CCI
2011-Apr-04 20:43 UTC
RE: [Puppet Users] Puppet on Redhat 6
> > > > "/bin/echo OS: $operatingsystem"You are right, Stefan! I didn''t pay attention at all to the command being executed. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Apr 4, 9:05 am, JohnW <boerma....@gmail.com> wrote:> OK, the problem just got a little stranger. > > my previous puppetruns were done on RHEL6 installed on a kvm, with a > kvm host installed with SLES11sp1 > > I now installed a physical host with RHEL6, using the same resources, > and on that system the same puppetruns run without error. > > I tried both aforementioned motd and issue modules. > > This would imply it would be more a problem with virtualisation, then > with puppet/ruby. > It would mean, I have to report this elsewhere (not sure where yet)Since you''re looking to be a good citizen (or at least hoping to get something working on your VM ;-)) I would try to contruct a minimal error case in Ruby, based on the Ruby file and line that the error message identified for you. In fact, I would try to construct a minimal VM in which to reproduce the error as well. Once you have a minimal case, I would submit it as a Ruby bug (unless you manage to reproduce it outside Ruby), but expect it to be punted over to KVM. Good luck, John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Possibly Parallel Threads
- template does not print variables
- Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem
- Recursive file hieararchy with order precedence
- ERB template, both client and master data
- trouble with retrieving information from current source