Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu Tests Failing #22

Closed
nrw opened this issue Jul 29, 2012 · 6 comments
Closed

Ubuntu Tests Failing #22

nrw opened this issue Jul 29, 2012 · 6 comments

Comments

@nrw
Copy link

@nrw nrw commented Jul 29, 2012

Running this sequence of commands (taken from the readme):

$ git clone https://github.com/karmi/cookbook-elasticsearch.git elasticsearch
$ cd elasticsearch
$ berks install --shims ./tmp/cookbooks
$ vagrant up lucid32

Fails this test:

# Running tests:

[omitted tests that pass]

  1) Failure:
test_0002_installs_elasticsearch_jar(recipe::elasticsearch::default::Installation) [/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/minitest-chef-handler-0.6.0/lib/minitest-chef-handler/resources.rb:33]:
The file does not have the expected owner.
Expected: "elasticsearch"
  Actual: nil

12 tests, 16 assertions, 1 failures, 0 errors, 0 skips
[Sun, 29 Jul 2012 10:53:40 +0200] INFO: Report handlers complete
[Sun, 29 Jul 2012 10:53:40 +0200] ERROR: Running exception handlers
[Sun, 29 Jul 2012 10:53:40 +0200] ERROR: Exception handlers complete
[Sun, 29 Jul 2012 10:53:40 +0200] DEBUG: Re-raising exception: RuntimeError - MiniTest failed with 1 failure(s)
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/minitest-chef-handler-0.6.0/lib/minitest-chef-handler.rb:43:in `report'
  /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/client.rb:104:in `call'
  /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/client.rb:104:in `run_completed_successfully'
  /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/client.rb:103:in `each'
  /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/client.rb:103:in `run_completed_successfully'
  /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/client.rb:168:in `run'
  /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/application/solo.rb:207:in `run_application'
  /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/application/solo.rb:195:in `loop'
  /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/application/solo.rb:195:in `run_application'
  /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/application.rb:70:in `run'
  /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/chef-solo:25
  /opt/vagrant_ruby/bin/chef-solo:19:in `load'
  /opt/vagrant_ruby/bin/chef-solo:19
[Sun, 29 Jul 2012 10:53:40 +0200] FATAL: Stacktrace dumped to /etc/vagrant-chef/chef-stacktrace.out
[Sun, 29 Jul 2012 10:53:40 +0200] DEBUG: RuntimeError: MiniTest failed with 1 failure(s)
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/minitest-chef-handler-0.6.0/lib/minitest-chef-handler.rb:43:in `report'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/client.rb:104:in `call'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/client.rb:104:in `run_completed_successfully'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/client.rb:103:in `each'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/client.rb:103:in `run_completed_successfully'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/client.rb:168:in `run'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/application/solo.rb:207:in `run_application'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/application/solo.rb:195:in `loop'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/application/solo.rb:195:in `run_application'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/application.rb:70:in `run'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-0.10.10/bin/chef-solo:25
/opt/vagrant_ruby/bin/chef-solo:19:in `load'
/opt/vagrant_ruby/bin/chef-solo:19
[Sun, 29 Jul 2012 10:53:40 +0200] FATAL: RuntimeError: MiniTest failed with 1 failure(s)

Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

I get the same error with lucid64. However, centos6 runs as expected. Did I miss something?

@karmi

This comment has been minimized.

Copy link
Member

@karmi karmi commented Jul 29, 2012

Weird; "works on my machine":

$ time vagrant up lucid64
# ...
Guest Additions Version: 4.1.0
VirtualBox Version: 4.1.10
# ...
[lucid64] Running chef-solo...
[Sun, 29 Jul 2012 02:20:44 -0700] INFO: *** Chef 0.10.2 ***
# ...
# ...
Finished tests in 1.589120s, 7.5513 tests/s, 10.6977 assertions/s.
12 tests, 17 assertions, 0 failures, 0 errors, 0 skips
@nrw

This comment has been minimized.

Copy link
Author

@nrw nrw commented Jul 29, 2012

The issue seems to be with the way this test: with(:owner, 'elasticsearch') works. When i vagrant ssh lucid32 and check file ownership, elasticsearch owns all the right files.

I'm on:

Guest Additions Version: 4.1.16
VirtualBox Version: 4.1.18
Chef Version: 0.10.10

I'll step back a few versions and see if that solves the problem.

@karmi

This comment has been minimized.

Copy link
Member

@karmi karmi commented Jul 29, 2012

@nrw

This comment has been minimized.

Copy link
Author

@nrw nrw commented Jul 29, 2012

As discussed on calavera/minitest-chef-handler#27, switching to chef 0.10.8 did result in tests passing.

@karmi

This comment has been minimized.

Copy link
Member

@karmi karmi commented Jul 30, 2012

@nrw How have you changed the Chef version inside the Vagrant box?

Tried it with the precise64 box, which has Chef 0.10.10 as well, and the whole run fails with another link related error...

DEBUG: NoMethodError: ruby_block[update-java-alternatives] (java::openjdk line 43) had an error: NoMethodError: undefined method `to_str' for nil:NilClass
/opt/vagrant_ruby/lib/ruby/1.8/fileutils.rb:1414:in `fu_each_src_dest0'
/opt/vagrant_ruby/lib/ruby/1.8/fileutils.rb:336:in `ln_s'
/opt/vagrant_ruby/lib/ruby/1.8/fileutils.rb:359:in `ln_sf'
@karmi karmi closed this in a282490 Jul 30, 2012
@nrw

This comment has been minimized.

Copy link
Author

@nrw nrw commented Jul 31, 2012

@karmi I swapped chef versions like this:

$ vagrant ssh lucid32
$ gem uninstall chef -v 0.10.10
$ gem install chef -v 0.10.8

Should i do that some other way? Is there an automated way to set the chef version?

karmi added a commit that referenced this issue Aug 1, 2012
Appears symlink and owner support is radically broken in Chef since 0.10.8,
because the owner for the elasticsearch.jar is incorrectly reported
even on Chef 10.12.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.