customink-webops / hostsfile

Easily manage your hosts file with Chef
Apache License 2.0
155 stars 82 forks source link

Allow control over file resource atomic_update property #77

Open hrak opened 8 years ago

hrak commented 8 years ago

When using this cookbook inside a Docker container, it throws the following error:

file[/etc/hosts] (dynamically defined) had an error: Errno::EBUSY: Device or resource busy @ sys_fail2 - (/etc/.chef-hosts20160517-3251-tp1f8b, /etc/hosts)

This issue is discussed here, where @lamont-granquist suggests setting atomic_update false on the resource.

It would be nice if the LWRP would support a property to allow you to control atomic_update.

lamont-granquist commented 8 years ago

https://github.com/chef-cookbooks/resolver/pull/22/files

i had to do a similar fix there for /etc/resolv.conf

hrak commented 8 years ago

@lamont-granquist thanks, i have filed a PR based on your fix.