Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-14576

mongod automatic shutdown on stdin close

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Admin
    • Fully Compatible
    • Server 2.7.6, Platforms 12 (04/01/16), Platforms 13 (04/22/16)

      Some OEM-style applications/systems need to control a mongod instance, including controlling its lifecycle. As part of that, the parent system needs a means of ensuring that if the parent process dies, the mongod instance also terminates. This includes the case of an unclean shutdown of the parent process.

      A proposal for handling this is for the child process (mongod) receives a custom stdin from the parent process. If this stdin (the pipe/file descriptor) gets closed (which will happen when the parent process shuts down, cleanly or uncleanly), the child process will also exit.

      The benefit of this approach is that it ensures that mongod will shutdown properly regardless of the parent process’s ability to do so. It also makes it much easier to script mongod's shutdown, as it does not require its parent process to be in a valid state (only to die).

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            jantje.daniel Ian Daniel
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: