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

java install fails with vagrant-cachier plugin and NFS sharing #164

Closed
dlethin opened this issue Apr 13, 2014 · 2 comments
Closed

java install fails with vagrant-cachier plugin and NFS sharing #164

dlethin opened this issue Apr 13, 2014 · 2 comments

Comments

@dlethin
Copy link

dlethin commented Apr 13, 2014

DISCLAIMER - I'm a chef/vagrant newbie here

I'm using vagrant and chef-solo to setup consistent vm development environments. I need java and am using this plugin.

To improve performance of vagrant, I'm using two recommendations I found on the web:

  1. use vagrant NFS file sharing
  2. use vagrant-cachier plugin.

The benefit of using vagrant-cachier plugin is that your archives and packages downloaded from chef are stored in your user directory on the host system. This way, every time you 'vagrant up' a fresh system, you don't have to download everything if its sitting in your cache.

I'm told using NFS with vagrant improves performance as well and is recommended. The trouble is that when using this vagrant-cachier along with NFS, this causes the java chef recipe to fail.

The problem is that after the recipe successfully downloads the java archive into my cache directory, it tries to unpack it in the cache as well and this was failing for me with the following error message:

 FATAL: Failed to extract file jdk-7u51-linux-i586.tar.gz!

After troubleshooting the issue by printing the stderr from executing tar, I see the following:

[2014-04-11T01:20:24+00:00] INFO: cmd.stderr tar: jdk1.7.0_51/man/ja_JP.UTF-8/man1/rmid.1: Cannot change ownership to uid 10, gid 143: Operation not permitted

This occurs for every file in the archive.

It seems there are two solutions to this:

  1. In providers/ark.rb on line 154, include the "--no-same-owner" option to the tar command
  2. Don't try to unpack the downloaded archive in the same cache directory but perhaps in /tmp on the guest system.

In my local environment I chose the first suggestion and it resolved my issue.

As I explained in a previous issue ( #163 ), I'm a chef newbie at this point and not skilled enough at this point to complete the guidelines to submit a pull request, but if this issue remains open and I become season enough in chefspec and your integration test suite, I might give it a try.

In the meantime, thanks again for the great plugin.

@erichelgeson
Copy link
Contributor

Merged in agileorbit-cookbooks/java@1f7078c

@lock
Copy link

lock bot commented May 3, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants