Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.5.1, 0.5.2, 0.5.4
-
Fix Version/s: 0.5.4
-
Component/s: Chef Client, Chef Solo
-
Labels:None
-
Environment:
Gentoo linux, but this affects all platforms
Description
In Chef::Recipe we store @@seen_recipes in a class variable. THis means when you run chef in daemon mode it will only execute the recipes the first time they are run. Ever run after that will skip all recipes as previously seen recipes.
I discovered this while making a chef nanite agent for chef-solo. My hacky fix was to monkey patch :
class Chef::Recipe
def self.reset_seen_recipes!
@@seen_recipes = {}
end
end
And then call:
Chef::Recipe.reset_seen_recipes!
Before each time I make a new client and run or run_solo.
Not sure if this is the proper fix or if we should refactor @@seen_recipes to not be a global class variable
Activity
- All
- Comments
- History
- Activity
- Transitions
- Source
This is fixed - we moved from @@seen_recipes to @node.run_state[:seen_recipes], which is as it should be (the node object carts around it's state as it progresses through the run, since it's the thing thats being 'acted upon'.)
Pushed to opscode/master.