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

Missing rsync package dependency #192

Open
bitphage opened this issue May 4, 2017 · 5 comments
Open

Missing rsync package dependency #192

bitphage opened this issue May 4, 2017 · 5 comments

Comments

@bitphage
Copy link

bitphage commented May 4, 2017

Cookbook version

3.0.0

Chef-client version

13.0.118

Platform Details

ubuntu 16.04

Scenario:

Just testing my cookbook which uses ark resource in kitchen environment.

Steps to Reproduce:

Remove rsync package from the target system, then try to run chef-client.

Expected Result:

Ark resource successful run

Actual Result:

           * execute[unpack /tmp/kitchen/cache/osm-import-scripts-1.zip] action run
             
             ================================================================================
             Error executing action `run` on resource 'execute[unpack /tmp/kitchen/cache/osm-import-scripts-1.zip]'
             ================================================================================
             
             Mixlib::ShellOut::ShellCommandFailed
             ------------------------------------
             Expected process to exit with [0], but received '127'
             ---- Begin output of unzip -q -o /tmp/kitchen/cache/osm-import-scripts-1.zip -d /tmp/d20170504-1638-1wmicpk && rsync -a /tmp/d20170504-1638-1wmicpk/*/ /usr/local/osm-import-scripts-1 && rm -rf /tmp/d20170504-1638-1wmicpk ----
             STDOUT: 
             STDERR: sh: 1: rsync: not found
             ---- End output of unzip -q -o /tmp/kitchen/cache/osm-import-scripts-1.zip -d /tmp/d20170504-1638-1wmicpk && rsync -a /tmp/d20170504-1638-1wmicpk/*/ /usr/local/osm-import-scripts-1 && rm -rf /tmp/d20170504-1638-1wmicpk ----
             Ran unzip -q -o /tmp/kitchen/cache/osm-import-scripts-1.zip -d /tmp/d20170504-1638-1wmicpk && rsync -a /tmp/d20170504-1638-1wmicpk/*/ /usr/local/osm-import-scripts-1 && rm -rf /tmp/d20170504-1638-1wmicpk returned 127
@iennae
Copy link
Contributor

iennae commented May 4, 2017

According to https://github.com/chef-cookbooks/ark/blob/871c417d6bcc764fca8ca62e19cef4e0d49e1dbd/attributes/default.rb#L32 rsync is already listed as a dependency package except for mac os x platform systems. In the recipe https://github.com/chef-cookbooks/ark/blob/master/recipes/default.rb, the package dependencies are installed. Can you provide more information about how you are using this?

@bitphage
Copy link
Author

bitphage commented May 5, 2017

OK I did not included ark recipe in my recipe like

include_recipe 'ark'

Probably README should mention this? Now it's not.

@tas50
Copy link
Contributor

tas50 commented May 5, 2017

Yep there's a definite flaw here and I think the solution is to make sure we add it dynamically via the resource. I just ran into this the other day and it was a bit of a head scratcher since I thought it all worked automatically

@RulerOf
Copy link

RulerOf commented Oct 10, 2018

I ran into this today trying to use ark to unzip a local file like

# Extract the war file
ark "clover" do
  action :put
  url "file://path/to/application.war"
  path "/opt/application"
end

Worked around it by just putting this before my ark resource:

package 'rsync'

@PowerSchill
Copy link

Might be a stupid question but wouldn't a simple fix be to move the lines from the recipe to the resource?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants