PBM-CUSTOM #27
GitHub Actions / JUnit Test Report
failed
Dec 19, 2023 in 0s
1 tests run, 0 passed, 0 skipped, 1 failed.
Annotations
Check failure on line 62 in pbm-functional/pytest/test_replicaset.py
github-actions / JUnit Test Report
test_replicaset.test_physical
AssertionError: Timeout for restore exceeded
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f7954854a90>
@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:62:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cluster.Cluster object at 0x7f7954854a90>, name = '2023-12-19T15:22:13Z'
kwargs = {'check_pbm_status': True, 'restart_cluster': True}
result = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f79549d5ad0>, exit_status=124, command=b'ti...........................................................................................................", _stderr=b'')
n = <testinfra.host.Host docker://rs101>, timeout = 1702999400.907856
host = 'rs103', container = <Container: 78ed3df7c526>
get_logs = ExecResult(exit_code=0, output=b'{"t":{"$date":"2023-12-19T15:22:57.401+00:00"},"s":"I", "c":"CONTROL", "id":23285, ...msg":" Frame: {frame}","attr":{"frame":{"a":"7FFB74FDCE73","b":"7FFB74FA3000","o":"39E73","s":"clone","s+":"43"}}}\n')
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")
result = n.run('timeout 240 pbm restore ' + name + ' --wait')
if result.rc == 124:
# try to catch possible failures if timeout exceeded
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))
Cluster.log(get_logs.output.decode('utf-8'))
except docker.errors.APIError:
pass
> assert False, "Timeout for restore exceeded"
E AssertionError: Timeout for restore exceeded
cluster.py:446: AssertionError
Loading