-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Cookbook does not ensure presence of postfix table dbs #117
Comments
So would you want to recreate these in the event of a failure? Wouldn't you want it to blow up? |
We'd love to better understand the appropriate action to take here. If you still have thoughts on this please reopen. Thanks! |
Oh, sorry, I didn't see the notifications. IMHO, the appropriate action would be like the code snip above where the update will run if the source (text) has changed or output (db map) is missing. @cheeseplus I get your point but in this case, no, I wouldn't want it to blow up. If one were managing the files manually and restarted postfix or ran 'newaliases' for example, the DBs would be automatically recreated if missing. There's pretty much no scenario in which I'd want the text to exist without the corresponding DB. It's a corner case, I think, but the overhead is minuscule and since the standard tools don't make a distinction between 'create' and 'update', it makes sense to have the resource behave similarly. |
During testing of a wrapper cookbook, we very quickly noticed that if the .db files corresponding to a postfix table are deleted, they are not replaced unless the content of the table file is changed, which triggers execution of postmap again.
Obviously, nothing should be deleting these files but this makes it really difficult to ensure consistency of the state declared by the cookbook.
There's a simple fix - in the recipes for the various files, like transport.rb, instead of:
It could be:
Which maintains all the current behavior but also runs postmap if the db file is missing.
Thanks
The text was updated successfully, but these errors were encountered: