# Trying to determine why chef-client created a duplicate crontab entry

**URL:** <https://discourse.chef.io/t/trying-to-determine-why-chef-client-created-a-duplicate-crontab-entry/4895>\
**Category:** Chef Infra (archive)\
**Created:** [January 15, 2014, 11:08pm UTC](https://discourse.chef.io/t/trying-to-determine-why-chef-client-created-a-duplicate-crontab-entry/4895 "2014-01-15T23:08:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lerxst97](https://avatars.discourse-cdn.com/v4/letter/l/85f322/32.png) [@Lerxst97](https://discourse.chef.io/u/Lerxst97)\
**Post date:** [January 15, 2014, 11:08pm UTC](https://discourse.chef.io/t/trying-to-determine-why-chef-client-created-a-duplicate-crontab-entry/4895/1 "2014-01-15T23:08:42Z")

</div>

Hi,

We recently encountered a situation in which a chef-client run created  
a duplicate crontab entry while processing a cron resource. Nothing in  
our Chef or system logs suggests what might’ve caused it. chef-client  
has executed this particular cookbook hundreds of thousands of times  
since we originally deployed it and this is the first such incident of  
which we’re aware. We’ve been unable to reproduce it.

We found an old ticket describing the behavior we saw:

```
Crontab entries get inserted twice, randomly
https://tickets.opscode.com/browse/CHEF-1377

```

This was reported in 2010 against version 0.8.8 and was closed as not  
a bug, but we wonder about David Miller’s comment from 31 Dec. 2012  
and Bryan McLellan’s response:

```
http://bit.ly/1eAeHz7

```

We’re running Chef 11.4.4 on the server and client. The OS is CentOS  
5.8 x86\_64.

Has anyone else encountered this problem?

Thanks,

Pete

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [January 16, 2014, 5:25pm UTC](https://discourse.chef.io/t/trying-to-determine-why-chef-client-created-a-duplicate-crontab-entry/4895/2 "2014-01-16T17:25:58Z")

</div>

On Wednesday, January 15, 2014 at 3:08 PM, [lerxst97@gmail.com](mailto:lerxst97@gmail.com) wrote:

> Hi,
> 
> We recently encountered a situation in which a chef-client run created  
> a duplicate crontab entry while processing a cron resource. Nothing in  
> our Chef or system logs suggests what might've caused it. chef-client  
> has executed this particular cookbook hundreds of thousands of times  
> since we originally deployed it and this is the first such incident of  
> which we're aware. We've been unable to reproduce it.
> 
> We found an old ticket describing the behavior we saw:
> 
> Crontab entries get inserted twice, randomly  
> [https://tickets.opscode.com/browse/CHEF-1377](https://tickets.opscode.com/browse/CHEF-1377)
> 
> This was reported in 2010 against version 0.8.8 and was closed as not  
> a bug, but we wonder about David Miller's comment from 31 Dec. 2012  
> and Bryan McLellan's response:
> 
> [http://bit.ly/1eAeHz7](http://bit.ly/1eAeHz7)
> 
> We're running Chef 11.4.4 on the server and client. The OS is CentOS  
> 5.8 x86\_64.
> 
> Has anyone else encountered this problem?
> 
> Thanks,
> 
> Pete  
> The ticket has been reopened. We only closed it because we were unable to reproduce it in our tests and needed more info from someone affected by it to reproduce. If you can gather any evidence that might help us learn the root cause, that would be great. One way to help would be to run chef-client with debug logging and set up some sort of monitoring that would detect the duplicate entries. Debug logging is pretty verbose, so you should make sure you adjust your log rotation accordingly if you do this.

Thanks,

--  
Daniel DeLeo
