service cron failures are silent

Open Beginner friendly
#2,339 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
73/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, javascript
Domain
devops

Research direction

The issue identifies cron jobs in the service container and shows the proposed change for /usr/bin/upload-blobs.sh. Start by locating that cron entry and checking how the service container exposes process output. Ensure cron job stdout and stderr reach the container logs, then verify the cron configuration uses the intended output destinations.

Written by the indexing model from the issue text.

Description

Without a configured mailer, and with no redirect of stdout/stderr of cron jobs, failures of cron jobs are completely silent.

One simple option would be to redirect stdout and stderr of cron jobs to the service container's pid 1, e.g.:

-0 5 * * * root /usr/bin/with-pgenvblock.pl /dev/shm/docker-envblock /usr/odk/upload-blobs.sh
+0 5 * * * root /usr/bin/with-pgenvblock.pl /dev/shm/docker-envblock /usr/odk/upload-blobs.sh >>/proc/1/fd/1 2>>/proc/1/fd/2
Dominant language
JavaScript
Stars
233
Forks
241
Avg merge
1d 22h
Merged PRs (30d)
13

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getodk/central

All issues in getodk/central

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.