pcp
[Top] [All Lists]

Re: [pcp] packaging does not preserve crontab entries

To: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Subject: Re: [pcp] packaging does not preserve crontab entries
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Wed, 20 Nov 2013 17:14:51 -0500 (EST)
Cc: PCP Mailing List <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <528D2B66.4020406@xxxxxxxxxxxxxxxx>
References: <528D2AB6.2090500@xxxxxxxxxxxxxxxxxxx> <528D2B66.4020406@xxxxxxxxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: 5eTGorn93Yn3XEw75ShJCp/6hw3XXA==
Thread-topic: packaging does not preserve crontab entries

----- Original Message -----
> 
> We install crontab entries, e.g.
> 
> /etc/cron.d/pcp-pmie
> /etc/cron.d/pcp-pmlogger
> 
> but we used to install them in different places and/or with different names.
> 
> There is some effort to handle migration during upgrades with a mixture
> of rules and "pre" scripts.
> 
> I have just observed a spectacular failure of this.
> 
> In upgrading a Centos system from PCP 3.8.0 to PCP 3.8.9,
> /etc/cron.d/pcp-pmlogger existed before the upgrade (and had been
> modified), but after the upgrade a new /etc/cron.d/pcp-pmlogger was
> installed without any warning, and no .rpmnew, ... assistance.  So the
> old /etc/cron.d/pcp-pmlogger was lost.
> 

These are marked as noreplace configuration files...

# rpm --query --configfiles pcp | grep cron
/etc/cron.d/pcp-pmie
/etc/cron.d/pcp-pmlogger

so, not clear how this happened.  Were these files that had been created
(outside of PCP packaging) before we begun installing crontabs?  i.e. is
this a coincidental naming collision, and rpm didn't know about 'em?

I suppose things are tricky in the cron.d directories because we cannot
leave around .rpmsave files and so on - both variants would still be found
by cron.  Perhaps (not sure) rpm has different logic for these directories
to ensure duplicates don't happen.

cheers.

--
Nathan

<Prev in Thread] Current Thread [Next in Thread>