Explanation: The administrator should perform a rolling upgrade, applying the patch to the secondary members first, followed by the primary member, to accomplish the task of patching a MongoDB server cluster within an NDB environment. A rolling upgrade is a method of applying patches or updates to a cluster without downtime or interruption of service. The administrator can use the NDB patching feature to perform a rolling upgrade on a MongoDB server cluster, which consists of a primary member and one or more secondary members that form a replica set. The NDB patching feature allows the administrator to select the software profile version, the database parameters profile, and the network profile for the patching operation. The NDB patching feature also automates the steps of the rolling upgrade, such as:
- Step 1: The administrator initiates the patching operation on the NDB instance, and selects the MongoDB server cluster to be patched.
- Step 2: The NDB instance verifies the prerequisites and compatibility of the patching operation, and creates a pre-patch snapshot of the MongoDB server cluster.
- Step 3: The NDB instance applies the patch to the first secondary member of the MongoDB server cluster, and waits for the patching to complete successfully.
- Step 4: The NDB instance verifies the status and functionality of the patched secondary member, and repeats the patching process for the remaining secondary members of the MongoDB server cluster, one at a time.
- Step 5: The NDB instance performs a failover of the primary member to one of the patched secondary members, and applies the patch to the original primary member.
- Step 6: The NDB instance verifies the status and functionality of the patched primary member, and performs a failback of the primary member to the original primary member, if desired.
- Step 7: The NDB instance creates a post-patch snapshot of the MongoDB server cluster, and completes the patching operation.
Performing a rolling upgrade, applying the patch to the secondary members first, followed by the primary member, is the recommended and best practice method of patching a MongoDB server cluster within an NDB environment, as it ensures the high availability, consistency, and performance of the MongoDB server cluster and the databases.
Performing a rolling upgrade, applying the patch to the primary member first, followed by the secondary members, is not a valid or feasible method of patching a MongoDB server cluster within an NDB environment, as it would cause downtime, data loss, and inconsistency of the MongoDB server cluster and the databases. Applying the patch to the primary member first would disrupt the replication and synchronization of the MongoDB server cluster, and would require manual intervention and recovery steps to restore the MongoDB server cluster to a functional state.
Applying the patch to all nodes at once is not a valid or feasible method of patching a MongoDB server cluster within an NDB environment, as it would cause downtime, data loss, and inconsistency of the MongoDB server cluster and the databases. Applying the patch to all nodes at once would require shutting down the entire MongoDB server cluster, and would expose the MongoDB server cluster and the databases to potential errors, failures, and corruption during the patching process.
Disabling the replica set while patching is not a valid or feasible method of patching a MongoDB server cluster within an NDB environment, as it would cause downtime, data loss, and inconsistency of the MongoDB server cluster and the databases. Disabling the replica set while patching would break the replication and synchronization of the MongoDB server cluster, and would require manual intervention and recovery steps to re-enable the replica set and restore the MongoDB server cluster to a functional state.
References:
- Nutanix Database Management & Automation Training Course, Module 5: Nutanix Era Operations, Lesson 5.1: Nutanix Era Operations, slides 11-12, 15-16.
- Nutanix Database Management & Automation Training Course, Module 5: Nutanix Era Operations, Lesson 5.3: Nutanix Era Patching, slides 5-9.
- Nutanix Database Management & Automation Training Course, Module 5: Nutanix Era Operations, Lesson 5.4: Nutanix Era Patching Lab, slides 5-10.
- Nutanix Database Management & Automation Training Course, Module 7: Nutanix Era Troubleshooting, Lesson 7.1: Nutanix Era Troubleshooting, slide 6.