Skip to content

PBM-397: warn about parallel agent for the same node #486

PBM-397: warn about parallel agent for the same node

PBM-397: warn about parallel agent for the same node #486

GitHub Actions / JUnit Test Report failed Sep 23, 2024 in 0s

20 tests run, 3 passed, 3 skipped, 14 failed.

Annotations

Check failure on line 50 in psmdb-testing/pbm-functional/pytest/test_PBM-1058.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_PBM-1058.test_physical_PBM_T205

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fe2dcb7d490>

    @pytest.mark.timeout(300,func_only=True)
    def test_physical_PBM_T205(start_cluster,cluster):
        cluster.check_pbm_status()
        pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
        backup=cluster.make_backup("physical")
        result=pymongo.MongoClient(cluster.connection)["test"]["test"].delete_many({})
        assert int(result.deleted_count) == len(documents)
>       cluster.make_restore(backup,restart_cluster=True, check_pbm_status=True)

test_PBM-1058.py:50: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cluster.py:475: in make_restore
    self.make_resync()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7fe2dcb7d490>

    def make_resync(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm config --force-resync --out json')
        parsed_result = json.loads(result)
        Cluster.log('Started resync: ' + result)
        timeout = time.time() + 30
        while True:
            logs = self.__find_event_msg("resync", "succeed")
            if logs:
                break
            if time.time() > timeout:
>               assert False
E               AssertionError

cluster.py:368: AssertionError

Check failure on line 57 in psmdb-testing/pbm-functional/pytest/test_PBM-1171.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_PBM-1171.test_physical_mixed_env_PBM_T248

AssertionError: Unexpected exit code 7 for CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fe2dc955310>, exit_status=7, command=b'supervisorctl restart pbm-agent', _stdout=b'pbm-agent: stopped\npbm-agent: ERROR (spawn error)\n', _stderr=b'')
assert 7 == 0
 +  where 7 = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fe2dc955310>, exit_status=7, command=b'supervisorctl restart pbm-agent', _stdout=b'pbm-agent: stopped\npbm-agent: ERROR (spawn error)\n', _stderr=b'').rc
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fe2dc9926d0>

    @pytest.mark.timeout(600,func_only=True)
    def test_physical_mixed_env_PBM_T248(start_cluster,cluster):
        cluster.check_pbm_status()
        pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
    
        #primary cfgsrv - CE, else - PSMDB, backup should pass
>       Cluster.psmdb_to_ce("rscfg01")

test_PBM-1171.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

host = 'rscfg01'

    @staticmethod
    def psmdb_to_ce(host):
        n=testinfra.get_host("docker://" + host)
        state=n.check_output("mongo --quiet --eval 'db.hello().secondary'")
        Cluster.log("Is mongodb on " + host + " secondary? - " + state)
        n.check_output('supervisorctl stop mongod')
        n.check_output('supervisorctl start mongod-ce')
        Cluster.log("Node " + host + " is now running mongodb CE")
>       n.check_output('supervisorctl restart pbm-agent')
E       AssertionError: Unexpected exit code 7 for CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fe2dc955310>, exit_status=7, command=b'supervisorctl restart pbm-agent', _stdout=b'pbm-agent: stopped\npbm-agent: ERROR (spawn error)\n', _stderr=b'')
E       assert 7 == 0
E        +  where 7 = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fe2dc955310>, exit_status=7, command=b'supervisorctl restart pbm-agent', _stdout=b'pbm-agent: stopped\npbm-agent: ERROR (spawn error)\n', _stderr=b'').rc

cluster.py:950: AssertionError

Check failure on line 93 in psmdb-testing/pbm-functional/pytest/test_PBM-1228.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_PBM-1228.test_pitr_PBM_T256[base-physical]

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fe2dc7d9850>
backup_type = 'physical', base_snapshot = 'base'

    @pytest.mark.timeout(900,func_only=True)
    @pytest.mark.parametrize('backup_type',['logical','physical'])
    @pytest.mark.parametrize('base_snapshot',['base','profile'])
    def test_pitr_PBM_T256(start_cluster,cluster,backup_type,base_snapshot):
        def insert_docs():
            client=pymongo.MongoClient(cluster.connection)
            for i in range(1500):
                client['test']['test'].insert_one({"doc":i})
                time.sleep(0.1)
    
        cluster.check_pbm_status()
        base_backup=cluster.make_backup(backup_type)
        cluster.enable_pitr(pitr_extra_args="--set pitr.oplogSpanMin=0.5")
        Cluster.log("Start inserting docs in the background")
        background_insert = threading.Thread(target=insert_docs)
        background_insert.start()
        time.sleep(60)
        Cluster.log("Check if PITR is running")
        if not cluster.check_pitr():
            logs=cluster.exec_pbm_cli("logs -sD -t0")
            assert False, logs.stdout
        Cluster.log("Setup filesystem profile")
        profile=cluster.exec_pbm_cli("profile add filesystem /etc/pbm-fs-profile.conf --wait")
        assert profile.rc==0, profile.stderr
        assert "OK" in profile.stdout, profile.stdout
        Cluster.log(profile.stdout)
        Cluster.log("Perform backup on fs profile")
        fs_backup=cluster.make_backup(backup_type + " --profile filesystem")
        Cluster.log("Check if the backup actually was created on the filesystem storage")
        assert os.path.isdir("/backups/" + fs_backup)
        assert os.path.isfile("/backups/" + fs_backup + ".pbm.json")
        time.sleep(60)
        background_insert.join()
        time.sleep(30)
        assert pymongo.MongoClient(cluster.connection)["test"]["test"].count_documents({}) == 1500
        pitr = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S")
        Cluster.log("Time for PITR is " + pitr)
        time.sleep(60)
        cluster.disable_pitr()
        pymongo.MongoClient(cluster.connection).drop_database('test')
        if base_snapshot == 'base':
            backup="--time=" + pitr + " --base-snapshot=" + base_backup
        else:
            backup="--time=" + pitr + " --base-snapshot=" + fs_backup
        Cluster.log("Attempt to PITR restore with the backup on the " + base_snapshot + " storage")
        if backup_type == 'logical':
            cluster.make_restore(backup, check_pbm_status=True)
        else:
>           cluster.make_restore(backup, restart_cluster=True, check_pbm_status=True)

test_PBM-1228.py:93: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cluster.py:475: in make_restore
    self.make_resync()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7fe2dc7d9850>

    def make_resync(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm config --force-resync --out json')
        parsed_result = json.loads(result)
        Cluster.log('Started resync: ' + result)
        timeout = time.time() + 30
        while True:
            logs = self.__find_event_msg("resync", "succeed")
            if logs:
                break
            if time.time() > timeout:
>               assert False
E               AssertionError

cluster.py:368: AssertionError

Check failure on line 93 in psmdb-testing/pbm-functional/pytest/test_PBM-1228.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_PBM-1228.test_pitr_PBM_T256[profile-physical]

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fe2dc7d9850>
backup_type = 'physical', base_snapshot = 'profile'

    @pytest.mark.timeout(900,func_only=True)
    @pytest.mark.parametrize('backup_type',['logical','physical'])
    @pytest.mark.parametrize('base_snapshot',['base','profile'])
    def test_pitr_PBM_T256(start_cluster,cluster,backup_type,base_snapshot):
        def insert_docs():
            client=pymongo.MongoClient(cluster.connection)
            for i in range(1500):
                client['test']['test'].insert_one({"doc":i})
                time.sleep(0.1)
    
        cluster.check_pbm_status()
        base_backup=cluster.make_backup(backup_type)
        cluster.enable_pitr(pitr_extra_args="--set pitr.oplogSpanMin=0.5")
        Cluster.log("Start inserting docs in the background")
        background_insert = threading.Thread(target=insert_docs)
        background_insert.start()
        time.sleep(60)
        Cluster.log("Check if PITR is running")
        if not cluster.check_pitr():
            logs=cluster.exec_pbm_cli("logs -sD -t0")
            assert False, logs.stdout
        Cluster.log("Setup filesystem profile")
        profile=cluster.exec_pbm_cli("profile add filesystem /etc/pbm-fs-profile.conf --wait")
        assert profile.rc==0, profile.stderr
        assert "OK" in profile.stdout, profile.stdout
        Cluster.log(profile.stdout)
        Cluster.log("Perform backup on fs profile")
        fs_backup=cluster.make_backup(backup_type + " --profile filesystem")
        Cluster.log("Check if the backup actually was created on the filesystem storage")
        assert os.path.isdir("/backups/" + fs_backup)
        assert os.path.isfile("/backups/" + fs_backup + ".pbm.json")
        time.sleep(60)
        background_insert.join()
        time.sleep(30)
        assert pymongo.MongoClient(cluster.connection)["test"]["test"].count_documents({}) == 1500
        pitr = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S")
        Cluster.log("Time for PITR is " + pitr)
        time.sleep(60)
        cluster.disable_pitr()
        pymongo.MongoClient(cluster.connection).drop_database('test')
        if base_snapshot == 'base':
            backup="--time=" + pitr + " --base-snapshot=" + base_backup
        else:
            backup="--time=" + pitr + " --base-snapshot=" + fs_backup
        Cluster.log("Attempt to PITR restore with the backup on the " + base_snapshot + " storage")
        if backup_type == 'logical':
            cluster.make_restore(backup, check_pbm_status=True)
        else:
>           cluster.make_restore(backup, restart_cluster=True, check_pbm_status=True)

test_PBM-1228.py:93: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cluster.py:475: in make_restore
    self.make_resync()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7fe2dc7d9850>

    def make_resync(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm config --force-resync --out json')
        parsed_result = json.loads(result)
        Cluster.log('Started resync: ' + result)
        timeout = time.time() + 30
        while True:
            logs = self.__find_event_msg("resync", "succeed")
            if logs:
                break
            if time.time() > timeout:
>               assert False
E               AssertionError

cluster.py:368: AssertionError

Check failure on line 112 in psmdb-testing/pbm-functional/pytest/test_azurite.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_azurite.test_physical

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fe2dc92c210>

    @pytest.mark.timeout(300, func_only=True)
    def test_physical(start_cluster, cluster):
        cluster.check_pbm_status()
        pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
        backup = cluster.make_backup("physical")
        result = pymongo.MongoClient(cluster.connection)["test"]["test"].delete_many({})
        assert int(result.deleted_count) == len(documents)
>       cluster.make_restore(backup, restart_cluster=True,check_pbm_status=True)

test_azurite.py:112: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cluster.py:475: in make_restore
    self.make_resync()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7fe2dc92c210>

    def make_resync(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm config --force-resync --out json')
        parsed_result = json.loads(result)
        Cluster.log('Started resync: ' + result)
        timeout = time.time() + 30
        while True:
            logs = self.__find_event_msg("resync", "succeed")
            if logs:
                break
            if time.time() > timeout:
>               assert False
E               AssertionError

cluster.py:368: AssertionError

Check failure on line 45 in psmdb-testing/pbm-functional/pytest/test_directoryperdb.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_directoryperdb.test_physical

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fe2dc82afd0>

    @pytest.mark.timeout(300,func_only=True)
    def test_physical(start_cluster,cluster):
        cluster.check_pbm_status()
        pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
        backup=cluster.make_backup("physical")
        result=pymongo.MongoClient(cluster.connection)["test"]["test"].delete_many({})
        assert int(result.deleted_count) == len(documents)
>       cluster.make_restore(backup,restart_cluster=True, check_pbm_status=True)

test_directoryperdb.py:45: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cluster.py:475: in make_restore
    self.make_resync()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7fe2dc82afd0>

    def make_resync(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm config --force-resync --out json')
        parsed_result = json.loads(result)
        Cluster.log('Started resync: ' + result)
        timeout = time.time() + 30
        while True:
            logs = self.__find_event_msg("resync", "succeed")
            if logs:
                break
            if time.time() > timeout:
>               assert False
E               AssertionError

cluster.py:368: AssertionError

Check failure on line 45 in psmdb-testing/pbm-functional/pytest/test_encryption.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_encryption.test_physical

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fe2dc93db50>

    @pytest.mark.timeout(300,func_only=True)
    def test_physical(start_cluster,cluster):
        cluster.check_pbm_status()
        pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
        backup=cluster.make_backup("physical")
        result=pymongo.MongoClient(cluster.connection)["test"]["test"].delete_many({})
        assert int(result.deleted_count) == len(documents)
>       cluster.make_restore(backup,restart_cluster=True, check_pbm_status=True)

test_encryption.py:45: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cluster.py:475: in make_restore
    self.make_resync()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7fe2dc93db50>

    def make_resync(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm config --force-resync --out json')
        parsed_result = json.loads(result)
        Cluster.log('Started resync: ' + result)
        timeout = time.time() + 30
        while True:
            logs = self.__find_event_msg("resync", "succeed")
            if logs:
                break
            if time.time() > timeout:
>               assert False
E               AssertionError

cluster.py:368: AssertionError

Check failure on line 89 in psmdb-testing/pbm-functional/pytest/test_fresh_sharded.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_fresh_sharded.test_physical_PBM_T207

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fe2dc908210>
newcluster = <cluster.Cluster object at 0x7fe2dc90ad50>

    @pytest.mark.timeout(600,func_only=True)
    def test_physical_PBM_T207(start_cluster,cluster,newcluster):
        cluster.check_pbm_status()
        pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
        backup=cluster.make_backup("physical")
        cluster.destroy()
    
        newcluster.make_resync()
>       newcluster.make_restore(backup,restart_cluster=True, check_pbm_status=True)

test_fresh_sharded.py:89: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cluster.py:475: in make_restore
    self.make_resync()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7fe2dc90ad50>

    def make_resync(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm config --force-resync --out json')
        parsed_result = json.loads(result)
        Cluster.log('Started resync: ' + result)
        timeout = time.time() + 30
        while True:
            logs = self.__find_event_msg("resync", "succeed")
            if logs:
                break
            if time.time() > timeout:
>               assert False
E               AssertionError

cluster.py:368: AssertionError

Check failure on line 45 in psmdb-testing/pbm-functional/pytest/test_kmip.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_kmip.test_physical_PBM_T197

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fe2dc105710>

    @pytest.mark.timeout(300,func_only=True)
    def test_physical_PBM_T197(start_cluster,cluster):
        cluster.check_pbm_status()
        pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
        backup=cluster.make_backup("physical")
        result=pymongo.MongoClient(cluster.connection)["test"]["test"].delete_many({})
        assert int(result.deleted_count) == len(documents)
>       cluster.make_restore(backup,restart_cluster=True, check_pbm_status=True)

test_kmip.py:45: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cluster.py:475: in make_restore
    self.make_resync()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7fe2dc105710>

    def make_resync(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm config --force-resync --out json')
        parsed_result = json.loads(result)
        Cluster.log('Started resync: ' + result)
        timeout = time.time() + 30
        while True:
            logs = self.__find_event_msg("resync", "succeed")
            if logs:
                break
            if time.time() > timeout:
>               assert False
E               AssertionError

cluster.py:368: AssertionError

Check failure on line 89 in psmdb-testing/pbm-functional/pytest/test_remap_sharded.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_remap_sharded.test_physical_PBM_T242

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fe2dc109310>
newcluster = <cluster.Cluster object at 0x7fe2dc108ad0>

    @pytest.mark.timeout(600,func_only=True)
    def test_physical_PBM_T242(start_cluster,cluster,newcluster):
        cluster.check_pbm_status()
        pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
        backup=cluster.make_backup("physical")
        backup = backup + ' --replset-remapping="newrs1=rs1,newrs2=rs2,newrscfg=rscfg"'
        cluster.destroy()
    
        newcluster.make_resync()
>       newcluster.make_restore(backup,restart_cluster=True, check_pbm_status=True)

test_remap_sharded.py:89: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cluster.py:475: in make_restore
    self.make_resync()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7fe2dc108ad0>

    def make_resync(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm config --force-resync --out json')
        parsed_result = json.loads(result)
        Cluster.log('Started resync: ' + result)
        timeout = time.time() + 30
        while True:
            logs = self.__find_event_msg("resync", "succeed")
            if logs:
                break
            if time.time() > timeout:
>               assert False
E               AssertionError

cluster.py:368: AssertionError

Check failure on line 68 in psmdb-testing/pbm-functional/pytest/test_replicaset.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_replicaset.test_physical

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fe2dc99a890>

    @pytest.mark.timeout(300,func_only=True)
    def test_physical(start_cluster,cluster):
        cluster.check_pbm_status()
        pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
        backup=cluster.make_backup("physical")
        result=pymongo.MongoClient(cluster.connection)["test"]["test"].delete_many({})
        assert int(result.deleted_count) == len(documents)
>       cluster.make_restore(backup,restart_cluster=True, check_pbm_status=True)

test_replicaset.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cluster.py:475: in make_restore
    self.make_resync()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7fe2dc99a890>

    def make_resync(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm config --force-resync --out json')
        parsed_result = json.loads(result)
        Cluster.log('Started resync: ' + result)
        timeout = time.time() + 30
        while True:
            logs = self.__find_event_msg("resync", "succeed")
            if logs:
                break
            if time.time() > timeout:
>               assert False
E               AssertionError

cluster.py:368: AssertionError

Check failure on line 111 in psmdb-testing/pbm-functional/pytest/test_sharded.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_sharded.test_physical

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fe2dc1066d0>

    @pytest.mark.timeout(600,func_only=True)
    def test_physical(start_cluster,cluster):
        cluster.check_pbm_status()
        pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
        backup=cluster.make_backup("physical")
        result=pymongo.MongoClient(cluster.connection)["test"]["test"].delete_many({})
        assert int(result.deleted_count) == len(documents)
>       cluster.make_restore(backup,restart_cluster=True, check_pbm_status=True)

test_sharded.py:111: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cluster.py:475: in make_restore
    self.make_resync()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7fe2dc1066d0>

    def make_resync(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm config --force-resync --out json')
        parsed_result = json.loads(result)
        Cluster.log('Started resync: ' + result)
        timeout = time.time() + 30
        while True:
            logs = self.__find_event_msg("resync", "succeed")
            if logs:
                break
            if time.time() > timeout:
>               assert False
E               AssertionError

cluster.py:368: AssertionError

Check failure on line 133 in psmdb-testing/pbm-functional/pytest/test_sharded.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_sharded.test_physical_pitr_PBM_T244

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fe2dc1066d0>

    @pytest.mark.timeout(600, func_only=True)
    def test_physical_pitr_PBM_T244(start_cluster,cluster):
        cluster.check_pbm_status()
        cluster.make_backup("logical")
        cluster.enable_pitr(pitr_extra_args="--set pitr.oplogSpanMin=0.5")
        pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
        backup=cluster.make_backup("physical")
        time.sleep(30)
        pymongo.MongoClient(cluster.connection)["test"]["test2"].insert_many(documents)
        pymongo.MongoClient(cluster.connection)["test"]["test3"].insert_many(documents)
        time.sleep(30)
        pitr = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S")
        backup="--time=" + pitr + " --base-snapshot=" + backup
        Cluster.log("Time for PITR is: " + pitr)
        time.sleep(60)
        cluster.disable_pitr()
        time.sleep(10)
>       cluster.make_restore(backup,restart_cluster=True,check_pbm_status=True)

test_sharded.py:133: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cluster.py:475: in make_restore
    self.make_resync()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7fe2dc1066d0>

    def make_resync(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm config --force-resync --out json')
        parsed_result = json.loads(result)
        Cluster.log('Started resync: ' + result)
        timeout = time.time() + 30
        while True:
            logs = self.__find_event_msg("resync", "succeed")
            if logs:
                break
            if time.time() > timeout:
>               assert False
E               AssertionError

cluster.py:368: AssertionError

Check failure on line 72 in psmdb-testing/pbm-functional/pytest/test_upgrade.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_upgrade.test_physical

AssertionError: Starting restore 2024-09-23T19:44:27.67688236Z from '2024-09-23T19:43:59Z'........................................................................................................................Error: no confirmation that restore has successfully started. Replsets status:
<no replset has started restore>
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fe2dc901850>

    @pytest.mark.timeout(600,func_only=True)
    def test_physical(start_cluster,cluster):
        cluster.check_pbm_status()
        pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
        backup=cluster.make_backup("physical")
        result=pymongo.MongoClient(cluster.connection)["test"]["test"].delete_many({})
        assert int(result.deleted_count) == len(documents)
        cluster.upgrade()
        cluster.check_pbm_status()
>       cluster.make_restore(backup,restart_cluster=True, check_pbm_status=True)

test_upgrade.py:72: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7fe2dc901850>, name = '2024-09-23T19:43:59Z'
kwargs = {'check_pbm_status': True, 'restart_cluster': True}
client = MongoClient(host=['mongos:27017'], document_class=dict, tz_aware=False, connect=True)
result = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fe2dc955310>, exit_status=1, command=b'time...'Error: no confirmation that restore has successfully started. Replsets status:\n<no replset has started restore>\n\n')
n = <testinfra.host.Host docker://rscfg01>, timeout = 240, error = ''
host = 'rscfg03', container = <Container: ebdc9f1259fd>

    def make_restore(self, name, **kwargs):
        if self.layout == "sharded":
            client = pymongo.MongoClient(self.connection)
            result = client.admin.command("balancerStop")
            client.close()
            Cluster.log("Stopping balancer: " + str(result))
            self.stop_mongos()
        self.stop_arbiters()
        n = testinfra.get_host("docker://" + self.pbm_cli)
        timeout = time.time() + 60
    
        while True:
            if not self.get_status()['running']:
                break
            if time.time() > timeout:
                assert False, "Cannot start restore, another operation running"
            time.sleep(1)
        Cluster.log("Restore started")
        timeout=kwargs.get('timeout', 240)
        result = n.run('timeout ' + str(timeout) + ' pbm restore ' + name + ' --wait')
    
        if result.rc == 0:
            Cluster.log(result.stdout)
        else:
            # try to catch possible failures if timeout exceeded
            error=''
            for host in self.mongod_hosts:
                try:
                    container = docker.from_env().containers.get(host)
                    get_logs = container.exec_run(
                        'cat /var/lib/mongo/pbm.restore.log', stderr=False)
                    if get_logs.exit_code == 0:
                        Cluster.log(
                            "!!!!Possible failure on {}, file pbm.restore.log was found:".format(host))
                        logs = get_logs.output.decode('utf-8')
                        Cluster.log(logs)
                        if '"s":"F"' in logs:
                            error = logs
                except docker.errors.APIError:
                    pass
            if error:
                assert False, result.stdout + result.stderr + "\n" + error
            else:
>               assert False, result.stdout + result.stderr
E               AssertionError: Starting restore 2024-09-23T19:44:27.67688236Z from '2024-09-23T19:43:59Z'........................................................................................................................Error: no confirmation that restore has successfully started. Replsets status:
E               <no replset has started restore>

cluster.py:464: AssertionError