Ask Your Question

AIX puppet deleting root crontab

asked 2013-04-21 20:24:12 -0500

Ash gravatar image

updated 2013-04-21 20:29:19 -0500

Installed AIX puppet on three test servers running 5.3, 6.1 and 7.1. All went well until I tried a manual puppet run and got the following error.

[iv4073:root]:/root #puppet agent --test
info: Retrieving plugin
info: Loading facts in /opt/freeware/var/lib/pe-puppet/lib/facter/concat_basedir.rb
info: Loading facts in /opt/freeware/var/lib/pe-puppet/lib/facter/custom_auth_conf.rb
info: Loading facts in /opt/freeware/var/lib/pe-puppet/lib/facter/facter_dot_d.rb
info: Loading facts in /opt/freeware/var/lib/pe-puppet/lib/facter/ip6tables_version.rb
info: Loading facts in /opt/freeware/var/lib/pe-puppet ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-04-22 14:42:15 -0500

Stefan gravatar image

If puppet is unable to read the current crontab it will assume an empty one. As a result the agent will then add the puppet managed entries to the empty list of cronentries and then writes the modified crontab. As a result you will loose all your unmanaged cronentries. The most important line here is

err: Could not prefetch cron provider 'crontab': Could not read crontab for root: Execution of 'crontab -l' returned 1:

Can you imagine why crontab -l failed? Perhaps it is not in $PATH?

edit flag offensive delete link more


/usr/bin is the first directory in PATH, and crontab works fine from command line.

So after unsuccessfully trying to list the crontab contents, puppet will just assume it's ...(more)

Ash gravatar imageAsh ( 2013-04-22 16:02:10 -0500 )edit

Any help on this? Even if it is caused by some problem with server config, it should not continue to write over crontab if the crontab -l fails.

Ash gravatar imageAsh ( 2013-04-25 20:40:32 -0500 )edit

If you think puppet the behaviour is incorrect feel free to add a feature request. I guess the behaviour is as it is right now because there are situations where ...(more)

Stefan gravatar imageStefan ( 2013-04-26 14:54:39 -0500 )edit

I wonder if you can reproduce the error. Maybe the way puppet interacts with cron is broken on AIX.

Stefan gravatar imageStefan ( 2013-04-26 14:57:01 -0500 )edit

I can reproduce it every time I run "puppet agent --test" from the command line. Strangely this command runs fine when executed from cron.

Ash gravatar imageAsh ( 2013-04-30 18:38:32 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-04-21 20:24:12 -0500

Seen: 163 times

Last updated: Apr 22 '13