When the shutdown command is run against the primary of a replica set, it first tries to step down. The shutdown command takes a 'timeoutSecs' argument to control how long it waits for secondaries to catch up after it has blocked new writes before it aborts the stepdown and shutdown attempt. This argument, however, defaults to 0, so unless a majority of secondaries are fully caught up to the primary at the moment that the shutdown command is issued then it will fail - which if there are a steady stream of writes happening will likely always be the case. The replSetStepDown command has similar behavior, but its equivalent argument - 'secondaryCatchUpPeriodSecs' - defaults to 10 seconds. We should change shutdown to match the behavior of stepdown so that it's actually possible to use the default behavior to shut down a primary while it is taking writes.