[Puppet Users] Re: Error 400 on SERVER: private method `gsub' called for nil:NilClass

2010-02-12 Thread Eric Black
That is awesome! I had to go back to cfengine for this task, but now I can
implement this type of thing in puppet again. Thanks so much!



On Thu, Feb 11, 2010 at 10:13 PM, Dan dgardne...@gmail.com wrote:

 I figured it out.  I hacked around and found that by adding params
 'ignore' and 'recurselimit' the problem goes away.

 For example:

 file {
  /var/faban/faban/benchmarks:
  recurse = true,
  ignore = foo,
  recurselimit = 10,
  source = puppet:///modules/faban2/benchmarks;
 }

 Without those two params, I get your error.




 On Feb 9, 6:44 am, eblack black.e...@gmail.com wrote:
  Thanks for the response. I did try putting in the subdirectory path as
  well, but the same thing occurs. I continued to play around with it
  and the error message disappears if I remove the recurse parameter.
  The trace dump is below, but I can't find the problem from it (I don't
  know ruby):
 
  /usr/lib/ruby/1.8/webrick/httprequest.rb:342:in `parse_query'
  /usr/lib/ruby/1.8/webrick/httprequest.rb:122:in `query'
  /usr/lib/site_ruby/1.8/puppet/network/http/webrick/rest.rb:16:in
  `params'
  /usr/lib/site_ruby/1.8/puppet/network/http/handler.rb:64:in `process'
  /usr/lib/site_ruby/1.8/puppet/network/http/webrick/rest.rb:23:in
  `service'
  /usr/lib/ruby/1.8/webrick/httpserver.rb:92:in `service'
  /usr/lib/ruby/1.8/webrick/httpserver.rb:54:in `run'
  /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:45:in `listen'
  /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:42:in `call'
  /usr/lib/ruby/1.8/webrick/server.rb:151:in `start_thread'
  /usr/lib/ruby/1.8/webrick/server.rb:145:in `start'
  /usr/lib/ruby/1.8/webrick/server.rb:145:in `start_thread'
  /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
  /usr/lib/ruby/1.8/webrick/server.rb:89:in `each'
  /usr/lib/ruby/1.8/webrick/server.rb:89:in `start'
  /usr/lib/ruby/1.8/webrick/server.rb:79:in `start'
  /usr/lib/ruby/1.8/webrick/server.rb:79:in `start'
  /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:42:in `listen'
  /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:41:in
  `initialize'
  /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:41:in `new'
  /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:41:in `listen'
  /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:38:in
  `synchronize'
  /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:38:in `listen'
  /usr/lib/site_ruby/1.8/puppet/network/server.rb:131:in `listen'
  /usr/lib/site_ruby/1.8/puppet/network/server.rb:146:in `start'
  /usr/lib/site_ruby/1.8/puppet/daemon.rb:128:in `start'
  /usr/lib/site_ruby/1.8/puppet/application/puppetmasterd.rb:122:in
  `main'
  /usr/lib/site_ruby/1.8/puppet/application/puppetmasterd.rb:80:in
  `main'
  /usr/lib/site_ruby/1.8/puppet/application.rb:226:in `send'
  /usr/lib/site_ruby/1.8/puppet/application.rb:226:in `run_command'
  /usr/lib/site_ruby/1.8/puppet/application.rb:217:in `run'
  /usr/lib/site_ruby/1.8/puppet/application.rb:217:in `exit_on_fail'
  /usr/lib/site_ruby/1.8/puppet/application.rb:217:in `run'
  /usr/sbin/puppetmasterd:66
  err: private method `gsub' called for nil:NilClass
 
  On Feb 8, 5:20 pm, Daniel dan...@linuxaddicted.de wrote:
 
   You are missing the path to sync. The full path may be something like
   puppet://$server/modules/dev_oracle_dev_tools/the_tools_folder
   dev_oracle_dev_tools just identifies the module
 
   On Mon, Feb 8, 2010 at 11:13 PM, eblack black.e...@gmail.com wrote:
Hi all,
 
I'm new to puppet and I can't seem to figure out how to get rid of
this error on the client or to get the recursive copy of files to the
client:
 
err: //dev_oracle_dev_tools::install/File[/tmp/oracle_dev_tools]:
Failed to generate additional resources using 'eval_generate': Error
400 on SERVER: private method `gsub' called for nil:NilClass
 
My module is called 'dev_oracle_dev_tools' and it is defined as:
 
class dev_oracle_dev_tools {
   include dev_oracle_dev_tools::install
}
 
class dev_oracle_dev_tools::install {
   file { /tmp/oracle_dev_tools:
   recurse = true,
   ensure  = directory,
   group   = root,
   owner   = eblack,
   mode= 750,
   source  = puppet://$server/modules/
dev_oracle_dev_tools,
   }
}
 
And I call it like:
 
node file01.eblack.dev.gg.net {
   include dev_oracle_dev_tools
}
 
All the other file parameters directives are followed on the client;
ie: directory is created if it doesn't exist and mode, group, owner
are set.
 
The error goes away if I comment out the 'source' parameter.
 
Hoping someone can help me because I've spent a couple hours on this
and I couldn't find any answers anywhere.
 
Thanks,
Eric
 
--
You received this message because you are subscribed to the Google
 Groups Puppet Users group.
To post to this group, 

[Puppet Users] Re: Error 400 on SERVER: private method `gsub' called for nil:NilClass

2010-02-12 Thread Dan
I found also that with puppetd --pluginsync I also get:

Feb 11 20:25:02 emu1076 puppetd[10505]: (/File[/var/puppet/lib])
Failed to generate additional resources using 'eval_generate':
Error 400 on SERVER: private method `gsub' called
for nil:NilClass

which forms the URL:

/production/file_metadatas/plugins?ignore=---+%0A-+%22.svn%22%0A-+CVS
%0A-+%22.git%22links=managerecurse=true

(note the first empty param position).  It appears to be the
recurselimit param that is missing (written as empty string).

So the problem appears to be present in the puppetd impl of pluginsync
as well.  I am trying to work around this by syncing using a file
resource defined in my site.pp for /var/puppet/lib.










On Feb 12, 8:18 am, Eric Black black.e...@gmail.com wrote:
 That is awesome! I had to go back to cfengine for this task, but now I can
 implement this type of thing in puppet again. Thanks so much!

 On Thu, Feb 11, 2010 at 10:13 PM, Dan dgardne...@gmail.com wrote:
  I figured it out.  I hacked around and found that by adding params
  'ignore' and 'recurselimit' the problem goes away.

  For example:

  file {
       /var/faban/faban/benchmarks:
           recurse = true,
           ignore = foo,
           recurselimit = 10,
           source = puppet:///modules/faban2/benchmarks;
      }

  Without those two params, I get your error.

  On Feb 9, 6:44 am, eblack black.e...@gmail.com wrote:
   Thanks for the response. I did try putting in the subdirectory path as
   well, but the same thing occurs. I continued to play around with it
   and the error message disappears if I remove the recurse parameter.
   The trace dump is below, but I can't find the problem from it (I don't
   know ruby):

   /usr/lib/ruby/1.8/webrick/httprequest.rb:342:in `parse_query'
   /usr/lib/ruby/1.8/webrick/httprequest.rb:122:in `query'
   /usr/lib/site_ruby/1.8/puppet/network/http/webrick/rest.rb:16:in
   `params'
   /usr/lib/site_ruby/1.8/puppet/network/http/handler.rb:64:in `process'
   /usr/lib/site_ruby/1.8/puppet/network/http/webrick/rest.rb:23:in
   `service'
   /usr/lib/ruby/1.8/webrick/httpserver.rb:92:in `service'
   /usr/lib/ruby/1.8/webrick/httpserver.rb:54:in `run'
   /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:45:in `listen'
   /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:42:in `call'
   /usr/lib/ruby/1.8/webrick/server.rb:151:in `start_thread'
   /usr/lib/ruby/1.8/webrick/server.rb:145:in `start'
   /usr/lib/ruby/1.8/webrick/server.rb:145:in `start_thread'
   /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
   /usr/lib/ruby/1.8/webrick/server.rb:89:in `each'
   /usr/lib/ruby/1.8/webrick/server.rb:89:in `start'
   /usr/lib/ruby/1.8/webrick/server.rb:79:in `start'
   /usr/lib/ruby/1.8/webrick/server.rb:79:in `start'
   /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:42:in `listen'
   /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:41:in
   `initialize'
   /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:41:in `new'
   /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:41:in `listen'
   /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:38:in
   `synchronize'
   /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:38:in `listen'
   /usr/lib/site_ruby/1.8/puppet/network/server.rb:131:in `listen'
   /usr/lib/site_ruby/1.8/puppet/network/server.rb:146:in `start'
   /usr/lib/site_ruby/1.8/puppet/daemon.rb:128:in `start'
   /usr/lib/site_ruby/1.8/puppet/application/puppetmasterd.rb:122:in
   `main'
   /usr/lib/site_ruby/1.8/puppet/application/puppetmasterd.rb:80:in
   `main'
   /usr/lib/site_ruby/1.8/puppet/application.rb:226:in `send'
   /usr/lib/site_ruby/1.8/puppet/application.rb:226:in `run_command'
   /usr/lib/site_ruby/1.8/puppet/application.rb:217:in `run'
   /usr/lib/site_ruby/1.8/puppet/application.rb:217:in `exit_on_fail'
   /usr/lib/site_ruby/1.8/puppet/application.rb:217:in `run'
   /usr/sbin/puppetmasterd:66
   err: private method `gsub' called for nil:NilClass

   On Feb 8, 5:20 pm, Daniel dan...@linuxaddicted.de wrote:

You are missing the path to sync. The full path may be something like
puppet://$server/modules/dev_oracle_dev_tools/the_tools_folder
dev_oracle_dev_tools just identifies the module

On Mon, Feb 8, 2010 at 11:13 PM, eblack black.e...@gmail.com wrote:
 Hi all,

 I'm new to puppet and I can't seem to figure out how to get rid of
 this error on the client or to get the recursive copy of files to the
 client:

 err: //dev_oracle_dev_tools::install/File[/tmp/oracle_dev_tools]:
 Failed to generate additional resources using 'eval_generate': Error
 400 on SERVER: private method `gsub' called for nil:NilClass

 My module is called 'dev_oracle_dev_tools' and it is defined as:

 class dev_oracle_dev_tools {
        include dev_oracle_dev_tools::install
 }

 class dev_oracle_dev_tools::install {
        file { /tmp/oracle_dev_tools:
                recurse = true,
       

[Puppet Users] Re: Error 400 on SERVER: private method `gsub' called for nil:NilClass

2010-02-11 Thread Dan
I am seeing the same thing.  On the puppet master, the http log shows:

 DEBUG Puppet::Network::HTTP::WEBrickREST is invoked.
[2010-02-11 18:51:13] xxx1076.xx.com - - [11/Feb/2010:18:51:13
PST] GET /production/file_metadatas/modules/faban2/benchmarks?
links=managerecurse=true HTTP/1.1 400 45
[2010-02-11 18:51:13] - - /production/file_metadatas/modules/faban2/
benchmarks?links=managerecurse=true
[2010-02-11 18:51:13] DEBUG close: xx.xx.xx.xx:37585
[2010-02-11 18:51:13] DEBUG accept: xx.xx.xx.xx:37586


Notice that the URL twice has '' where you would expect to see
name=value parameters:

/production/file_metadatas/modules/faban2/benchmarks?
links=managerecurse=true


Is this perhaps the nil value that puppet complains it can't call gsub
on?


Dan












On Feb 9, 6:44 am, eblack black.e...@gmail.com wrote:
 Thanks for the response. I did try putting in the subdirectory path as
 well, but the same thing occurs. I continued to play around with it
 and the error message disappears if I remove the recurse parameter.
 The trace dump is below, but I can't find the problem from it (I don't
 know ruby):

 /usr/lib/ruby/1.8/webrick/httprequest.rb:342:in `parse_query'
 /usr/lib/ruby/1.8/webrick/httprequest.rb:122:in `query'
 /usr/lib/site_ruby/1.8/puppet/network/http/webrick/rest.rb:16:in
 `params'
 /usr/lib/site_ruby/1.8/puppet/network/http/handler.rb:64:in `process'
 /usr/lib/site_ruby/1.8/puppet/network/http/webrick/rest.rb:23:in
 `service'
 /usr/lib/ruby/1.8/webrick/httpserver.rb:92:in `service'
 /usr/lib/ruby/1.8/webrick/httpserver.rb:54:in `run'
 /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:45:in `listen'
 /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:42:in `call'
 /usr/lib/ruby/1.8/webrick/server.rb:151:in `start_thread'
 /usr/lib/ruby/1.8/webrick/server.rb:145:in `start'
 /usr/lib/ruby/1.8/webrick/server.rb:145:in `start_thread'
 /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
 /usr/lib/ruby/1.8/webrick/server.rb:89:in `each'
 /usr/lib/ruby/1.8/webrick/server.rb:89:in `start'
 /usr/lib/ruby/1.8/webrick/server.rb:79:in `start'
 /usr/lib/ruby/1.8/webrick/server.rb:79:in `start'
 /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:42:in `listen'
 /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:41:in
 `initialize'
 /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:41:in `new'
 /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:41:in `listen'
 /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:38:in
 `synchronize'
 /usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:38:in `listen'
 /usr/lib/site_ruby/1.8/puppet/network/server.rb:131:in `listen'
 /usr/lib/site_ruby/1.8/puppet/network/server.rb:146:in `start'
 /usr/lib/site_ruby/1.8/puppet/daemon.rb:128:in `start'
 /usr/lib/site_ruby/1.8/puppet/application/puppetmasterd.rb:122:in
 `main'
 /usr/lib/site_ruby/1.8/puppet/application/puppetmasterd.rb:80:in
 `main'
 /usr/lib/site_ruby/1.8/puppet/application.rb:226:in `send'
 /usr/lib/site_ruby/1.8/puppet/application.rb:226:in `run_command'
 /usr/lib/site_ruby/1.8/puppet/application.rb:217:in `run'
 /usr/lib/site_ruby/1.8/puppet/application.rb:217:in `exit_on_fail'
 /usr/lib/site_ruby/1.8/puppet/application.rb:217:in `run'
 /usr/sbin/puppetmasterd:66
 err: private method `gsub' called for nil:NilClass

 On Feb 8, 5:20 pm, Daniel dan...@linuxaddicted.de wrote: You are missing 
 the path to sync. The full path may be something like
  puppet://$server/modules/dev_oracle_dev_tools/the_tools_folder
  dev_oracle_dev_tools just identifies the module

  On Mon, Feb 8, 2010 at 11:13 PM, eblack black.e...@gmail.com wrote:
   Hi all,

   I'm new to puppet and I can't seem to figure out how to get rid of
   this error on the client or to get the recursive copy of files to the
   client:

   err: //dev_oracle_dev_tools::install/File[/tmp/oracle_dev_tools]:
   Failed to generate additional resources using 'eval_generate': Error
   400 on SERVER: private method `gsub' called for nil:NilClass

   My module is called 'dev_oracle_dev_tools' and it is defined as:

   class dev_oracle_dev_tools {
          include dev_oracle_dev_tools::install
   }

   class dev_oracle_dev_tools::install {
          file { /tmp/oracle_dev_tools:
                  recurse = true,
                  ensure  = directory,
                  group   = root,
                  owner   = eblack,
                  mode    = 750,
                  source  = puppet://$server/modules/
   dev_oracle_dev_tools,
          }
   }

   And I call it like:

   node file01.eblack.dev.gg.net {
          include dev_oracle_dev_tools
   }

   All the other file parameters directives are followed on the client;
   ie: directory is created if it doesn't exist and mode, group, owner
   are set.

   The error goes away if I comment out the 'source' parameter.

   Hoping someone can help me because I've spent a couple hours on this
   and I couldn't find any answers anywhere.

   Thanks,
   Eric

   --
   You received this message because 

[Puppet Users] Re: Error 400 on SERVER: private method `gsub' called for nil:NilClass

2010-02-09 Thread eblack
Thanks for the response. I did try putting in the subdirectory path as
well, but the same thing occurs. I continued to play around with it
and the error message disappears if I remove the recurse parameter.
The trace dump is below, but I can't find the problem from it (I don't
know ruby):

/usr/lib/ruby/1.8/webrick/httprequest.rb:342:in `parse_query'
/usr/lib/ruby/1.8/webrick/httprequest.rb:122:in `query'
/usr/lib/site_ruby/1.8/puppet/network/http/webrick/rest.rb:16:in
`params'
/usr/lib/site_ruby/1.8/puppet/network/http/handler.rb:64:in `process'
/usr/lib/site_ruby/1.8/puppet/network/http/webrick/rest.rb:23:in
`service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:92:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:54:in `run'
/usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:45:in `listen'
/usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:42:in `call'
/usr/lib/ruby/1.8/webrick/server.rb:151:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:145:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:145:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:89:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:89:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:79:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:79:in `start'
/usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:42:in `listen'
/usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:41:in
`initialize'
/usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:41:in `new'
/usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:41:in `listen'
/usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:38:in
`synchronize'
/usr/lib/site_ruby/1.8/puppet/network/http/webrick.rb:38:in `listen'
/usr/lib/site_ruby/1.8/puppet/network/server.rb:131:in `listen'
/usr/lib/site_ruby/1.8/puppet/network/server.rb:146:in `start'
/usr/lib/site_ruby/1.8/puppet/daemon.rb:128:in `start'
/usr/lib/site_ruby/1.8/puppet/application/puppetmasterd.rb:122:in
`main'
/usr/lib/site_ruby/1.8/puppet/application/puppetmasterd.rb:80:in
`main'
/usr/lib/site_ruby/1.8/puppet/application.rb:226:in `send'
/usr/lib/site_ruby/1.8/puppet/application.rb:226:in `run_command'
/usr/lib/site_ruby/1.8/puppet/application.rb:217:in `run'
/usr/lib/site_ruby/1.8/puppet/application.rb:217:in `exit_on_fail'
/usr/lib/site_ruby/1.8/puppet/application.rb:217:in `run'
/usr/sbin/puppetmasterd:66
err: private method `gsub' called for nil:NilClass


On Feb 8, 5:20 pm, Daniel dan...@linuxaddicted.de wrote:
 You are missing the path to sync. The full path may be something like
 puppet://$server/modules/dev_oracle_dev_tools/the_tools_folder
 dev_oracle_dev_tools just identifies the module



 On Mon, Feb 8, 2010 at 11:13 PM, eblack black.e...@gmail.com wrote:
  Hi all,

  I'm new to puppet and I can't seem to figure out how to get rid of
  this error on the client or to get the recursive copy of files to the
  client:

  err: //dev_oracle_dev_tools::install/File[/tmp/oracle_dev_tools]:
  Failed to generate additional resources using 'eval_generate': Error
  400 on SERVER: private method `gsub' called for nil:NilClass

  My module is called 'dev_oracle_dev_tools' and it is defined as:

  class dev_oracle_dev_tools {
         include dev_oracle_dev_tools::install
  }

  class dev_oracle_dev_tools::install {
         file { /tmp/oracle_dev_tools:
                 recurse = true,
                 ensure  = directory,
                 group   = root,
                 owner   = eblack,
                 mode    = 750,
                 source  = puppet://$server/modules/
  dev_oracle_dev_tools,
         }
  }

  And I call it like:

  node file01.eblack.dev.gg.net {
         include dev_oracle_dev_tools
  }

  All the other file parameters directives are followed on the client;
  ie: directory is created if it doesn't exist and mode, group, owner
  are set.

  The error goes away if I comment out the 'source' parameter.

  Hoping someone can help me because I've spent a couple hours on this
  and I couldn't find any answers anywhere.

  Thanks,
  Eric

  --
  You received this message because you are subscribed to the Google Groups 
  Puppet Users group.
  To post to this group, send email to puppet-us...@googlegroups.com.
  To unsubscribe from this group, send email to 
  puppet-users+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/puppet-users?hl=en.

 --

 Cheers,

 Daniel

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.