10gen / mongo-orchestration

Apache License 2.0
7 stars 11 forks source link

Use process.terminate instead of the shutdown command #248

Closed ShaneHarvey closed 6 years ago

ShaneHarvey commented 6 years ago

The shutdown command is frequently failing on 4.0.0 and causing mongo-orchestartion to hang forever because of a broken pipe:

2018-07-06T15:40:49.663-0700 I COMMAND  [conn85] command admin.$cmd command: shutdown { shutdown: 1, force: true, $readPreference: { mode: "secondaryPreferred" }, $db: "admin" } numYields:0 ok:0 errMsg:"While waiting for secondaries to catch up before stepping down, this node decided to step down for other reasons" errName:PrimarySteppedDown errCode:189 reslen:346 locks:{ Global: { acquireCount: { r: 2, W: 2 } } } protocol:op_query 10003ms
--
2018-07-06T15:40:49.663-0700 I NETWORK  [conn67] end connection 127.0.0.1:58177 (3 connections now open)
2018-07-06T15:40:49.663-0700 I NETWORK  [conn40] end connection 127.0.0.1:57842 (2 connections now open)
2018-07-06T15:40:49.663-0700 I NETWORK  [conn23] end connection 127.0.0.1:57623 (1 connection now open)
2018-07-06T15:40:49.664-0700 I NETWORK  [conn85] Error sending response to client: SocketException: Broken pipe. Ending connection from 127.0.0.1:58988 (connection id: 85)
2018-07-06T15:40:49.664-0700 I NETWORK  [conn85] end connection 127.0.0.1:58988 (0 connections now open)
2018-07-06T15:40:49.668-0700 I NETWORK  [listener] connection accepted from 127.0.0.1:59045 #86 (1 connection now open)

Let's just kill the process instead.