PSMDB-1574 migrate to ubi9 #213
24 tests run, 20 passed, 0 skipped, 4 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 0x7fcf1e2418d0>, 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 0x7fcf1e2418d0>, 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 0x7fcf1e2503d0>
@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 0x7fcf1e2418d0>, 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 0x7fcf1e2418d0>, 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 0x7fcf1e2418d0>, 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 0x7fcf1e2418d0>, 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 0x7fcf1e2503d0>
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 0x7fcf1e2503d0>, 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 0x7fcf1e2418d0>, 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 0x7fcf1e2418d0>, 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 0x7fcf1e25ced0>, 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 0x7fcf1e25ced0>, 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 0x7fcf1e65a490>
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:[email protected]: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 0x7fcf1e25ced0>, 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 0x7fcf1e25ced0>, exit_status=1, command=b'mong...base", "clusterAdmin" ] });\'', _stdout=b'', _stderr=b'MongoServerError: Command createUser requires authentication\n').rc
cluster.py:631: AssertionError
Check failure on line 123 in pbm-functional/pytest/test_PBM-1355.py
github-actions / JUnit Test Report
test_PBM-1355.test_remap_PBM_T265[physical]
AssertionError: Unexpected exit code 1 for CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fcf1e4e51d0>, exit_status=1, command=b'pbm config --force-resync --out json', _stdout=b'{"error":"another operation in progress","operation":{"node":"newrscfg01:27017","opid":"67642abec5733279e25025c5","replset":"newrscfg","type":"resync"}}\n', _stderr=b'')
assert 1 == 0
+ where 1 = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fcf1e4e51d0>, exit_status=1, command=b'pbm ...n":{"node":"newrscfg01:27017","opid":"67642abec5733279e25025c5","replset":"newrscfg","type":"resync"}}\n', _stderr=b'').rc
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7fcf1e25e410>
newcluster = <cluster.Cluster object at 0x7fcf1e25cb50>
backup_type = 'physical'
@pytest.mark.timeout(900,func_only=True)
@pytest.mark.parametrize('backup_type',['logical','physical'])
def test_remap_PBM_T265(start_cluster,cluster,newcluster,backup_type):
cluster.check_pbm_status()
client=pymongo.MongoClient(cluster.connection)
for i in range(600):
client['test']['test'].insert_one({"doc":i})
backup=cluster.make_backup(backup_type)
backup = backup + ' --replset-remapping="newrs1=rs1,newrscfg=rscfg"'
cluster.destroy()
newcluster.create()
client=pymongo.MongoClient(newcluster.connection)
Cluster.log(client.admin.command({'transitionFromDedicatedConfigServer': 1}))
newcluster.setup_pbm()
result = newcluster.exec_pbm_cli("config --set storage.type=filesystem --set storage.filesystem.path=/backups --set backup.compression=none")
assert result.rc == 0
> newcluster.make_resync()
test_PBM-1355.py:123:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cluster.Cluster object at 0x7fcf1e25cb50>
def make_resync(self):
n = testinfra.get_host("docker://" + self.pbm_cli)
> result = n.check_output('pbm config --force-resync --out json')
E AssertionError: Unexpected exit code 1 for CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fcf1e4e51d0>, exit_status=1, command=b'pbm config --force-resync --out json', _stdout=b'{"error":"another operation in progress","operation":{"node":"newrscfg01:27017","opid":"67642abec5733279e25025c5","replset":"newrscfg","type":"resync"}}\n', _stderr=b'')
E assert 1 == 0
E + where 1 = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7fcf1e4e51d0>, exit_status=1, command=b'pbm ...n":{"node":"newrscfg01:27017","opid":"67642abec5733279e25025c5","replset":"newrscfg","type":"resync"}}\n', _stderr=b'').rc
cluster.py:362: AssertionError