On 16/05/13 03:28 AM, sjr wrote:
> Take a look to the example I wrote, I know writing the version in ensure
> puppet will do that...but let's imagine someone puts a new version of
> one of our services in the repository and another someone comes and
> makes the mistake of upgrading without noticing that new version, the
> service will be restarted twice ... for the upgrade and next time puppet
> will run, also notice we're not running  puppet agent in daemon mode so
> either a human or Nagios will have to find out about the upgrade. We
> would like to avoid this kind of situations.

oh! I just went back to the puppet documentation and learned something.
I didn't know puppet was able to hold packages..

according to documentation you should set "ensure" to the value "held"
to have puppet use "dpkg --set-selections $package hold",

but then reading the "package" type and its "apt" provider,
unfortunately I don't think it's possible to mix holding and enforcing a
particular version since both use the ensure parameter..


> On Thursday, May 16, 2013 7:25:57 AM UTC+2, Lelutin wrote:
>     On 15/05/13 08:24 PM, sjr wrote:
>     > The thing is we would like to be able to specify a version for the
>     > package and tell dpkg to hold it to prevent unwanted upgrades (mainly
>     > because human errors). As I haven't been able to get it working with
>     > current APT provider I would like if with its current status this is
>     > possible...
> 
>     if you provide a version in the "ensure" parameter, then puppet will
>     install this specific version..
> 
>     but the way we do it where I work is to have puppet drop a file in
>     /etc/apt/preferences.d and pin it. See [0] for more info on pinning (it
>     doesn't talk about preferences.d, but everything that can go in
>     /etc/apt/preferences can be split in different files in
>     /etc/apt/preferences.d)
> 
>     [0]: http://wiki.debian.org/AptPreferences
>     <http://wiki.debian.org/AptPreferences>
> 
>     this way, you're sure that no operation, should it be puppet or manual
>     interventions will upgrade the package.


-- 
Gabriel Filion

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to