Fame Shock Report
general /

Upgrading MongoDB to version 2.6 - Documentation for BMC Remedy with Smart IT 1.2

 The installer upgrades MongoDB only if MongoDB is running on the BMC MyIT server. If you are running MongoDB on another server, including on a high availability replica set, you must follow this procedure to upgrade MongoDB to version 2.6.

If you are running MongoDB with authentication, you must also update the authorization model. MongoDB 2.6 includes significant changes to the authorization model, which require changes to the way that MongoDB stores users’ credentials. As a result, in addition to upgrading MongoDB processes, if your deployment uses authentication and authorization, after upgrading all MongoDB process to 2.6, you must also upgrade the authorization model. Although the user authentication and access control continue to work as it did in 2.4, you cannot create or modify users or use user-defined roles until you update the authorization model. For more information about the authorization model changes, see .

Before you begin

Download the latest MongoDB version 2.6 binaries from .

Note

To download version 2.6, you must select Previous Releases, and then select the 2.6.x version.

To upgrade a standalone MongoDB instance

  1. Shut down the mongod instance.
  2. Replace the current binary with the MongoDB version 2.6 binary.
  3. Restart mongod.

To upgrade a MongoDB replica set

  1. Upgrade the secondary members of the replica set on at a time, by performing the following steps for each secondary member:
    1. Shut down the mongod instance.
    2. Replace the current binary with the MongoDB version 2.6 binary.
    3. Restart mongod.
    4. Wait for the member to recover to Secondary state before you upgrade the next member.
      To check the member’s state, in the mongo shell, issue the command rs.status().
  2. Step down the replica set primary instance by issuing the following command in the mongo shell: rs.stepDown().
    The step down command forces the primary set to failover to a secondary member. This procedure is preferable to shutting down the primary directly.
  3. Upgrade the primary instance by performing the following steps:
    1. In the mongo shell, issue the command rs.status(). When the status shows that the primary has stepped down and another member has the Primary state, you can continue.
    2. Shut down the previous primary mongod instance.
    3. Replace the current binary with the MongoDB version 2.6 binary.
  4. Restart mongod on the previous primary instance.
    Replica set failover is not instant but will render the set unavailable to write data until the failover process completes. Typically the failover process takes 30 seconds or more.

To update the authorization model

For a replica set, run the upgrade process on the primary instance, as the changes will automatically replicate to the secondary members.

Before you start this procedure, upgrade MongoDB to version 2.6 and make sure that you have a user in the admin database with the role userAdminAnyDatabase.

  1. From the mongo shell, connect and authenticate to the mongod instance for a single deployment as an admin database user with the role userAdminAnyDatabase with the following command:
    $./mongo –u <admin> -p <password> --authenticationDatabase admin
  2. Run the authentication update with the following command:

    db.getSiblingDB("admin").runCommand(

    {authSchemaUpgrade: 1}

    );
    If you receive an error message, you can rerun this command.