Undo cookbook changes cooks did

Im looking for “best practice tips” with the chef. I have highlighted a pair of cookbook servers that will display the NFS share. We decided to change the mount point. My question is about the old mount point. What is the best way to get rid of it? Its durability (in FSTAB).

I could put something in the cookbook to check and unmount.

The problem that I see here is that the application is developing a cookbook, will clutter up the Undo / Fix error material. This question can easily apply to something permanent, such as cron jobs or services at startup. What is the chef's preferred way to handle this?

+4
source share
1 answer

There is no simple answer, the usual way to deal with this case is to automate the full stack, so in case of such changes, destroy and rebuild the machine from scratch to avoid old confs.

Another way is to cancel the blur time in the cookbook (one or two releases)

To talk about recent events, let's say you added an attribute new_mountpointto the old one mountpointand updated your recipe with the new mountressource using the new attribute and updated the old mountresource to remove the old mount point.

The next change, new_mountchanges for the new path, and mountpointtakes the previous valuenew_mount

+2
source

All Articles