i’m often plagued by a chef client run failing due to it getting a 404 on a file
it was trying to copy into place as declared in a recipe. is this known?
here’s how it goes down:
- i update file like site-cookbooks/foo/files/default/usr/local/bin/my-cool-tool.
- some linux host kicks off its chef client run, which includes a recipe that
calls remote_directory to copy the contents of site-cookbooks/foo/files/default/usr/local/bin/
to the local filesystem
- i run “knife cookbook upload foo” just after the above client has kicked off
- the chef client run fails because when it tries to copy the file
site-cookbooks/foo/files/default/usr/local/bin/my-cool-tool it gets a 404
for it. if i run chef client again right after this, it succeeds.
i can repro it pretty consistently. is this known? a known bug? is there a
known workaround? today, in one of the many places in my recipes where i copy
a file, where this 404 problem occasionally plagues us, i put “retries 3” into
the resource block. i’m betting that’ll help, but i’m hoping there’s a better
fix or work around. if there’s not, i’ll have to add retries in a lot of places.
chef client details: 10.24, Amazon Linux 2012.09 (RHEL6-based)
chef server details: 10.18, Ubuntu 12.04.2 LTS