diff --git a/sdcm/utils/replication_strategy_utils.py b/sdcm/utils/replication_strategy_utils.py index f398568501..a463e69045 100644 --- a/sdcm/utils/replication_strategy_utils.py +++ b/sdcm/utils/replication_strategy_utils.py @@ -180,8 +180,12 @@ def _get_keyspaces_to_decrease_rf(self, session) -> list: continue # Skip keyspace using SimpleStrategy if 'NetworkTopologyStrategy' in replication['class']: - rf = int(replication.get(self.datacenter)) - if rf == self.original_nodes_number: + rf = replication.get(self.datacenter) + if rf is None: + LOGGER.warning( + f"Datacenter {self.datacenter} not found in replication strategy for keyspace {keyspace_name}.") + continue + if int(rf) == self.original_nodes_number: matching_keyspaces.append(keyspace_name) else: LOGGER.warning("Unexpected replication strategy found: %s", replication['class'])