[SERVER-417] Investigate NoMethodError failures in master acceptance Created: 2015/03/06  Updated: 2016/09/27  Resolved: 2015/03/09

Status: Closed
Project: Puppet Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: Jeff McCune Assignee: Unassigned
Resolution: Done Votes: 0
Labels: AIO
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to PUP-4111 The environment_scenario-* acceptance... Closed
Template:
Sub-team: emerald
Story Points: 1
Sprint: Server Emerald 2015-03-18
QA Contact: Erik Dasher

 Description   

We're seeing errors like these in master:

  * clear out the temporary files
#<NoMethodError: undefined method `keys' for nil:NilClass>
/var/lib/jenkins/workspace/platform_puppet-server_integration-system_full-master/LAYOUT/64mdca-64a/PLATFORM/centos7/label/beaker/ruby/puppet/acceptance/lib/puppet/acceptance/environment_utils.rb:207
/usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/beaker-32e123e9a5b7/lib/beaker/dsl/structure.rb:41
/var/lib/jenkins/workspace/platform_puppet-server_integration-system_full-master/LAYOUT/64mdca-64a/PLATFORM/centos7/label/beaker/ruby/puppet/acceptance/lib/puppet/acceptance/environment_utils.rb:206
/var/lib/jenkins/workspace/platform_puppet-server_integration-system_full-master/LAYOUT/64mdca-64a/PLATFORM/centos7/label/beaker/ruby/puppet/acceptance/lib/puppet/acceptance/environment_utils.rb:210
/var/lib/jenkins/workspace/platform_puppet-server_integration-system_full-master/LAYOUT/64mdca-64a/PLATFORM/centos7/label/beaker/ruby/puppet/acceptance/lib/puppet/acceptance/environment_utils.rb:230
/var/lib/jenkins/workspace/platform_puppet-server_integration-system_full-master/LAYOUT/64mdca-64a/PLATFORM/centos7/label/beaker/ruby/puppet/acceptance/tests/environment/environment_scenario-master_environmentpath.rb:26
/usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/beaker-32e123e9a5b7/lib/beaker/test_case.rb:120
/usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/beaker-32e123e9a5b7/lib/beaker/test_case.rb:120
/usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/1.9.1/benchmark.rb:295
/usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/beaker-32e123e9a5b7/lib/beaker/test_case.rb:117
/usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/beaker-32e123e9a5b7/lib/beaker/test_suite.rb:286
/usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/beaker-32e123e9a5b7/lib/beaker/test_suite.rb:283
/usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/beaker-32e123e9a5b7/lib/beaker/test_suite.rb:283
/usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/beaker-32e123e9a5b7/lib/beaker/test_suite.rb:325
/usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/beaker-32e123e9a5b7/lib/beaker/cli.rb:147
/usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/beaker-32e123e9a5b7/lib/beaker/cli.rb:93
/usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/beaker-32e123e9a5b7/bin/beaker:6
/usr/local/rvm/gems/ruby-1.9.3-p484/bin/beaker:23
/usr/local/rvm/gems/ruby-1.9.3-p484/bin/beaker:23
/usr/local/rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15
/usr/local/rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15
Unstubbing address forge.puppetlabs.com to IP 10.32.23.69 on machine u94oyziazul9yz7.delivery.puppetlabs.net
 
u94oyziazul9yz7.delivery.puppetlabs.net (centos7-64-1) 13:09:10$ puppet resource host forge.puppetlabs.com ensure=absent
Notice: /Host[forge.puppetlabs.com]/ensure: removed
host { 'forge.puppetlabs.com':
  ensure => 'absent',
}
 
u94oyziazul9yz7.delivery.puppetlabs.net (centos7-64-1) executed in 0.55 seconds
Unstubbing address forgeapi.puppetlabs.com to IP 10.32.23.69 on machine u94oyziazul9yz7.delivery.puppetlabs.net
 
u94oyziazul9yz7.delivery.puppetlabs.net (centos7-64-1) 13:09:11$ puppet resource host forgeapi.puppetlabs.com ensure=absent
Notice: /Host[forgeapi.puppetlabs.com]/ensure: removed
host { 'forgeapi.puppetlabs.com':
  ensure => 'absent',
}
 
u94oyziazul9yz7.delivery.puppetlabs.net (centos7-64-1) executed in 0.58 seconds
Warning: ruby/puppet/acceptance/tests/environment/environment_scenario-master_environmentpath.rb errored in 5.21 seconds

Failing tests:

acceptance/tests/environment/environment_scenario-bad.rb
acceptance/tests/environment/environment_scenario-default.rb
acceptance/tests/environment/environment_scenario-existing.rb
acceptance/tests/environment/environment_scenario-master_environmentpath.rb
acceptance/tests/environment/environment_scenario-non_existent.rb
acceptance/tests/environment/environment_scenario-with_explicit_environment_conf.rb



 Comments   
Comment by Jeff McCune [ 2015/03/06 ]

Relates to PUP-4111 in that Joshua Partlow is also seeing errors. These may or may not be the same issue at this point.

Our master branch is pinned a bit behind where puppet is, but it is strange that this started failing since everything is pinned in the master branch of puppet-server.

Josh Cooper mentioned this could be an order-dependent error.

Comment by Josh Cooper [ 2015/03/06 ]

The error undefined method `keys' for nil:NilClass is occurring because the test is using puppetpath with an incorrect value, likely in a host config file.

Starting at https://github.com/puppetlabs/puppet/blob/b792d8437f925a640f74bc1642fb6a129b276e72/acceptance/lib/puppet/acceptance/environment_utils.rb#L230, it passes in master['puppetpath'], which tries to get a directory hash: https://github.com/puppetlabs/puppet/blob/b792d8437f925a640f74bc1642fb6a129b276e72/acceptance/lib/puppet/acceptance/environment_utils.rb#L170. This causes the `ls` call to fail in https://github.com/puppetlabs/puppet/blob/b792d8437f925a640f74bc1642fb6a129b276e72/acceptance/lib/puppet/acceptance/environment_utils.rb#L160, an exception is raise (due to non-zero exit code), but the ensure block tries to cleanup new_files which was never initialized. https://github.com/puppetlabs/puppet/blob/b792d8437f925a640f74bc1642fb6a129b276e72/acceptance/lib/puppet/acceptance/environment_utils.rb#L207

Comment by Jeff McCune [ 2015/03/06 ]

Leaving this open because I still need to make a determination if we need to change something in puppet server land to get this resolved.

I don't think so because this isn't failing in the aio branches and I've never seen it fail there, but leaving it open over the weekend to figure out how to find out for sure.

Comment by Jeff McCune [ 2015/03/09 ]

Not an issue in the aio branch for the reasons Josh described.

Generated at Wed Nov 13 11:46:43 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.