PSMDB-1574 migrate to ubi9 #212
GitHub Actions / JUnit Test Report
failed
Dec 18, 2024 in 0s
24 tests run, 21 passed, 0 skipped, 3 failed.
Annotations
Check failure on line 57 in pbm-functional/pytest/test_PBM-1171.py
github-actions / JUnit Test Report
test_PBM-1171.test_physical_mixed_env_PBM_T248
AssertionError: Unexpected exit code 1 for CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fb2d451c490>, exit_status=1, command=b'supervisorctl start mongod-ce', _stdout=b'mongod-ce: ERROR (no such file)\n', _stderr=b'')
assert 1 == 0
+ where 1 = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fb2d451c490>, exit_status=1, command=b'supervisorctl start mongod-ce', _stdout=b'mongod-ce: ERROR (no such file)\n', _stderr=b'').rc
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fb2d463e450>
@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')
E AssertionError: Unexpected exit code 1 for CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fb2d451c490>, exit_status=1, command=b'supervisorctl start mongod-ce', _stdout=b'mongod-ce: ERROR (no such file)\n', _stderr=b'')
E assert 1 == 0
E + where 1 = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fb2d451c490>, exit_status=1, command=b'supervisorctl start mongod-ce', _stdout=b'mongod-ce: ERROR (no such file)\n', _stderr=b'').rc
cluster.py:982: AssertionError
Check failure on line 49 in pbm-functional/pytest/test_PBM-1171.py
github-actions / JUnit Test Report
test_PBM-1171.test_physical_mixed_env_PBM_T248
failed on teardown with "AssertionError: Unexpected exit code 1 for CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fb2d451c490>, exit_status=1, command=b'pbm config --set pitr.enabled=false --out json', _stdout=b'{"Error":"connect to mongodb: create mongo connection: ping: server selection error: server selection timeout, current topology: { Type: Unknown, Servers: [{ Addr: 127.0.0.1:27017, Type: Unknown, Last error: dial tcp 127.0.0.1:27017: connect: connection refused }, ] }"}\n', _stderr=b'')
assert 1 == 0
+ where 1 = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fb2d451c490>, exit_status=1, command=b'pbm ...0.0.1:27017, Type: Unknown, Last error: dial tcp 127.0.0.1:27017: connect: connection refused }, ] }"}\n', _stderr=b'').rc"
Raw output
cluster = <cluster.Cluster object at 0x7fb2d463e450>
request = <SubRequest 'start_cluster' for <Function test_physical_mixed_env_PBM_T248>>
@pytest.fixture(scope="function")
def start_cluster(cluster,request):
try:
cluster.destroy()
os.chmod("/backups",0o777)
os.system("rm -rf /backups/*")
cluster.create()
cluster.setup_pbm()
client=pymongo.MongoClient(cluster.connection)
client.admin.command("enableSharding", "test")
client.admin.command("shardCollection", "test.test", key={"_id": "hashed"})
yield True
finally:
if request.config.getoption("--verbose"):
cluster.get_logs()
> cluster.destroy(cleanup_backups=True)
test_PBM-1171.py:49:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cluster.py:497: in destroy
self.disable_pitr()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cluster.Cluster object at 0x7fb2d463e450>, time_param = None
def disable_pitr(self, time_param=None):
n = testinfra.get_host("docker://" + self.pbm_cli)
if time_param:
target_time = int(datetime.fromisoformat(time_param).timestamp())
pitr_end = 0
while pitr_end < target_time:
result = n.check_output("pbm s -s backups -o json")
backups = json.loads(result)
if 'backups' in backups and 'pitrChunks' in backups['backups'] and 'pitrChunks' in backups['backups']['pitrChunks']:
pitr_end_cur = backups['backups']['pitrChunks']['pitrChunks'][0].get('range', {}).get('end', None)
if pitr_end_cur is not None:
pitr_end = pitr_end_cur
if pitr_end < target_time:
time.sleep(1)
> result = n.check_output(
"pbm config --set pitr.enabled=false --out json")
E AssertionError: Unexpected exit code 1 for CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fb2d451c490>, exit_status=1, command=b'pbm config --set pitr.enabled=false --out json', _stdout=b'{"Error":"connect to mongodb: create mongo connection: ping: server selection error: server selection timeout, current topology: { Type: Unknown, Servers: [{ Addr: 127.0.0.1:27017, Type: Unknown, Last error: dial tcp 127.0.0.1:27017: connect: connection refused }, ] }"}\n', _stderr=b'')
E assert 1 == 0
E + where 1 = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fb2d451c490>, exit_status=1, command=b'pbm ...0.0.1:27017, Type: Unknown, Last error: dial tcp 127.0.0.1:27017: connect: connection refused }, ] }"}\n', _stderr=b'').rc
cluster.py:587: AssertionError
Check failure on line 31 in pbm-functional/pytest/test_PBM-1211.py
github-actions / JUnit Test Report
test_PBM-1211.test_pitr_PBM_T268[physical]
failed on setup with "AssertionError: Unexpected exit code 1 for CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fb2d451cad0>, exit_status=1, command=b'mongo --quiet --eval \'db.getSiblingDB("admin").createUser({ user: "root", pwd: "root", roles: [ "root", "userAdminAnyDatabase", "clusterAdmin" ] });\'', _stdout=b'', _stderr=b'MongoServerError: Command createUser requires authentication\n')
assert 1 == 0
+ where 1 = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fb2d451cad0>, exit_status=1, command=b'mong...base", "clusterAdmin" ] });\'', _stdout=b'', _stderr=b'MongoServerError: Command createUser requires authentication\n').rc"
Raw output
cluster = <cluster.Cluster object at 0x7fb2d45d7710>
request = <SubRequest 'start_cluster' for <Function test_pitr_PBM_T268[physical]>>
@pytest.fixture(scope="function")
def start_cluster(cluster,request):
try:
cluster.destroy()
> cluster.create()
test_PBM-1211.py:31:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cluster.py:341: in create
Cluster.setup_authorization(self.config['mongos'],self.pbm_mongodb_uri)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
host = 'mongos', uri = 'mongodb://pbm:pbmpass@127.0.0.1:27017/?authSource=admin'
@staticmethod
def setup_authorization(host,uri):
primary = testinfra.get_host("docker://" + host)
Cluster.wait_for_primary(host, "mongodb://127.0.0.1:27017")
Cluster.log("Setup authorization on " + host)
Cluster.log("Adding root user on " + host)
init_root_user = '\'db.getSiblingDB("admin").createUser({ user: "root", pwd: "root", roles: [ "root", "userAdminAnyDatabase", "clusterAdmin" ] });\''
> logs = primary.check_output("mongo --quiet --eval " + init_root_user)
E AssertionError: Unexpected exit code 1 for CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fb2d451cad0>, exit_status=1, command=b'mongo --quiet --eval \'db.getSiblingDB("admin").createUser({ user: "root", pwd: "root", roles: [ "root", "userAdminAnyDatabase", "clusterAdmin" ] });\'', _stdout=b'', _stderr=b'MongoServerError: Command createUser requires authentication\n')
E assert 1 == 0
E + where 1 = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fb2d451cad0>, exit_status=1, command=b'mong...base", "clusterAdmin" ] });\'', _stdout=b'', _stderr=b'MongoServerError: Command createUser requires authentication\n').rc
cluster.py:631: AssertionError
Loading