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

Powercycle doesn't handle node transitioning from STARTUP to REMOVED state

    • Server Tooling & Methods
    • ALL
    • 46

      The mongod process will close its connections when it transitions from STARTUP to REMOVED. Powercycle must either be prepared to retry the commands it runs up until it finishes reconfiguring the replica set on pymongo.errors.AutoReconnect exceptions, or it should change to reconfigure the replica set by first brining the node up as a stand-alone mongod.

      mongo = pymongo.MongoClient(**mongo_client_opts)
      LOGGER.info("Server buildinfo: %s", mongo.admin.command("buildinfo"))
      LOGGER.info("Server serverStatus: %s", mongo.admin.command("serverStatus"))
      if options.repl_set:
          ret = mongo_reconfig_replication(mongo, host_port, options.repl_set)
      
      # TODO: Rework reconfig logic as follows:
      # 1. Start up mongod in standalone
      # 2. Delete the config doc
      # 3. Stop mongod
      # 4. Start mongod
      # When reconfiguring the replica set, due to a switch in ports
      # it can only be done using force=True, as the node will not come up as Primary.
      # The side affect of using force=True are large jumps in the config
      # version, which after many reconfigs may exceed the 'int' value.
      

            Assignee:
            backlog-server-stm Backlog - Server Tooling and Methods (STM) (Inactive)
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: