[chef] Re: Re: Re: Package doesnt notify service?


Chronological Thread 
  • From: Zac Stevens < >
  • To:
  • Subject: [chef] Re: Re: Re: Package doesnt notify service?
  • Date: Tue, 8 May 2012 17:16:57 +0100

On Tue, May 8, 2012 at 4:54 PM, Phil Dibowitz 
< >
 wrote:
> On 05/08/2012 04:29 AM, Vladimir Girnet wrote:
>>
>> On May 8, 2012, at 2:07 PM, Geoff Meakin wrote:
>>
>>> Hi Phil,
>>>
>>> I think you misunderstood (1)
>>>>> 1. On a chef run, dont assume that the database should always be 
>>>>> started.
>>>>> There might have been good reasons it was taken down by a sysadmin
>>>
>>> I'm trying to *NOT* ensure the database is always started.
>>> For example as a sysadmin i may have taken my database down for very good
>>> reasons whilst I sort some stuff out. I dont want chef restarting it
>>> automatically
>>>
>>
>> I think you are missing then the main feature of Chef configuration 
>> management
>> - to ensure system is always in a correct state.
>>
>> A better way for solving your problem will be to use "not_if/only_if" for
>> "service" resource. For example, do no start the service if there is a
>> specific file present on the system. When you need to have your database 
>> down,
>> just create that file, and chef will not do anything. Removing the file 
>> will
>> mean for chef to do all required things.
>
> Right. For example, make it dependent on /tmp/no_start_mongo and touch that
> file when you're doing mongo maintenance.

That's good advice, and possibly an acceptable solution, but I'm also
interested in an explanation for the behaviour that Geoff reported.

I'd have expected a package resource to fire its notifications on
install, not just update (surely both are changes).
The wiki documentation doesn't list any caveats about notifications
for the Package resource.

Are we missing something, or is this a bug?


Zac



Archive powered by MHonArc 2.6.16.

§