docker-library / docker-library/mongo
forked temporary mongod not shutdown if initdb failing script
Open
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 1.1k
- Forks
- 658
- Avg merge
- 4h 40m
- Merged PRs (30d)
- 1
Description
when any script in /docker-entrypoint-initdb.d/* fails the whole docker-entrypoint.sh fails but without shutting down the temporary forked mongod
function shutdown {
"${mongodHackedArgs[@]}" --shutdown
rm -f "$pidfile"
}
# hook showtdown
trap shutdown EXIT
rm -f "$pidfile"
# reset shutdown
trap - EXIT
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in 4.4/docker-entrypoint.sh around the shutdown trap near line 304 and the later pidfile cleanup near line 357. Reproduce an initdb script failure and verify that the temporary mongod is shut down and its pidfile is cleaned up when docker-entrypoint.sh exits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, mongodb, shell
- Domain
- databases, devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100