- From: Jay Feldblum <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: File created from template has broken (binary) and incorrect data in it after Chef run
- Date: Wed, 6 Jun 2012 16:41:45 -0400
Ian,
I'd like to suggest a possible explanation: You (or someone) is modifying the params object after declaring the resource. This is a potential explanation because there are no guarantees about what does or does not happen to objects that something else owns, and the things that can happen or not happen are likely to change for reasons that you cannot predict.
Properly speaking, you are of course never allowed to hold onto objects which you don't own, let alone with the assumption that they don't change. This isn't a constraint with Chef in particular. It's a principle of proper software design in general. In this case, you are holding onto the params object by assigning it in the resource's variables attribute. To solve this issue, make a copy of the params object, preferably one holding just the slices of data you actually need for the template resource, and assign the copy in the resource's variables attribute.
Cheers,
Jay
On Wed, Jun 6, 2012 at 11:37 AM, Bryan McLellan
<
" target="_blank">
> wrote:
On Tue, Jun 5, 2012 at 10:59 PM, AJ Christensen <
">
> wrote:
> I've allocated Heavy Water engineering resources in attempt to
> reproduce and track this down. One of our installations saw this
> earlier today.
Can you comment on CHEF-3179 as to what you saw and your environment?
Bryan
Archive powered by MHonArc 2.6.16.