Jira (PUP-10405) Upgraded to Puppetserver 6.9.2 from Puppet 6.5

23 views
Skip to first unread message

Clayton Wight (Jira)

unread,
Apr 1, 2020, 5:36:03 PM4/1/20
to puppe...@googlegroups.com
Clayton Wight created an issue
 
Puppet / Bug PUP-10405
Upgraded to Puppetserver 6.9.2 from Puppet 6.5
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/04/01 2:35 PM
Priority: Major Major
Reporter: Clayton Wight

Upgraded Puppet Server from 6.5.1 to 6.9.2

We are seeing a error when trying to query for environments. "Error: undefined method `collect' for nil:NilClass". API is reporting a 406 error.

Check the SSL and auth.conf. 

 

 

Dump for the puppet server logs:

2020-04-01T14:30:31.118-07:00 ERROR [qtp1259599435-40] [puppetserver] Puppet Server Error: undefined method `collect' for nil:NilClass
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/environments.rb:204:in `list'
org/jruby/RubyArray.java:2579:in `collect'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/environments.rb:275:in `list'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/environments.rb:351:in `list'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/master/v3/environments.rb:11:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/master/v3/authorization.rb:14:in `block in wrap'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:82:in `block in process'
org/jruby/RubyArray.java:1800:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:81:in `process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:88:in `process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:88:in `process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:87:in `block in process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:70:in `block in with_request_profiling'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:66:in `with_request_profiling'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:86:in `block in process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:93:in `respond_to_errors'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:85:in `process'
uri:classloader:/puppetserver-lib/puppet/server/master.rb:64:in `block in handleRequest'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:290:in `override'
uri:classloader:/puppetserver-lib/puppet/server/master.rb:63:in `handleRequest'

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

unread,
Apr 2, 2020, 12:15:03 AM4/2/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10405
 
Re: Upgraded to Puppetserver 6.9.2 from Puppet 6.5

I think this is due to PUP-10255. Prior to commit 7b01ee7f649677b33c9ab4a94eaea73785c63188, if Puppet::FileSystem.directory?(@environment_dir) returned false, then we returned an empty array, but now we return nil, so Nil#collect raises.

Josh Cooper (Jira)

unread,
Apr 2, 2020, 12:15:04 AM4/2/20
to puppe...@googlegroups.com

Molly Waggett (Jira)

unread,
Apr 2, 2020, 2:54:04 PM4/2/20
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Apr 2, 2020, 3:03:04 PM4/2/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Upgraded Puppet Server from 6.5.1 to 6.9.2

We are seeing a error when trying to query for environments. "Error: undefined method `collect' for nil:NilClass". API is reporting a 406 error.

Check the SSL and auth.conf. 


 

 

Dump for the puppet server logs:

{noformat}
2020-04-01T14:30:31.118-07:00 ERROR [qtp1259599435-40] [puppetserver] Puppet Server Error: undefined method `collect' for nil:NilClass
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/environments.rb:204:in `list'
org/jruby/RubyArray.java:2579:in `collect'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/environments.rb:275:in `list'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/environments.rb:351:in `list'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/master/v3/environments.rb:11:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/master/v3/authorization.rb:14:in `block in wrap'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:82:in `block in process'
org/jruby/RubyArray.java:1800:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:81:in `process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:88:in `process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:88:in `process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:87:in `block in process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:70:in `block in with_request_profiling'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:66:in `with_request_profiling'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:86:in `block in process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:93:in `respond_to_errors'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:85:in `process'
uri:classloader:/puppetserver-lib/puppet/server/master.rb:64:in `block in handleRequest'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:290:in `override'
uri:classloader:/puppetserver-lib/puppet/server/master.rb:63:in `handleRequest'

{noformat}

Molly Waggett (Jira)

unread,
Apr 3, 2020, 11:59:03 AM4/3/20
to puppe...@googlegroups.com
Molly Waggett updated an issue
Change By: Molly Waggett
Fix Version/s: PUP 6.15.0

Molly Waggett (Jira)

unread,
Apr 3, 2020, 12:59:03 PM4/3/20
to puppe...@googlegroups.com
Molly Waggett updated an issue
Change By: Molly Waggett
Release Notes: Bug Fix
Release Notes Summary: Previously, when querying environments without an `environments` directory, Puppet Server would report a 406 due to an `undefined method` error. Now we accurately report an empty environments list.

Clayton Wight (Jira)

unread,
Apr 3, 2020, 5:50:03 PM4/3/20
to puppe...@googlegroups.com
Clayton Wight commented on Bug PUP-10405
 
Re: Upgraded to Puppetserver 6.9.2 from Puppet 6.5

Molly Waggett is there anything That I can do to get our install working before the release. 

Molly Waggett (Jira)

unread,
Apr 3, 2020, 6:15:03 PM4/3/20
to puppe...@googlegroups.com

Hi Clayton Wight,

If you create an environments directory under your codedir (e.g. /etc/puppetlabs/code/environments), the error should go away.

Let me know if that helps!

Clayton Wight (Jira)

unread,
Apr 3, 2020, 6:16:03 PM4/3/20
to puppe...@googlegroups.com

Molly Waggett (Jira)

unread,
Apr 3, 2020, 7:36:03 PM4/3/20
to puppe...@googlegroups.com

Claire Cadman (Jira)

unread,
Apr 6, 2020, 9:39:02 AM4/6/20
to puppe...@googlegroups.com
Claire Cadman updated an issue
 
Change By: Claire Cadman
Labels: doc_reviewed
Reply all
Reply to author
Forward
0 new messages