[SERVER-403] Fix clojure unit tests in preparation for ruby/puppet update Created: 2015/02/27  Updated: 2016/09/27  Resolved: 2015/03/10

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

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

Issue Links:
Blocks
is blocked by SERVER-409 Plumb confdir, vardir, codedir, logdi... Closed
Relates
relates to PUP-4073 rundir and logdir are no longer relat... Closed
Template:
Epic Link: Green: Puppet 4.0 Changes
Sub-team: Emerald
Story Points: 2
Sprint: Server Emerald 2015-03-04, Server Emerald 2015-03-18
QA Contact: Erik Dasher

 Description   

This ticket is preparation for the puppet-server 2.0 release. At that point we'll lock our submodule to the puppet 4.0 tag.

We know ahead of time that lein -U test :all is failing with the current HEAD of the master branch of puppet. We need to resolve those test failures prior to, or during, the submodule update.

Here's what the failure looks like:

$ lein -U test :all
 
lein test puppetlabs.puppetserver.bootstrap-int-test
2015-02-27 15:02:20,646 ERROR [puppet-server] Puppet Cannot create /Users/jeff/.puppet/code; parent directory /Users/jeff/.puppet does not exist
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/type/file/ensure.rb:84:in `set_directory'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/property.rb:427:in `set'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/property.rb:501:in `sync'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/type/file/ensure.rb:183:in `sync'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/transaction/resource_harness.rb:209:in `sync'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/transaction/resource_harness.rb:134:in `sync_if_needed'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/transaction/resource_harness.rb:81:in `perform_changes'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/transaction/resource_harness.rb:20:in `evaluate'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/transaction.rb:204:in `apply'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/transaction.rb:219:in `eval_resource'
org/jruby/RubyMethod.java:128:in `call'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/transaction.rb:147:in `evaluate'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/util.rb:284:in `thinmark'
/Users/jeff/.m2/repository/org/jruby/jruby-stdlib/1.7.18/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/1.9/benchmark.rb:295:in `realtime'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/util.rb:283:in `thinmark'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/transaction.rb:147:in `evaluate'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/graph/relationship_graph.rb:118:in `traverse'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/transaction.rb:138:in `evaluate'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/resource/catalog.rb:178:in `apply'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/util/log.rb:157:in `with_destination'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/transaction/report.rb:107:in `as_logging_destination'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/resource/catalog.rb:177:in `apply'
/workspace/serious/src/puppet-server/ruby/puppet/lib/puppet/settings.rb:938:in `use'
/workspace/serious/src/puppet-server/src/ruby/puppet-server-lib/puppet/server/puppet_config.rb:38:in `initialize_puppet'
/workspace/serious/src/puppet-server/src/ruby/puppet-server-lib/puppet/server/master.rb:27:in `initialize'
jruby_puppet_core.clj:207:in `invoke'
jruby_puppet_core.clj:172:in `invoke'
jruby_puppet_agents.clj:54:in `invoke'
jruby_puppet_agents.clj:39:in `invoke'
jruby_puppet_agents.clj:117:in `invoke'
internal.clj:247:in `invoke'
internal.clj:231:in `invoke'



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

Pulling this into the active sprint based on conversation IRL with Jeremy Barlow and Nate Wolfe

Comment by Nate Wolfe [ 2015/03/03 ]

The unit tests are all failing because of missing directories, which is a result of the potential bug described in PUP-4073.

Comment by Chris Price [ 2015/03/03 ]

Nate Wolfe Jeff McCune I think there may be an important distinction here, between which paths we need to override for clojure tests vs. which we need to override in packaging.

As discussed in PUP-4073, I'd like to try (if possible) to minimize the number of settings that a user needs to worry about duplicating between puppetserver.conf and puppet.conf. I had one idea that I proposed on that ticket that might help us keep that from growing beyond where we are now.

For the clojure tests, though, I don't think we can necessarily avoid specifying all of them. Because, as Josh Cooper pointed out in that ticket, there is no guarantee that the log/run dirs are children of the vardir, and we want to configure our tests to use quarantined directories that are neither the ones specified by the 'root/master' run mode nor the 'agent/user' run mode.

So... not sure I've thought this through enough to give a solid recommendation on a particular path forward, but I do think that I can see a possibility that it ends up being relatively reasonable to specify all of those paths for our clojure tests, but specify a smaller number of them in our packaging.

Comment by Jeremy Barlow [ 2015/03/03 ]

The work in SERVER-409 would plumb through a few additional settings from puppetserver.conf down into core Ruby Puppet code. The state of these unit tests should benefit from that work. After that comes in, we'll need to look at what additional work will be needed to make these tests pass.

Comment by Nate Wolfe [ 2015/03/09 ]

I expect this ticket to be resolved upon merging SERVER-409

Generated at Thu Nov 14 12:03:04 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.