iterate on all members and check if any has joined the replica

def is_replicaset_initialized(self):
        """
        iterate on all members and check if any has joined the replica
        """

        # it's possible isMaster returns an "incomplete" result if we
        # query a replica set member while it's loading the replica set config
        # https://jira.mongodb.org/browse/SERVER-13458
        # let's try to detect this state before proceeding
        # seems like if the "secondary" field is present, but "setName" isn't,
        # it's a good indicator that we just need to wait a bit
        # add an uptime check in for good measure

        for member in self.get_members():
            server = member.get_server()

            if server.has_joined_replica():
                return True

        return False