[chef] RE: RE: RE: How to force convergence without bootstrapping?


Chronological Thread 
  • From: Kevin Keane Subscription < >
  • To: < >
  • Subject: [chef] RE: RE: RE: How to force convergence without bootstrapping?
  • Date: Wed, 15 Oct 2014 11:00:31 -0700

Title: RE: [chef] RE: RE: How to force convergence without bootstrapping?

Like others, I'm not sure I understand what you are asking.

chef-client runs *every* recipe in your run list every time. It converges every recipe every time - but then it only executes the parts that need executing. If it tried to reconfigure everything on every run, you'd have a chef-client that's excruciatingly slow, and likely would break all kinds of things (such as restarting services in the middle of the day).

I have a feeling that you are trying to get chef-client to actually execute something every time?

There are two answers to that.

First of all, chef may be the wrong tool for that job. It is not a good replacement for cron or the like.


Secondly, it *can* be done. Simply have the resource depend on some condition that is never true. Or, if your goal is to run the same thing regularly, use chef to install a script into cron.


Kevin Keane

The NetTech

http://www.4nettech.com

Our values: Privacy, Liberty, Justice

See https://www.4nettech.com/corp/the-nettech-values.html


-----Original message-----
From: Fouts, Chris < >
Sent: Wednesday 15th October 2014 7:23
To:
Subject: [chef] RE: RE: How to force convergence without bootstrapping?

Sorry, let me ask it differently.

 

I do the following

1.      knife bootstrap a node

2.      knife node run_list add <node> “run_list”

3.      chef-client on node, which converges the cookbooks

 

Normally, re-running chef-client on the node again will not do anything since the cookbooks have already run the first time, meaning I’ll just get an “up-to-date” message

 

My question is, how can I re-run chef-client to make it “act” like I have not done step 3 above the first time?

 

Chris

 

 

From: Nguyen, Dang [mailto:
Sent: Tuesday, October 14, 2014 8:12 PM
To:
Subject: [chef] RE: How to force convergence without bootstrapping?

 

Assuming you've bootstrapped the node already and assigned it a role, you simply run chef client.

-----Original Message-----
From: Fouts, Chris
Received: Tuesday, 14 Oct 2014, 5:08PM
To: " target="_blank" title="This external link will open in a new window">
Subject: [chef] How to force convergence without bootstrapping?

Is there a way to “force” my cookbooks to rerun without bootstrapping my nodes?

 

Chris




Archive powered by MHonArc 2.6.16.

§