PBM-1057 check PITR on PSA infrastructure #156
GitHub Actions / JUnit Test Report
failed
Aug 26, 2024 in 0s
29 tests run, 19 passed, 8 skipped, 2 failed.
Annotations
Check failure on line 88 in pbm-functional/pytest/test_PBM-1090.py
github-actions / JUnit Test Report
test_PBM-1090.test_logical_PBM_T204
AssertionError: Backup failed{"Error":"get backup metadata: get: context deadline exceeded"}
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f4f24f79290>
@pytest.mark.timeout(300,func_only=True)
def test_logical_PBM_T204(start_cluster,cluster):
cluster.check_pbm_status()
client = pymongo.MongoClient(cluster.connection)
db = client.test
collection = db.test
Cluster.log("Create collection, unique index and insert data")
collection.insert_one({"a": 1, "b": 1, "c": 1})
collection.create_index([("a",1),("b",1),("c",1)], name='test_index', unique = True)
res = pymongo.MongoClient(cluster.connection)["test"]["test"].find({})
Cluster.log('Collection:')
for r in res:
Cluster.log(r)
def upsert_1():
Cluster.log("Starting background upsert 1")
while upsert:
query = {"a": 1}
update = {"$set": {"a": 1, "b": 1, "c": 1}}
pymongo.MongoClient(cluster.connection)['test']['test'].delete_one(query)
try:
doc = pymongo.MongoClient(cluster.connection)['test']['test'].find_one_and_update(query,update,upsert=True,return_document=pymongo.collection.ReturnDocument.AFTER)
#Cluster.log(doc)
except pymongo.errors.DuplicateKeyError:
pass
Cluster.log("Stopping background upsert 1")
def upsert_2():
Cluster.log("Starting background upsert 2")
while upsert:
query = {"b": 1}
update = {"$set": {"a": 2, "b": 1, "c": 1}}
pymongo.MongoClient(cluster.connection)['test']['test'].delete_one(query)
try:
doc = pymongo.MongoClient(cluster.connection)['test']['test'].find_one_and_update(query,update,upsert=True,return_document=pymongo.collection.ReturnDocument.AFTER)
#Cluster.log(doc)
except pymongo.errors.DuplicateKeyError:
pass
Cluster.log("Stopping background upsert 2")
upsert=True
t1 = threading.Thread(target=upsert_1)
t2 = threading.Thread(target=upsert_2)
t1.start()
t2.start()
> backup = cluster.make_backup("logical")
test_PBM-1090.py:88:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cluster.Cluster object at 0x7f4f24f79290>, type = 'logical'
def make_backup(self, type):
n = testinfra.get_host("docker://" + self.pbm_cli)
timeout = time.time() + 120
while True:
running = self.get_status()['running']
Cluster.log("Current operation: " + str(running))
if not running:
if type:
start = n.run(
'pbm backup --out=json --type=' + type)
else:
start = n.run('pbm backup --out=json')
if start.rc == 0:
name = json.loads(start.stdout)['name']
Cluster.log("Backup started")
break
elif "resync" in start.stdout:
Cluster.log("Resync in progress, retrying: " + start.stdout)
else:
> assert False, "Backup failed" + start.stdout + start.stderr
E AssertionError: Backup failed{"Error":"get backup metadata: get: context deadline exceeded"}
cluster.py:392: AssertionError
Check failure on line 92 in pbm-functional/pytest/test_PBM-979.py
github-actions / JUnit Test Report
test_PBM-979.test_logical_pitr_PBM_T263
AssertionError: {'conf': True, 'run': False, 'nodes': None, 'error': '2024-08-26T13:50:03.000+0000 E [rs1/rs101:27017] [pitr] reconciling ready status: timeout while roconciling ready status'}
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f4f22c7a150>
@pytest.mark.timeout(600,func_only=True)
def test_logical_pitr_PBM_T263(start_cluster,cluster):
time.sleep(5) # wait for delayed node
cluster.check_pbm_status()
pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
backup=cluster.make_backup("logical")
#check if the backup was taken from the hidden node
logs=cluster.exec_pbm_cli("logs -n rs1/rs103:27017 -e backup -o json").stdout
assert backup in logs
Cluster.log("Logs from hidden node:\n" + logs)
> cluster.enable_pitr(pitr_extra_args="--set pitr.oplogSpanMin=0.5")
test_PBM-979.py:92:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cluster.Cluster object at 0x7f4f22c7a150>
kwargs = {'pitr_extra_args': '--set pitr.oplogSpanMin=0.5'}
n = <testinfra.host.Host docker://rs101>
pitr_extra_args = '--set pitr.oplogSpanMin=0.5'
result = '[{"key":"pitr.compression","value":"none"},{"key":"pitr.oplogSpanMin","value":"0.5"},{"key":"pitr.enabled","value":"true"}]'
timeout = 1724680203.8136313
status = {'conf': True, 'error': '2024-08-26T13:50:03.000+0000 E [rs1/rs101:27017] [pitr] reconciling ready status: timeout while roconciling ready status', 'nodes': None, 'run': False}
def enable_pitr(self,**kwargs):
n = testinfra.get_host("docker://" + self.pbm_cli)
pitr_extra_args = kwargs.get('pitr_extra_args', "")
result = n.check_output(
"pbm config --set pitr.enabled=true --set pitr.compression=none --out json " + pitr_extra_args)
Cluster.log("Enabling PITR: " + result)
timeout = time.time() + 150
while True:
if self.check_pitr():
break
if time.time() > timeout:
status=self.get_status()['pitr']
> assert False, status
E AssertionError: {'conf': True, 'run': False, 'nodes': None, 'error': '2024-08-26T13:50:03.000+0000 E [rs1/rs101:27017] [pitr] reconciling ready status: timeout while roconciling ready status'}
cluster.py:556: AssertionError
Loading