Bug #947
pluginsync failure: can't convert nil into String in lib/puppet/network/handler/fileserver.rb:797
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | plumbing | |||
| Target version: | 0.24.6 | |||
| Affected Puppet version: | Branch: | |||
| Keywords: | ||||
| Votes: | 0 |
Description
When trying to pluginsync with default parameters, current HEAD ([8eecbe54c96cec0de492e7ae77211637b65057e8]) puppetmaster fails with this trace:
debug: mount[plugins]: Listing /plugins for ic.black.co.at ./lib/puppet/network/handler/fileserver.rb:797:in @join' ./lib/puppet/network/handler/fileserver.rb:797:in @file_path' ./lib/puppet/network/handler/fileserver.rb:807:in @reclist' ./lib/puppet/network/handler/fileserver.rb:730:in @list' ./lib/puppet/network/handler/fileserver.rb:152:in @list' /usr/share/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:147:in @to_proc' ./lib/puppet/network/xmlrpc/processor.rb:52:in @call' ./lib/puppet/network/xmlrpc/processor.rb:52:in @protect_service' ./lib/puppet/network/xmlrpc/processor.rb:85:in @setup_processor' /usr/lib/ruby/1.8/xmlrpc/server.rb:336:in @call' /usr/lib/ruby/1.8/xmlrpc/server.rb:336:in @dispatch' /usr/lib/ruby/1.8/xmlrpc/server.rb:323:in @each' /usr/lib/ruby/1.8/xmlrpc/server.rb:323:in @dispatch' /usr/lib/ruby/1.8/xmlrpc/server.rb:366:in @call_method' /usr/lib/ruby/1.8/xmlrpc/server.rb:378:in @handle' ./lib/puppet/network/xmlrpc/processor.rb:44:in @process' ./lib/puppet/network/xmlrpc/webrick_servlet.rb:68:in @service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in @service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in @run' /usr/lib/ruby/1.8/webrick/server.rb:173:in @start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:in @start' /usr/lib/ruby/1.8/webrick/server.rb:162:in @start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:in @start' /usr/lib/ruby/1.8/webrick/server.rb:92:in @each' /usr/lib/ruby/1.8/webrick/server.rb:92:in @start' /usr/lib/ruby/1.8/webrick/server.rb:23:in @start' /usr/lib/ruby/1.8/webrick/server.rb:82:in @start' ./lib/puppet.rb:336:in @start' ./lib/puppet.rb:187:in @newthread' ./lib/puppet.rb:186:in @initialize' ./lib/puppet.rb:186:in @new' ./lib/puppet.rb:186:in @newthread' ./lib/puppet.rb:334:in @start' ./lib/puppet.rb:333:in @each' ./lib/puppet.rb:333:in @start' ./bin/puppetmasterd:281 err: Could not call: can't convert nil into String
I have prodded around the
PluginMountclass and I think the basic problem is that the data structure returned by
Mount.listis beep. This amongst other things causes
relpath = abspath.sub(%r{#{basepath}}, _) in lib/puppet/network/handler/fileserver.rb:PluginMount:reclist()to not work in all cases, especially when the basepath changes from one module to the next.
I have created a little patch that cleans up the PluginMount class by overriding
listinstead of
reclistand calling the original
reclistfor each module in turn. This surely needs more love to remove duplicates, but it does work on my puppetmaster now. Please find the patch in the
rest/fix-plugins-mountbranch of my repo at git://git.black.co.at/puppet-bugfixes
History
Updated by Luke Kanies about 4 years ago
- Status changed from 1 to Closed
- 7 set to fixed
I’ve verified that this works and merged the patch in.
Updated by James Turnbull over 3 years ago
- Status changed from Closed to 4
- 7 deleted (
fixed)
Updated by Paul Lathrop over 3 years ago
- Status changed from 4 to 1
I had James reopen this one as I ran into it again. I’m working on steps to reproduce.
Updated by Paul Lathrop over 3 years ago
- Status changed from 1 to 2
Updated by Redmine Admin over 3 years ago
- Target version changed from 0.24.0 to 0.25.0
- 6 set to Accepted
Updated by Redmine Admin over 3 years ago
- Status changed from 2 to Accepted
Updated by Luke Kanies over 3 years ago
Paul — is this happening in 0.24.x or in master? Is it still a problem?
Updated by Paul Lathrop over 3 years ago
- Status changed from Accepted to Closed
- % Done changed from 0 to 100
- Patch changed from Insufficient to Tests
In the end I was unable to find a reliable way to reproduce this.
Closing…
Updated by Dis Connect over 3 years ago
I can reproduce this by taking an otherwise-working puppet config and adding environments.
The bad news is, its in production right now :( but I can do some testing.
Updated by Dis Connect over 3 years ago
- Status changed from Closed to Unreviewed
Updated by James Turnbull over 3 years ago
- Category set to plumbing
- Status changed from Unreviewed to Needs More Information
- Assignee changed from Paul Lathrop to Puppet Community
Can you please provide current logs, traces, debug (—trace —debug).
Thanks
Updated by Luke Kanies over 3 years ago
Is this happening, maybe, if you set the pluginsource to a directory that doesn’t exist on the server? It could be that the basepath has to exist or an exception gets thrown.
Updated by Dis Connect over 3 years ago
Its using the default pluginpath, which magically breaks when environments is enabled.
As soon as I can destroy our puppetmaster again I’ll get the logs and such, but since its in production this might have to wait for next week. (Big end-of-cycle testing and such on several of the managed boxes right now..)
Updated by Ohad Levy over 3 years ago
does this relate to #1466?
Updated by Luke Kanies over 3 years ago
Marking #1466 as a duplicate.
Updated by Luke Kanies over 3 years ago
- Status changed from Needs More Information to Ready For Checkin
- Assignee changed from Puppet Community to James Turnbull
- Target version changed from 0.25.0 to 0.24.6
Okay, I’ve fixed this in tickets/0.24.x/947 in my repo.
Note that I had to include the fix to the Node environment validation from tickets/0.24.x/1614-2 to get the correct failure.
Updated by James Turnbull over 3 years ago
- Status changed from Ready For Checkin to Closed
Pushed in commit:6bcfd9f021be13bfd3269eaa72bc289eab37a64f in branch 0.24.x