-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Source recipe fails on subsequent converge if package based install used in between #110
Comments
Actually, looks like the
|
I too am having this issue with CentOS 7.3. Does anyone know of a work-a-round? I need to be on at least version 2 but I am stuck with 1.8.3. Otherwise, I will have to drop this cookbook and just build a cookbook to build this installation manually. |
@jpSimkins I am working around the issue with a small wrapper cookbook: # remove the default out of date package
package "git" do
action :remove
end
# install tk package so gitk and git gui work
package "tk"
# temporary workaround for https://github.com/chef-cookbooks/git/issues/110
directory "#{Chef::Config['file_cache_path']}/git-#{node["git"]["version"]}" do
recursive true
action :delete
end
include_recipe "git::source" |
I have tried your wrapper and still no luck. I am not able to get any other version other then 1.8.3 installed. Thanks, at this point I'll have to find another solution. |
@jpSimkins Sorry to hear it didn't work for you. Are you able to share the converge log? |
Thanks for a quick response. This is the log: https://gist.github.com/jpSimkins/4ab6dd25215de0e886eaa60503f6c129 I don't mind assisting you with this if you want. Also, I am very new to chef (but a veteran to system admin) so I wonder if maybe I am doing something wrong on my end... I am a little confused on how to use the source of this cookbook so I will show you my code. Perhaps it's just a noobie mistake. Hopefully this will point something out: attributes/default.rb
I am not using any GUI so I left out the
Also, is it possible to have this cookbook install a repo in yum to install git that way? I don't think so but I wanted to confirm. Just a bit confused on how updates will happen for this. Thanks |
@jpSimkins I don't think the I also have |
Cookbook version
5.0.1
Chef-client version
12.10.24
Platform Details
CentOS 7.2 Bento Box
Scenario:
Converge fails due to error:
Steps to Reproduce:
We're using the
git::source
recipe to install git 2.6.2 on CentOS 7.2. Initial converge works great, source based install succeeds, and we have git 2.6.2 on the PATH. I think what's happening is that something else in our converge is inadvertently doing a packaged based install of git, and then the next timegit::source
the guard passes sincegit --version
returns 1.8.3.1, sogit::source
thinks it needs to install it again. It fails to extract it because the extracted version already exists inChef::Config['file_cache_path']
.So it's admittedly a bug in our converge that the package based install of git is happening, but it seems like something that this cookbook should be able to recover from.
Here's the relevant chunk from the converge output: https://gist.github.com/fletchowns/cdab5e1f58722fd4d9cd6f4492fa3e52
Expected Result:
It seems like the
git::source
recipe should be able to handle the output directory inChef::Config['file_cache_path']
already existing by using amkdir -p
or something instead of just amkdir
.Actual Result:
The converge fails because the cache directory already exists.
The text was updated successfully, but these errors were encountered: