[SERVER-834] upstart script in Ubuntu package should exec start-stop-daemon Created: 26/Mar/10  Updated: 12/Jul/16  Resolved: 26/Mar/10

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 1.4.0
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Dan Peterson Assignee: Richard Kreuter (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 9.10 (karmic)


Participants:

 Description   

The upstart configuration placed by the mongodb-unstable package (and I would presume the others) calls start-stop-daemon without "exec." This leads to a situation where mongod's PID is not the one reported by "status mongodb" but the PID of the shell that ran start-stop-daemon.

Changing from

start-stop-daemon ...

to

exec start-stop-daemon ...

fixes the problem.



 Comments   
Comment by Richard Kreuter (Inactive) [ 26/Mar/10 ]

Fixed in master, backported to v1.4, v1.2. Thanks for the bug report!

Comment by auto [ 26/Mar/10 ]

Author:

{'login': '', 'name': 'Richard Kreuter', 'email': 'richard@10gen.com'}

Message: Backport to 1.2 of bdcd668. SERVER-834
http://github.com/mongodb/mongo/commit/fca1962ce402aac501512b780c81c52d2c0778da

Comment by auto [ 26/Mar/10 ]

Author:

{'login': '', 'name': 'Richard Kreuter', 'email': 'richard@10gen.com'}

Message: Backport to 1.4 of bdcd668. SERVER-834
http://github.com/mongodb/mongo/commit/b44262e4efc6ebb1d86d9ccab852fdcaea248912

Comment by Richard Kreuter (Inactive) [ 26/Mar/10 ]

Ash Berlin: start-stop-daemon is mostly for letting us run mongod as a non-root user. (I tried it with su for a while, but that turned out not to work well everywhere.)

Comment by auto [ 26/Mar/10 ]

Author:

{'login': '', 'name': 'Richard Kreuter', 'email': 'richard@10gen.com'}

Message: Add an 'exec' in upstart script. SERVER-834
http://github.com/mongodb/mongo/commit/bdcd6683e7400db0d695a80104431204ee6b362a

Comment by Ash Berlin [ 26/Mar/10 ]

From what I understand about upstart start-stop-daemon shouldn't be required at all - just exec mongod directly.

Generated at Thu Feb 08 02:55:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.