[SERVER-1589] Add Windows Service support to mongos.exe Created: 07/Aug/10  Updated: 15/Aug/12  Resolved: 27/Feb/12

Status: Closed
Project: Core Server
Component/s: Usability
Affects Version/s: 1.6.0
Fix Version/s: 2.1.1

Type: Improvement Priority: Major - P3
Reporter: Justin Dearing Assignee: Tad Marshall
Resolution: Done Votes: 17
Labels: Windows, rn
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows Only


Issue Links:
Duplicate
is duplicated by SERVER-5145 Call printCommandLineOpts in mongos Closed
Related
related to DOCS-223 Windows Service Reference Pages and T... Closed
related to DOCS-155 Create Windows Installation Tutorial Closed
related to SERVER-2903 Need to create separate service insta... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

I expect to be implementing this myself, but anyone may feel free to beat me to the punch.

Mongos.exe runs on windows, but is not configured to installitself and run as a service. This renders production use impractical on windows.

util\ntservice.cpp is pretty generalized so only some minor tweaking there and some refactoring to move functionality in db.cpp to cmdline.cpp asn will allow this to happen.

Justin



 Comments   
Comment by auto [ 04/Mar/12 ]

Author:

{u'login': u'tadmarshall', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-1589 fix style error

Newline in wrong place in else clause, thanks Mathias!
Branch: master
https://github.com/mongodb/mongo/commit/704e3a06258f32837879d952e732a206745e3d87

Comment by auto [ 27/Feb/12 ]

Author:

{u'login': u'tadmarshall', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-1589 add Windows Service support to mongos.exe

Make mongos use the ntservice.cpp code already used by mongod to
install a Windows service and to run as one. Change some text and
move the definitions of default strings so the code can be shared.
Restructure startup code in mongos slightly to separate command line
parsing from runtime validation of the operating environment. Log
operational states well in both mongod and mongos so that it is
clear from the logs when the programs are running as services. Fix
awful attempt at converting 8-bit text into 16-bit Unicode that was
sign-extending characters in the range of 0x80 to 0xFF. Log the
startup parameters in mongos that way that mongod does it, but don't
log actual servicePassword strings in either program. Disallow the
--upgrade flag from being used with service installation or
operation in mongos and make this a general facility that can be used
to disallow any option in either program. Add some comments to help
future coders understand how this service business works in the
code. Make the mongos startup code and output more similar to
mongod to make maintenance easier and the user experience better.
Disambiguate the flavors of exceptions we trap in mongos.
Branch: master
https://github.com/mongodb/mongo/commit/76427cd8a7f21210e0b41b0382ce05e05f092245

Comment by Rasitha Wijesinghe [ 29/Sep/11 ]

When can we expect this feature to be released?

Comment by auto [ 20/Aug/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: Refactoring of Windows Service related code in preperation for SERVER-1589.

All ntservice related code moved from db.cpp to ntservices.cpp and cmdline.cpp. The code was also consolidated.

Conflicts:

db/db.cpp
http://github.com/mongodb/mongo/commit/37ae0dbd3ff2e8cff2d913ef11243c5e63413e31

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