MongoDB Replica Set Upgrade Issues - "system.replset.newlyAdded" field isn't getting automatically removed

I have a PSA setup (mongod v5.0.3) running on EC2 r5a series instances. My goal is to migrate these servers to Amazon Graviton instances (r6g) and Upgrade to mongod v6.0.3.

P - r5a - mongod v5.0.3
S - r5a - mongod v5.0.3
A - t3 - mongod v5.0.3

Step1:

  • Installed mongod v6.0.3 in a new r6g instance and added it to the replica set.
  • Initial sync completed and state changed to SECONDARY.
  • In the logs of Primary, we can see
    Beginning automatic reconfig to remove ‘newlyAdded’ config field
    Removed ‘newlyAdded’ config field
  • A query on “local.system.replset” collection shows no “newlyAdded” field on this server

Step2:

  • Installed mongod v6.0.3 in another new r6g instance and added it to the replica set.
  • Initial sync completed and state changed to SECONDARY.
  • In the logs of Primary, we can see
    Beginning automatic reconfig to remove ‘newlyAdded’ config field
    Beginning automatic reconfig to remove ‘newlyAdded’ config field
  • A query on “local.system.replset” collection shows “newlyAdded” field on this server. And it isn’t getting removed.

This server is foretnver stuck in “Beginning automatic reconfig to remove ‘newlyAdded’ config field”.

Server is in SECONDARY state but newlyAdded field isn’t getting removed.

Because of this I’m unable to remove old servers
P - r5a - mongod v5.0.3
S - r5a - mongod v5.0.3

Any leads and suggestions are much appreciated.

cc: @Kushagra_Kesav

#ops-admin:replication