diff options
Diffstat (limited to 'buildscripts/resmokelib/testing/hooks/tenant_migration.py')
-rw-r--r-- | buildscripts/resmokelib/testing/hooks/tenant_migration.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/buildscripts/resmokelib/testing/hooks/tenant_migration.py b/buildscripts/resmokelib/testing/hooks/tenant_migration.py index 0ec5d69897b..19d527418dc 100644 --- a/buildscripts/resmokelib/testing/hooks/tenant_migration.py +++ b/buildscripts/resmokelib/testing/hooks/tenant_migration.py @@ -372,7 +372,7 @@ class _TenantMigrationThread(threading.Thread): self.logger) def _create_client(self, node): - return fixture_interface.authenticate(node.mongo_client(), self._auth_options) + return fixture_interface.build_client(node, self._auth_options) def _check_tenant_migration_dbhash(self, migration_opts): # Set the donor connection string, recipient connection string, and migration uuid string @@ -474,7 +474,7 @@ class _TenantMigrationThread(threading.Thread): res = donor_primary_client.admin.command( cmd_obj, bson.codec_options.CodecOptions(uuid_representation=bson.binary.UUID_SUBTYPE)) - except (pymongo.errors.AutoReconnect, pymongo.errors.NotMasterError): + except (pymongo.errors.AutoReconnect, pymongo.errors.NotPrimaryError): donor_primary = migration_opts.get_donor_primary() self.logger.info( "Retrying tenant migration '%s' against donor primary on port %d of replica " + @@ -522,7 +522,7 @@ class _TenantMigrationThread(threading.Thread): cmd_obj, bson.codec_options.CodecOptions(uuid_representation=bson.binary.UUID_SUBTYPE)) return - except (pymongo.errors.AutoReconnect, pymongo.errors.NotMasterError): + except (pymongo.errors.AutoReconnect, pymongo.errors.NotPrimaryError): donor_primary = migration_opts.get_donor_primary() self.logger.info( "Retrying forgetting tenant migration '%s' against donor primary on port %d of " @@ -566,8 +566,8 @@ class _TenantMigrationThread(threading.Thread): }) if res["n"] == 0: break - except (pymongo.errors.AutoReconnect, pymongo.errors.NotMasterError): - # Ignore NotMasterErrors because it's possible to fail with + except (pymongo.errors.AutoReconnect, pymongo.errors.NotPrimaryError): + # Ignore NotPrimaryErrors because it's possible to fail with # InterruptedDueToReplStateChange if the donor primary steps down or shuts # down during the garbage collection check. self.logger.info( @@ -594,8 +594,8 @@ class _TenantMigrationThread(threading.Thread): }) if res["n"] == 0: break - except (pymongo.errors.AutoReconnect, pymongo.errors.NotMasterError): - # Ignore NotMasterErrors because it's possible to fail with + except (pymongo.errors.AutoReconnect, pymongo.errors.NotPrimaryError): + # Ignore NotPrimaryErrors because it's possible to fail with # InterruptedDueToReplStateChange if the recipient primary steps down or # shuts down during the garbage collection check. self.logger.info( @@ -629,7 +629,7 @@ class _TenantMigrationThread(threading.Thread): {"_id": bson.Binary(migration_opts.migration_id.bytes, 4)}) if doc is not None: return - except (pymongo.errors.AutoReconnect, pymongo.errors.NotMasterError): + except (pymongo.errors.AutoReconnect, pymongo.errors.NotPrimaryError): donor_primary = migration_opts.get_donor_primary() self.logger.info( "Retrying waiting for donor primary on port '%d' of replica set '%s' for " + @@ -664,7 +664,7 @@ class _TenantMigrationThread(threading.Thread): return # We retry on all write concern errors because we assume the only reason waiting for # write concern should fail is because of a failover. - except (pymongo.errors.AutoReconnect, pymongo.errors.NotMasterError, + except (pymongo.errors.AutoReconnect, pymongo.errors.NotPrimaryError, pymongo.errors.WriteConcernError) as err: primary = get_primary(rs, self.logger) self.logger.info( |