1

update.conf is used to update the cfagent.conf file so any syntax error inside cfagent.conf can be reverted.

In many documents, it's not recommended to update the update.conf file. But if update.conf do need regular update, what's the best practice to do it?

Thanks for any suggestions :-)

yegle
  • 5,795
  • 6
  • 39
  • 61

3 Answers3

1

I would suggest to do a sequential design process for every software development. Modifying update.conf is also in this group. You should try to make changes in DEV then really test it before asking for UAT and migrate it to PROD at the end.

Many people integrate version control to the policy. All hosts checkout the policy directly. You might consider to do that too if you like.

In my case, I don't change contents in update.conf much (once a year I guess). We freeze the code just for policy upgrade. Once I need to change, I do it in DEV, ensuring there is no thing wrong at all. As you may see, if there is a typo/human error, all your hosts might completely die, cannot update policy automatically.

I'm thinking to implement a double failsafe right now. One failsafe is to update policies regularly ran by cf-execd and another one for to only rescue failsafe if it fails.

phnakarin
  • 11
  • 1
0

My first question would be: why do you need to change update.conf so often? It's meant precisely to be largely invariant so that you can avoid potential problems with updates. If there is part of it that needs to be updated frequently, maybe that part should be factored out in a different file?

Diego Zamboni
  • 543
  • 2
  • 9
  • examples when I need to edit update.conf: the domain name of cfhost need to be changed, the SplayTime needs to be increased. It may not be very often, but I cannot find a proper way to update it. – yegle Jun 08 '12 at 05:54
0

Not sure if it's the same kind of problem yegle is facing, but I've also had the need to modify update.conf in cases where I'm running / mamaging a daemon with CFEngine and need to change the parameters with which the daemon needs to be restarted in the next update.

However, I agree that update.cf should (theoritically) "never" be changed. If there are changes happening, than those should be separated. With CFEngine 3, you could then use the cf_promises_validated optimization

awsiv
  • 1
  • 3
  • This is the exact situation I'm facing ( need to modify some values in update.conf ). – yegle Jun 10 '12 at 14:46
  • In my case I had to manually stop the daemon and then run cfagent to bring it up with the necessary parameters. Personally, I think manual intervention cannot be avoided in such cases. – awsiv Jun 11 '12 at 10:18