mongod doesn't return when killed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Expired
|
Medium
|
Unassigned |
Bug Description
When jujud is killed, it is restarted. When mongod is killed, it stays dead.
Since mongod is crucial to jujud, it should presumably have the same lifecycle guarantees as jujud. Since juju installs mongo, it could ensure this.
$ juju bootstrap aws/us-west-2
Creating Juju controller "aws-us-west-2" on aws/us-west-2
Looking for packaged Juju agent version 2.1.2 for amd64
Launching controller instance(s) on aws/us-west-2...
- i-03326174eaf9f2b7f (arch=amd64 mem=4G cores=2)
Fetching Juju GUI 2.4.4
Waiting for address
Attempting to connect to 34.208.16.131:22
Attempting to connect to 172.31.42.112:22
Logging to /var/log/
Running apt-get update
Running apt-get upgrade
Installing curl, cpu-checker, bridge-utils, cloud-utils, tmux
Fetching Juju agent version 2.1.2 for amd64
Installing Juju machine agent
Starting Juju machine agent (service jujud-machine-0)
Bootstrap agent now started
Contacting Juju controller at 172.31.42.112 to verify accessibility...
Bootstrap complete, "aws-us-west-2" controller now available.
Controller machines are in the "controller" model.
Initial model "default" added.
$ juju ssh -m controller 0
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-66-generic x86_64)
* Documentation: https:/
* Management: https:/
* Support: https:/
Get cloud support with Ubuntu Advantage Cloud Guest:
http://
0 packages can be updated.
0 updates are security updates.
*** System restart required ***
$ pgrep jujud
7503
$ sudo pkill jujud
$ pgrep jujud
7924
$ sudo pkill mongod
$ pgrep mongod
Changed in juju: | |
status: | Triaged → Incomplete |
Well... interesting.
Both of the services are set up the same. The difference is in the handling of SIGTERM (15). pkill sends SIGTERM by default. Juju returns non-zero, but mongo shuts down nicely and returns 0.
Both are set to restart on-failure in order to actually allow admins to shut them down.
If you use 'sudo pkill mongod -9' you will see it restart.