[chef] Re: Re: Re: Re: Re: Re: Re: Re: notifies on resource not notifying


Chronological Thread 
  • From: Seif Attar < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Re: Re: Re: notifies on resource not notifying
  • Date: Fri, 28 Dec 2012 20:36:15 +0000

On Fri, 2012-12-28 at 14:26 -0500, Sean OMeara wrote:
Okay so If I'm reading this right -
>
> 'teamcity_build[download-artefact]' notifies ->
> 'windows_zipfile[unzip_artefacts]'  notifies ->
> 'template[CHEF.js]' notifies ->
> 'windows_batch[run_dropkick]'
>
> ... everything is being notified correctly except the windows_batch resource...
>
> Quickly experimenting with chained notifications...
>
> https://gist.github.com/4400651
>
> I can get the chaining to execute when modifying content in
> template[file1], but not on perms.
> So... there's a bug. (I'll file it later).
>
> Is your template resource actually fixing itself?
> It has a default action of :nothing, which you are notifying to
> :create... but the :create action is still convergent (idempotent),
> and the windows_batch resource will only get notified if it has to
> repair a file on disk.
>
Sad to hear about the perms bug, but I am not asking for any permissions to be changed. The file is being updated with content from the template, and the log file says that content was updated:

https://gist.github.com/4400257#file-log-txt-L16

The file that I am fixing already exists in the extracted zip with different content to what the template generates, and it does get updated. When the file is fixed, the permissions do change on it from what it was originally, doesn't bother me, but maybe that is causing the problem since you found a bug with perms?

You may look at notifying windows_batch from either windows_zipfile or
> teamcity_build directly instead of trying to chain them like that. You
> can put multiple notifies and subscribe statements on a resource, in
> case you didn't know =)
>
Thanks, I didn't know you can have multiple notifies, but I don't think that would work in my situation, the teamcity resource downloads build artefacts, when then get upzipped, the template generates CHEF.js which contains data that is needed in the execute. So each one of those resources does have a dependency on the one before.



Archive powered by MHonArc 2.6.16.

§