Skip to content

[PBM-1224] add ClusterMembers(), AgentStatuses() and OpLocks() to SDK #381

[PBM-1224] add ClusterMembers(), AgentStatuses() and OpLocks() to SDK

[PBM-1224] add ClusterMembers(), AgentStatuses() and OpLocks() to SDK #381

GitHub Actions / JUnit Test Report failed Aug 2, 2024 in 0s

20 tests run, 17 passed, 2 skipped, 1 failed.

Annotations

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: Cannot start restore, another operation running
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fa71463db50>

    @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 0x7fa71463db50>, name = '2024-08-02T11:14:06Z'
kwargs = {'check_pbm_status': True, 'restart_cluster': True}
client = MongoClient(host=['mongos:27017'], document_class=dict, tz_aware=False, connect=True)
result = {'$clusterTime': {'clusterTime': Timestamp(1722597274, 3), 'signature': {'hash': b'\xa9\x96\x94\x8d\xec58\xfb\xe8c\x84\x13)Er\xafz\xe0a{', 'keyId': 7398498681130844185}}, 'ok': 1.0, 'operationTime': Timestamp(1722597274, 3)}
n = <testinfra.host.Host docker://rscfg01>, timeout = 1722597335.0939827

    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"
E               AssertionError: Cannot start restore, another operation running

cluster.py:434: AssertionError