-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
Idempotency #262
Comments
@Ginja unrelated but where is this UI from ? |
We have noticed this recently while trying to fix some restart issues in other cookbooks. I think our initial thoughts led us to the libartifact cookbook or the libarchive cookbook. |
@johnbellone: I was thinking that too, but I'm seeing this even in the Windows provider (the pictures above are actually using it), which doesn't use libartifact or libarchive resources. @scalp42 It's the Foreman. I have a cookbook to configure one into a reporting server for Chef that I'll release when it's ready for the public eye ;) |
I was tinkering with the libarchive cookbook last night and narrowed it down there. Not sure about Windows. It looks like we have a few places this needs to be fixed. |
You're right, the inherent problem is in the libarchive cookbook, as it has no check on whether or not it should run. It looks like it's leaving that up to the cookbooks that use it. So I have a fix for libartifiact: # Lines 56 to 71
# https://github.com/johnbellone/libartifact-cookbook/blob/master/libraries/libartifact_file.rb#L54
archive_path = ::File.join(Chef::Config[:file_cache_path], friendly_name)
archive = remote_file new_resource.remote_url do
path archive_path
source new_resource.remote_url
checksum new_resource.remote_checksum
action :create_if_missing
notifies :extract, "libarchive_file[#{archive_path}]"
end
libarchive_file archive.path do
action :nothing
extract_to new_resource.release_path
extract_options new_resource.extract_options
owner new_resource.owner
group new_resource.group
end If that looks alright to you, @johnbellone, I'll submit a PR to your libartifiact-cookbook. This unfortunately doesn't fix the problem on Windows, I'll work on that next. |
Great work! Yes, please submit the PR :). Sent from my iPhone
|
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. |
I'm not sure if anyone else is noticing this, but I'm seeing this cookbook consistently apply at least 3 resources (on both Windows & Linux hosts):
When I view what resources were changed in our monitoring tool, it looks like this:
I'm wondering if this is because of Poise. I haven't done a deep-dive into this issue as I wanted to bring it up here in case this is to be expected.
The text was updated successfully, but these errors were encountered: