CJE Command Line is failing with 'errors in crontab file, can't install'

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

Related Issue

  • CPLT2-5322: Docker GC init script failing on CLI operations

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

Until a solution is made available in an upcoming release, 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.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.