Issue
-
I see the following error when using the CJE CLI to perform operations such as
worker-restart
/upgrade
:
[worker-1] Initializing Docker cleanup job [worker-1] "-":1: bad minute [worker-1] errors in crontab file, can't install.
Environment
-
CloudBees Jenkins Enterprise (CJE) > 1.11.11 AWS/Anywhere
Explanation
This is caused by a bug introduced in version 1.11.11. The version provides the ability to set the docker cleanup frequency on cluster-init
/ worker-add
operations by introducing a new attribute docker_image_clean_frequency
. However this attribute is not properly initialized for existing workers - workers that were added prior to version 1.11.11.
Resolution
Solution
The solution is to upgrade to CloudBees Jenkins Enterprise 1.11.13.
Workaround
The workaround is to add the docker_image_clean_frequency = 60
attribute to the project configuration - 60
being the default value of 60 minutes.
1) In .dna/project.config
, add the attribute under the [worker] section, like for example:
``` [worker] ... docker_image_clean_frequency = 60 ... ```
2) Run cje upgrade --config-only --force
to apply that configuration to the project.