Skip to content

checksum comparison is not working, forcing re-download of existing java archive #163

@dlethin

Description

@dlethin

I'm running chef-solo with vagrant along with vagrant-cachier plugin. My project is using the java cookbook. The problem I'm running into is that each time I 'vagrant up' a fresh vm, even though I have the specified java archive downloaded into my cache directory, the checksum comparison is not working and I'm forced to download java each time which slows provisioning down considerably.

After troubleshooting, I fixed the problem in my local copy of the cookbook. Line 57 in providers/ark.rb should be:

  downloaded_sha == new_resource.checksum

instead of:

  downloaded_sha == new_resource.md5 

When I made this change locally, the recipe would successfully detect that I had already downloaded the archive and skip it.

I tried to be a good open source citizen and follow the instructions for contributing a pull request ( this would have been my first on github ) but I ran into problems trying to follow the instructions to setup my machine in order to run the chefspec tests. Unfortunately, I've got a conflict when running "vagrant plugin install vagrant-berkshelf":


The plugin(s) can't be installed due to the version conflicts below.
This means that the plugins depend on a library version that conflicts
with other plugins or Vagrant itself, creating an impossible situation
where Vagrant wouldn't be able to load the plugins.

You can fix the issue by either removing a conflicting plugin or
by contacting a plugin author to see if they can address the conflict.

Vagrant could not find compatible versions for gem "celluloid":
In Gemfile:
vagrant-berkshelf (>= 0) ruby depends on
celluloid (~> 0.13.0) ruby

vagrant (= 1.5.1) ruby depends on
  celluloid (0.15.2)

I'm a chef/ruby/vagrant newbie. I had stumbled on this issue with the java cookbook on my first attempt at teaching myself. I consider it success enough at this point in my knowledge to have successfully trouble-shot the issue, but unfortunately given where I am now in my learning its a bit ambitious for me to try to figure out how to resolve this dependency issue and learn the tools for writing chef unit and integration tests.

So in the meantime, the best thing I can do is submit this issue. In the future if this issue still exists and I'm a bit more seasoned, I'll take a crack at trying to create a pull request.

In the meantime, thanks for sharing the plugin in the first place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions