Hi list, I have a problem where any invocation of RPM related functionality fails similar to *) and seem to get stuck: I do: echo ''package {"apache2": ensure => installed, noop => true, }'' | puppet -dv --detailed-exitcodes I get "wrong number of arguments" all over the place: debug: Puppet::Type::Package::ProviderRpm: Executing ''/bin/rpm -- version'' wrong number of arguments (2 for 1) debug: Puppet::Type::Package::ProviderYum: Executing ''/bin/rpm -- version'' wrong number of arguments (2 for 1) debug: Puppet::Type::Package::ProviderUrpmi: Executing ''/bin/rpm -ql rpm'' wrong number of arguments (2 for 1) debug: Puppet::Type::Package::ProviderAptrpm: Executing ''/bin/rpm -ql rpm'' wrong number of arguments (2 for 1) debug: Puppet::Type::Package::ProviderPorts: file /usr/local/sbin/ portupgrade does not exist debug: Puppet::Type::Package::ProviderYum: false value when expecting true debug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not exist debug: Puppet::Type::Package::ProviderSun: file /usr/bin/pkginfo does not exist debug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not exist debug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swinstall does not exist debug: Puppet::Type::Package::ProviderDpkg: file /usr/bin/dpkg does not exist debug: Puppet::Type::Package::ProviderFreebsd: file /usr/sbin/ pkg_delete does not exist debug: Puppet::Type::Package::ProviderAptitude: file /usr/bin/aptitude does not exist debug: Puppet::Type::Package::ProviderApple: file /Library/Receipts does not exist debug: Puppet::Type::Package::ProviderRpm: false value when expecting true debug: Puppet::Type::Package::ProviderDarwinport: file /opt/local/bin/ port does not exist debug: Puppet::Type::Package::ProviderPortage: file /usr/bin/update- eix does not exist debug: Puppet::Type::Package::ProviderAptrpm: false value when expecting true debug: Puppet::Type::Package::ProviderAppdmg: file /Library/Receipts does not exist debug: Puppet::Type::Package::ProviderUrpmi: file urpmi does not exist debug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not exist debug: Puppet::Type::Package::ProviderPkgdmg: file /Library/Receipts does not exist debug: Puppet::Type::Package::ProviderOpenbsd: file pkg_delete does not exist debug: Puppet::Type::Package::ProviderApt: file /usr/bin/debconf-set- selections does not exist debug: Creating default schedules debug: Prefetching up2date resources for package debug: Puppet::Type::Package::ProviderUp2date: Executing ''/bin/rpm -- version'' wrong number of arguments (2 for 1) err: Could not prefetch package provider ''up2date'': Execution of ''/bin/ rpm --version'' returned 1: debug: Puppet::Type::Package::ProviderUp2date: Executing ''/bin/rpm -q apache2 --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| % {VERSION} %{RELEASE} %{ARCH} '' wrong number of arguments (2 for 1) debug: //Package[apache2]: Changing ensure debug: //Package[apache2]: 1 change(s) notice: //Package[apache2]/ensure: is absent, should be present (noop) debug: Finishing transaction -606317008 with 1 changes [pxmgt1] manifests > ruby --version ruby 1.8.7 (2008-05-31 patchlevel 0) [i686-linux] [pxmgt1] manifests > puppet --version 0.24.7 [pxmgt1] manifests > cat /etc/redhat-release Red Hat Enterprise Linux AS release 4 (Nahant Update 4) *) http://groups.google.com/group/puppet-users/browse_thread/thread/ef11ad1f234f43f6/0803801633e11066?lnk=gst&q=rpm+wrong+number+of+arguments#0803801633e11066 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, On Wed, Mar 25, 2009 at 3:49 AM, Thomas Bikeev <thomas.bikeev@gmail.com> wrote:> echo ''package {"apache2": ensure => installed, noop => true, }'' |There is no apache2 package in Red Hat Enterprise Linux. You need to install the "httpd" package instead. cYa, Avi --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi Avi, you are right but it does not really matter, the trouble already begins with debug: Puppet::Type::Package::ProviderRpm: Executing ''/bin/rpm -- version'' wrong number of arguments (2 for 1) Thomas On Mar 24, 9:49 pm, Avi Miller <avi.mil...@gmail.com> wrote:> Hi, > > On Wed, Mar 25, 2009 at 3:49 AM, Thomas Bikeev <thomas.bik...@gmail.com> wrote: > > echo ''package {"apache2": ensure => installed, noop => true, }'' | > > There is no apache2 package in Red Hat Enterprise Linux. You need to > install the "httpd" package instead. > > cYa, > Avi--~--~---------~--~----~------------~-------~--~----~ 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, I found it (partially). It is caused by $stdout.reopen(tempfile) in puppet''s execute function in utils.rb It''s further caused by rb_scan_args in ruby''s class.c - did not investigate why exactly ... Here is how to reproduce in irb: require ''tempfile'' t = Tempfile.new("puppet") begin $stderr.reopen(t) rescue => detail puts detail puts detail.backtrace end [pxmgt1] ruby > ruby test.rb wrong number of arguments (2 for 1) test.rb:5:in `respond_to?'' test.rb:5:in `reopen'' test.rb:5 This problem seem only to exists on RHEL4 / Ruby ruby 1.8.7 (2008-05-31 patchlevel 0) [i686-linux] The way I fixed it just by replacing the following two lines in utils.rb (puppet): #$stdout.reopen(output_file) #$stderr.reopen(error_file) $stdout.reopen(output_file.path,"w") $stderr.reopen(error_file.path,"w") --~--~---------~--~----~------------~-------~--~----~ 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, I found it (partially). It is caused by $stdout.reopen(tempfile) in puppet''s execute function in utils.rb It''s further caused by rb_scan_args in ruby''s class.c - did not investigate why exactly ... Here is how to reproduce in irb: require ''tempfile'' t = Tempfile.new("puppet") begin $stderr.reopen(t) rescue => detail puts detail puts detail.backtrace end [pxmgt1] ruby > ruby test.rb wrong number of arguments (2 for 1) test.rb:5:in `respond_to?'' test.rb:5:in `reopen'' test.rb:5 This problem seem only to exists on RHEL4 / Ruby ruby 1.8.7 (2008-05-31 patchlevel 0) [i686-linux] The way I fixed it just by replacing the following two lines in utils.rb (puppet): #$stdout.reopen(output_file) #$stderr.reopen(error_file) $stdout.reopen(output_file.path,"w") $stderr.reopen(error_file.path,"w") Regards, Thomas On Mar 25, 9:13 am, Thomas Bikeev <thomas.bik...@gmail.com> wrote:> Hi Avi, > > you are right but it does not really matter, the trouble already > begins with > > debug: Puppet::Type::Package::ProviderRpm: Executing ''/bin/rpm -- > version'' > wrong number of arguments (2 for 1) > > Thomas > > On Mar 24, 9:49 pm, Avi Miller <avi.mil...@gmail.com> wrote: > > > Hi, > > > On Wed, Mar 25, 2009 at 3:49 AM, Thomas Bikeev <thomas.bik...@gmail.com> wrote: > > > echo ''package {"apache2": ensure => installed, noop => true, }'' | > > > There is no apache2 package in Red Hat Enterprise Linux. You need to > > install the "httpd" package instead. > > > cYa, > > Avi--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---