Skip to content

[PBM-1171] support mixed env in pre-check validation #641

[PBM-1171] support mixed env in pre-check validation

[PBM-1171] support mixed env in pre-check validation #641

This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / JUnit Test Report failed Sep 14, 2023 in 0s

5 tests run, 1 passed, 0 skipped, 4 failed.

Annotations

Check failure on line 114 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_external

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

    @pytest.mark.testcase(test_case_key="T238", test_step_key=1)
    @pytest.mark.timeout(600,func_only=True)
    def test_external(start_cluster,cluster,newcluster):
>       cluster.check_pbm_status()

test_fresh_sharded.py:114: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f4baebae910>

    def check_pbm_status(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm status --out=json')
        parsed_result = json.loads(result)
        Cluster.log("PBM status: \n" + str(parsed_result['cluster']))
        #Cluster.log(json.dumps(parsed_result['cluster'], indent=4))
        hosts = []
        for replicaset in parsed_result['cluster']:
            for host in replicaset['nodes']:
                if host['role'] != "A":
                    hosts.append(host)
                    assert host['ok'] == True
>       assert len(hosts) == len(self.pbm_hosts)
E       AssertionError

cluster.py:715: AssertionError

Check failure on line 159 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_external_meta

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

    @pytest.mark.testcase(test_case_key="T236", test_step_key=1)
    @pytest.mark.timeout(600,func_only=True)
    def test_external_meta(start_cluster,cluster):
>       cluster.check_pbm_status()

test_sharded.py:159: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f4baecc4dd0>

    def check_pbm_status(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm status --out=json')
        parsed_result = json.loads(result)
        Cluster.log("PBM status: \n" + str(parsed_result['cluster']))
        #Cluster.log(json.dumps(parsed_result['cluster'], indent=4))
        hosts = []
        for replicaset in parsed_result['cluster']:
            for host in replicaset['nodes']:
                if host['role'] != "A":
                    hosts.append(host)
                    assert host['ok'] == True
>       assert len(hosts) == len(self.pbm_hosts)
E       AssertionError

cluster.py:715: AssertionError

Check failure on line 177 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_external_nometa

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

    @pytest.mark.testcase(test_case_key="T237", test_step_key=1)
    @pytest.mark.timeout(600,func_only=True)
    def test_external_nometa(start_cluster,cluster):
>       cluster.check_pbm_status()

test_sharded.py:177: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f4baecc4dd0>

    def check_pbm_status(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm status --out=json')
        parsed_result = json.loads(result)
        Cluster.log("PBM status: \n" + str(parsed_result['cluster']))
        #Cluster.log(json.dumps(parsed_result['cluster'], indent=4))
        hosts = []
        for replicaset in parsed_result['cluster']:
            for host in replicaset['nodes']:
                if host['role'] != "A":
                    hosts.append(host)
                    assert host['ok'] == True
>       assert len(hosts) == len(self.pbm_hosts)
E       AssertionError

cluster.py:715: AssertionError

Check failure on line 77 in psmdb-testing/pbm-functional/pytest/test_vault.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_vault.test_external

AssertionError: Unexpected exit code 1 for CommandResult(command=b'pbm restore --external', exit_status=1, stdout=None, stderr=b'Error: another operation in progress, Snapshot backup/6502aad0bbe2993b24d6eb72 [rs1/rs103:27017]\n')
assert 1 == 0
 +  where 1 = CommandResult(command=b'pbm restore --external', exit_status=1, stdout=None, stderr=b'Error: another operation in progress, Snapshot backup/6502aad0bbe2993b24d6eb72 [rs1/rs103:27017]\n').rc
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f4baec44f10>

    @pytest.mark.testcase(test_case_key="T239", test_step_key=1)
    @pytest.mark.timeout(600,func_only=True)
    def test_external(start_cluster,cluster):
        cluster.check_pbm_status()
        pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
        backup = cluster.external_backup_start()
        result=pymongo.MongoClient(cluster.connection)["test"]["test"].delete_many({})
        assert int(result.deleted_count) == len(documents)
        cluster.external_backup_copy(backup)
        cluster.external_backup_finish(backup)
        time.sleep(10)
    
>       restore=cluster.external_restore_start()

test_vault.py:77: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f4baec44f10>

    def external_restore_start(self):
        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)
>       result = n.check_output("pbm restore --external")
E       AssertionError: Unexpected exit code 1 for CommandResult(command=b'pbm restore --external', exit_status=1, stdout=None, stderr=b'Error: another operation in progress, Snapshot backup/6502aad0bbe2993b24d6eb72 [rs1/rs103:27017]\n')
E       assert 1 == 0
E        +  where 1 = CommandResult(command=b'pbm restore --external', exit_status=1, stdout=None, stderr=b'Error: another operation in progress, Snapshot backup/6502aad0bbe2993b24d6eb72 [rs1/rs103:27017]\n').rc

cluster.py:853: AssertionError