- From: Dennis Klein <
>
- To: Dennis Klein <
>
- Cc:
,
- Subject: [[chef-dev]] Re: [[chef-dev]] Re: [[chef-dev]] new package resource action :reconfig
- Date: Sat, 6 Aug 2011 20:53:02 +0200
On Aug 6, 2011, at 8:25 PM, Dennis Klein wrote:
>
>
On Aug 6, 2011, at 7:43 PM,
>
>
wrote:
>
>
> Yes, i think it's a good idea, how do you plan on making it idempotent ?
>
> Have you written a new debconf resource and provider that the apt
>
> package resource would require ?
>
>
>
> --
>
> Laurent
>
>
I see 3 options for idempotency:
>
>
1. invoke the reconfiguration only if the :response_file has changed
>
- disadvantage: non-chef misconfigurations of a package will go unnoticed.
>
2. rely on idempotency of the reconfiguration facility on the specific
>
platforms
>
- disadvantage: if the platform implementation changes, idempotency may
>
not be given any more.
>
3. implement logic which retrievs the actual configuration values from the
>
node and decide, if a reconfiguration is needed. (maybe even put the
>
retrieval logic to ohai)
>
- disadvantage: intense coding necessary, in the case of apt, extra
>
packages need to be installed to be able to retrieve config values or you
>
have to reimplement a database client as part of the provider ...
>
>
So far I only implemented the :reconfig action for the apt provider.
>
Therefore I chose option 2, because dpkg-reconfigure is already idempotent.
>
>
--
>
Dennis
https://gist.github.com/1129625 (this is only a hack, but to get an idea
about how it could look like)
--
Dennis
Archive powered by MHonArc 2.6.16.