I'm getting an error sporadically when doing a chef-client run, it throws a 403 "Forbidden" HTTPServerException when trying to transfer a file. It's not consistent, and it pops up on different files. My network guy says it's probably a timing thing and I should just tell it to retry a few times.
I have a bunch of files that are being pushed, and they're all one-liners. If I were to add the "retries" and "retry_delay" attributes to all of them, it would make them all 4-liners and involve a lot of code duplication.
Is there a way to set a default value for these attributes somewhere so I don't have to set it in like 12 different places?
Here's the error, just for completeness:
No, nor is there any reason your connection to the Chef server should be intermittent. How long do your runs take? In Chef 11 things were changed to allow files to be downloaded on-demand during the run to save time at the start. This was reverted because it caused issues on long Chef runs because the URLs for things like cookbook files are timed-locked and only work for a given number of minutes. If your Chef runs are very long, you may be hitting this. This change was reverted in Chef 12, so if you haven't already please try upgrading.