[chef] (Update) Re: File Provider Changes in 11.6


Chronological Thread 
  • From: Daniel DeLeo < >
  • To: chef < >
  • Subject: [chef] (Update) Re: File Provider Changes in 11.6
  • Date: Wed, 26 Jun 2013 19:30:55 -0700

Hi Chefs,

A quick update on the changes coming in Chef 11.6:

On Friday, June 7, 2013 at 2:35 PM, Daniel DeLeo wrote:


## Changes to Previously Undefined Behaviors

* Chef previously did not have a defined behavior if a file provider
  encountered something other than a file when attempting to update
  content. In particular, chef would follow symlinks and overwrite the
  symlink target's content; other dir entry types (such as devices, named
  pipes, etc.) would fail in strange ways. Chef will now raise an error
  instead of overwriting the content of a symlink. If you wish, you can
  delete whatever's in your way by setting `force_unlink true` on your
  resource. Note that there is no longer any built in means for managing
  the content of a file via a symlink--you must manage the target file
  instead.
Our in-house testing revealed that it is more common than we believed for a file/template/etc. resource to manage a file via a symlink. For example, in Ubuntu 13.04 resolv.conf is a symlink, and we'd been happily using a cookbook we'd developed against previous Ubuntu versions to manage that file. As originally written, the file provider changes in 11.6 would have caused our cookbook to start throwing errors when managing resolv.conf.

To avoid a breaking change for this case, we've added an option called `manage_symlink_source` to file (and derivative) resources. When enabled, Chef will detect a symlink and manage the symlink's source file. By default, this option is enabled, but will emit a warning. We plan to change the default behavior to disabled in Chef 12. The option can be permanently enabled (with no warning) by adding `manage_symlink_source true` to your file/template/etc. resource.

Thanks,

Dan DeLeo

p.s., We'll have a release candidate available for you very soon.



Archive powered by MHonArc 2.6.16.

§