Bug #11624
closedCronjob saved as rudder-agent.rpmsave duplicating the job
Description
If someone has local modifications to the rudder cronjob, the update keeps the old version in the same directory:
warning: /etc/cron.d/rudder-agent saved as /etc/cron.d/rudder-agent.rpmsave
Now duplicated:
# ll /etc/cron.d/rudder-agent* -rw-r--r-- 1 root root 381 Sep 7 12:10 /etc/cron.d/rudder-agent -rw-r--r-- 1 root root 495 Oct 13 17:41 /etc/cron.d/rudder-agent.rpmsave
It's because the cronjob is declared as %config
in the spec file:
Not sure if this is the best way to do that... Also not sure if cron does actually ignore *.rpmsave
files, but I currently don't know for sure.
As soon you change your rudder cron technique and that changes the file on disk, any agent update having a different file for cron than that will duplicate the file and keep the old indefinite, since you also might change that file from within the policy itself:
My humble recommendation would be to remove the%config
directive, since the resulting on-disk cron file will be replaced by the first received policy anyway, there is no real benefit from keeping local modifications because
- If there was no agent installed before, there is no file that needs to be kept
- If there was an agent which was never connected to a policy server, it does not really matter, does it?
- If there was an agent which was executing policy, it has templated that file anyway, so no local modification was ever kept, all mods need to go to the root server's
techniques/system/common/1.0/rudder-agent-community-cron
file...
You might even consider removing either that file from the agent's rpm or have a different cronjob being templated, since modifying files that are owned by an rpm causes the headache :-/
Updated by Benoît PECCATTE about 7 years ago
- User visibility changed from Getting started - demo | first install | level 1 Techniques to Operational - other Techniques | Technique editor | Rudder settings
- Priority changed from 50 to 32
Updated by Benoît PECCATTE about 7 years ago
- Effort required set to Small
- Priority changed from 32 to 36
We could just remove the file during post-install
Updated by Janos Mattyasovszky about 7 years ago
Why keep it in the first place? :)
Updated by Nicolas CHARLES over 5 years ago
- Target version set to 5.0.13
- Priority changed from 48 to 0
This is still the case
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 5.0.13 to 5.0.14
Updated by Vincent MEMBRÉ about 5 years ago
- Target version changed from 5.0.14 to 5.0.15
Updated by Vincent MEMBRÉ about 5 years ago
- Target version changed from 5.0.15 to 5.0.16
Updated by Alexis Mousset almost 5 years ago
- Target version changed from 5.0.16 to 5.0.17
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 5.0.17 to 5.0.18
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 5.0.18 to 5.0.19
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 5.0.19 to 5.0.20
Updated by Vincent MEMBRÉ about 4 years ago
- Target version changed from 5.0.20 to 797
Updated by Benoît PECCATTE over 3 years ago
- Target version changed from 797 to 6.1.14
Updated by Vincent MEMBRÉ over 3 years ago
- Target version changed from 6.1.14 to 6.1.15
Updated by Vincent MEMBRÉ over 3 years ago
- Target version changed from 6.1.15 to 6.1.16
Updated by Vincent MEMBRÉ over 3 years ago
- Target version changed from 6.1.16 to 6.1.17
Updated by Vincent MEMBRÉ about 3 years ago
- Target version changed from 6.1.17 to 6.1.18
Updated by Vincent MEMBRÉ about 3 years ago
- Target version changed from 6.1.18 to 6.1.19
Updated by Alexis Mousset almost 3 years ago
- Status changed from New to Resolved
not a config file since 7.0, closing.