Skip to content

PBM-1474 - Swap AWS s3 v1 with v2 #1252

PBM-1474 - Swap AWS s3 v1 with v2

PBM-1474 - Swap AWS s3 v1 with v2 #1252

GitHub Actions / JUnit Test Report failed Feb 5, 2025 in 0s

16 tests run, 0 passed, 1 skipped, 15 failed.

Annotations

Check failure on line 82 in psmdb-testing/pbm-functional/pytest/test_PBM-1155.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_PBM-1155.test_incremental_base_PBM_T246

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f8ecf3db390>

    @pytest.mark.timeout(6000, func_only=True)
    def test_incremental_base_PBM_T246(start_cluster,cluster):
>       cluster.check_pbm_status()

test_PBM-1155.py:82: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f8ecf3db390>

    def check_pbm_status(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm status --out=json')
        parsed_result = json.loads(result)
        Cluster.log("PBM status: \n" + str(parsed_result['cluster']))
        #Cluster.log(json.dumps(parsed_result['cluster'], indent=4))
        hosts = []
        for replicaset in parsed_result['cluster']:
            for host in replicaset['nodes']:
                if host['role'] != "A":
                    hosts.append(host)
>                   assert host['ok'] == True
E                   AssertionError

cluster.py:762: AssertionError

Check failure on line 92 in psmdb-testing/pbm-functional/pytest/test_PBM-1155.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_PBM-1155.test_incremental_PBM_T245

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f8ecf3db390>

    @pytest.mark.timeout(6000, func_only=True)
    def test_incremental_PBM_T245(start_cluster,cluster):
>       cluster.check_pbm_status()

test_PBM-1155.py:92: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f8ecf3db390>

    def check_pbm_status(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm status --out=json')
        parsed_result = json.loads(result)
        Cluster.log("PBM status: \n" + str(parsed_result['cluster']))
        #Cluster.log(json.dumps(parsed_result['cluster'], indent=4))
        hosts = []
        for replicaset in parsed_result['cluster']:
            for host in replicaset['nodes']:
                if host['role'] != "A":
                    hosts.append(host)
>                   assert host['ok'] == True
E                   AssertionError

cluster.py:762: AssertionError

Check failure on line 87 in psmdb-testing/pbm-functional/pytest/test_PBM-1211.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_PBM-1211.test_incremental_PBM_T269

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f8ecf6f2f10>

    @pytest.mark.timeout(600,func_only=True)
    def test_incremental_PBM_T269(start_cluster,cluster):
>       cluster.check_pbm_status()

test_PBM-1211.py:87: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f8ecf6f2f10>

    def check_pbm_status(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm status --out=json')
        parsed_result = json.loads(result)
        Cluster.log("PBM status: \n" + str(parsed_result['cluster']))
        #Cluster.log(json.dumps(parsed_result['cluster'], indent=4))
        hosts = []
        for replicaset in parsed_result['cluster']:
            for host in replicaset['nodes']:
                if host['role'] != "A":
                    hosts.append(host)
>                   assert host['ok'] == True
E                   AssertionError

cluster.py:762: AssertionError

Check failure on line 142 in psmdb-testing/pbm-functional/pytest/test_PBM-979.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_PBM-979.test_incremental_PBM_T234

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f8ecfab5ed0>

    @pytest.mark.timeout(300,func_only=True)
    def test_incremental_PBM_T234(start_cluster,cluster):
        time.sleep(5)
>       cluster.check_pbm_status()

test_PBM-979.py:142: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f8ecfab5ed0>

    def check_pbm_status(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm status --out=json')
        parsed_result = json.loads(result)
        Cluster.log("PBM status: \n" + str(parsed_result['cluster']))
        #Cluster.log(json.dumps(parsed_result['cluster'], indent=4))
        hosts = []
        for replicaset in parsed_result['cluster']:
            for host in replicaset['nodes']:
                if host['role'] != "A":
                    hosts.append(host)
>                   assert host['ok'] == True
E                   AssertionError

cluster.py:762: AssertionError

Check failure on line 119 in psmdb-testing/pbm-functional/pytest/test_azurite.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_azurite.test_incremental

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f8ecf1b0a90>

    @pytest.mark.timeout(300, func_only=True)
    def test_incremental(start_cluster, cluster):
>       cluster.check_pbm_status()

test_azurite.py:119: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f8ecf1b0a90>

    def check_pbm_status(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm status --out=json')
        parsed_result = json.loads(result)
        Cluster.log("PBM status: \n" + str(parsed_result['cluster']))
        #Cluster.log(json.dumps(parsed_result['cluster'], indent=4))
        hosts = []
        for replicaset in parsed_result['cluster']:
            for host in replicaset['nodes']:
                if host['role'] != "A":
                    hosts.append(host)
>                   assert host['ok'] == True
E                   AssertionError

cluster.py:762: AssertionError

Check failure on line 51 in psmdb-testing/pbm-functional/pytest/test_directoryperdb.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_directoryperdb.test_incremental_PBM_T219

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f8ecf1917d0>

    @pytest.mark.timeout(300,func_only=True)
    def test_incremental_PBM_T219(start_cluster,cluster):
>       cluster.check_pbm_status()

test_directoryperdb.py:51: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f8ecf1917d0>

    def check_pbm_status(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm status --out=json')
        parsed_result = json.loads(result)
        Cluster.log("PBM status: \n" + str(parsed_result['cluster']))
        #Cluster.log(json.dumps(parsed_result['cluster'], indent=4))
        hosts = []
        for replicaset in parsed_result['cluster']:
            for host in replicaset['nodes']:
                if host['role'] != "A":
                    hosts.append(host)
>                   assert host['ok'] == True
E                   AssertionError

cluster.py:762: AssertionError

Check failure on line 51 in psmdb-testing/pbm-functional/pytest/test_encryption.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_encryption.test_incremental_PBM_T222

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f8ecf261a90>

    @pytest.mark.timeout(300,func_only=True)
    def test_incremental_PBM_T222(start_cluster,cluster):
>       cluster.check_pbm_status()

test_encryption.py:51: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f8ecf261a90>

    def check_pbm_status(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm status --out=json')
        parsed_result = json.loads(result)
        Cluster.log("PBM status: \n" + str(parsed_result['cluster']))
        #Cluster.log(json.dumps(parsed_result['cluster'], indent=4))
        hosts = []
        for replicaset in parsed_result['cluster']:
            for host in replicaset['nodes']:
                if host['role'] != "A":
                    hosts.append(host)
>                   assert host['ok'] == True
E                   AssertionError

cluster.py:762: AssertionError

Check failure on line 96 in psmdb-testing/pbm-functional/pytest/test_fresh_sharded.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_fresh_sharded.test_incremental_PBM_T209

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f8ecf3f7950>
newcluster = <cluster.Cluster object at 0x7f8ecf3f73d0>

    @pytest.mark.timeout(600,func_only=True)
    def test_incremental_PBM_T209(start_cluster,cluster,newcluster):
>       cluster.check_pbm_status()

test_fresh_sharded.py:96: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f8ecf3f7950>

    def check_pbm_status(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm status --out=json')
        parsed_result = json.loads(result)
        Cluster.log("PBM status: \n" + str(parsed_result['cluster']))
        #Cluster.log(json.dumps(parsed_result['cluster'], indent=4))
        hosts = []
        for replicaset in parsed_result['cluster']:
            for host in replicaset['nodes']:
                if host['role'] != "A":
                    hosts.append(host)
>                   assert host['ok'] == True
E                   AssertionError

cluster.py:762: AssertionError

Check failure on line 51 in psmdb-testing/pbm-functional/pytest/test_kmip.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_kmip.test_incremental_PBM_T201

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f8ecf260d10>

    @pytest.mark.timeout(300,func_only=True)
    def test_incremental_PBM_T201(start_cluster,cluster):
>       cluster.check_pbm_status()

test_kmip.py:51: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f8ecf260d10>

    def check_pbm_status(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm status --out=json')
        parsed_result = json.loads(result)
        Cluster.log("PBM status: \n" + str(parsed_result['cluster']))
        #Cluster.log(json.dumps(parsed_result['cluster'], indent=4))
        hosts = []
        for replicaset in parsed_result['cluster']:
            for host in replicaset['nodes']:
                if host['role'] != "A":
                    hosts.append(host)
>                   assert host['ok'] == True
E                   AssertionError

cluster.py:762: AssertionError

Check failure on line 95 in psmdb-testing/pbm-functional/pytest/test_remap_sharded.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_remap_sharded.test_incremental_PBM_T243

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f8ecf14f3d0>
newcluster = <cluster.Cluster object at 0x7f8ecf14dd50>

    @pytest.mark.timeout(600,func_only=True)
    def test_incremental_PBM_T243(start_cluster,cluster,newcluster):
>       cluster.check_pbm_status()

test_remap_sharded.py:95: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f8ecf14f3d0>

    def check_pbm_status(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm status --out=json')
        parsed_result = json.loads(result)
        Cluster.log("PBM status: \n" + str(parsed_result['cluster']))
        #Cluster.log(json.dumps(parsed_result['cluster'], indent=4))
        hosts = []
        for replicaset in parsed_result['cluster']:
            for host in replicaset['nodes']:
                if host['role'] != "A":
                    hosts.append(host)
>                   assert host['ok'] == True
E                   AssertionError

cluster.py:762: AssertionError

Check failure on line 136 in psmdb-testing/pbm-functional/pytest/test_replicaset.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_replicaset.test_incremental

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f8ecf27c590>

    @pytest.mark.timeout(300,func_only=True)
    def test_incremental(start_cluster,cluster):
>       cluster.check_pbm_status()

test_replicaset.py:136: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f8ecf27c590>

    def check_pbm_status(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm status --out=json')
        parsed_result = json.loads(result)
        Cluster.log("PBM status: \n" + str(parsed_result['cluster']))
        #Cluster.log(json.dumps(parsed_result['cluster'], indent=4))
        hosts = []
        for replicaset in parsed_result['cluster']:
            for host in replicaset['nodes']:
                if host['role'] != "A":
                    hosts.append(host)
>                   assert host['ok'] == True
E                   AssertionError

cluster.py:762: AssertionError

Check failure on line 203 in psmdb-testing/pbm-functional/pytest/test_sharded.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_sharded.test_incremental

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f8ecf141f90>

    @pytest.mark.timeout(300,func_only=True)
    def test_incremental(start_cluster,cluster):
>       cluster.check_pbm_status()

test_sharded.py:203: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f8ecf141f90>

    def check_pbm_status(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm status --out=json')
        parsed_result = json.loads(result)
        Cluster.log("PBM status: \n" + str(parsed_result['cluster']))
        #Cluster.log(json.dumps(parsed_result['cluster'], indent=4))
        hosts = []
        for replicaset in parsed_result['cluster']:
            for host in replicaset['nodes']:
                if host['role'] != "A":
                    hosts.append(host)
>                   assert host['ok'] == True
E                   AssertionError

cluster.py:762: AssertionError

Check failure on line 93 in psmdb-testing/pbm-functional/pytest/test_timeseries.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_timeseries.test_incremental_PBM_T262

AssertionError
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f8ecf38ec10>

    @pytest.mark.timeout(600,func_only=True)
    def test_incremental_PBM_T262(start_cluster,cluster):
>       cluster.check_pbm_status()

test_timeseries.py:93: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f8ecf38ec10>

    def check_pbm_status(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
        result = n.check_output('pbm status --out=json')
        parsed_result = json.loads(result)
        Cluster.log("PBM status: \n" + str(parsed_result['cluster']))
        #Cluster.log(json.dumps(parsed_result['cluster'], indent=4))
        hosts = []
        for replicaset in parsed_result['cluster']:
            for host in replicaset['nodes']:
                if host['role'] != "A":
                    hosts.append(host)
>                   assert host['ok'] == True
E                   AssertionError

cluster.py:762: AssertionError

Check failure on line 97 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_incremental_PBM_T277

AssertionError: Starting restore 2025-02-05T13:55:03.41644909Z from '2025-02-05T13:54:31Z'.panic: errors: *target must be interface or implement error
  
  goroutine 1 [running]:
  errors.As({0x13f90e0, 0xc0005069f0}, {0x11122e0, 0xc000012228})
  	/usr/local/go/src/errors/wrap.go:111 +0x206
  github.com/pkg/errors.As(...)
  	/percona-backup-mongodb/vendor/github.com/pkg/errors/go113.go:31
  github.com/percona/percona-backup-mongodb/pbm/errors.As(...)
  	/percona-backup-mongodb/pbm/errors/errors.go:33
  github.com/percona/percona-backup-mongodb/pbm/storage/s3.(*S3).FileStat(0xc000386c00, {0xc000370090, 0x2f})
  	/percona-backup-mongodb/pbm/storage/s3/s3.go:495 +0x691
  github.com/percona/percona-backup-mongodb/pbm/restore.GetPhysRestoreMeta({0xc000048620, 0x1d}, {0x1408e80, 0xc000386c00}, {0x1406600, 0xc000040e00})
  	/percona-backup-mongodb/pbm/restore/storage.go:21 +0x104
  main.doRestore.func1({0x14051b0, 0xc0002959d0}, {0x140b8f8, 0xc00031e930}, {0xc000048620, 0x1d})
  	/percona-backup-mongodb/cmd/pbm/restore.go:500 +0x15e
  main.waitForRestoreStatus({0x14051b0, 0xc0002959d0}, {0x140b8f8, 0xc00031e930}, {0xc000048620, 0x1d}, 0xc000549980)
  	/percona-backup-mongodb/cmd/pbm/restore.go:563 +0x21e
  main.doRestore({0x1405108, 0xc000305560}, {0x140b8f8, 0xc00031e930}, 0xc0001fc0c0, 0x0, 0x0, {0x0, 0x0, 0x0}, ...)
  	/percona-backup-mongodb/cmd/pbm/restore.go:506 +0xdc5
  main.runRestore({0x1405108, 0xc000305560}, {0x140b8f8, 0xc00031e930}, 0xc000384740, 0xc0001fc0c0, {0xc000393740, 0xd}, {0x11e306c, 0x4})
  	/percona-backup-mongodb/cmd/pbm/restore.go:162 +0xaf5
  main.(*pbmApp).buildRestoreCmd.func1(0x72799c3400000000?, {0xc0001e48a0?, 0x0?, 0x0?})
  	/percona-backup-mongodb/cmd/pbm/main.go:742 +0xa5
  main.(*pbmApp).buildRestoreCmd.(*pbmApp).wrapRunE.func2(0xc00016f000?, {0xc0001e48a0?, 0x4?, 0x11e316c?})
  	/percona-backup-mongodb/cmd/pbm/main.go:85 +0x33
  github.com/spf13/cobra.(*Command).execute(0xc000206308, {0xc0001e4880, 0x2, 0x2})
  	/percona-backup-mongodb/vendor/github.com/spf13/cobra/command.go:985 +0xaca
  github.com/spf13/cobra.(*Command).ExecuteC(0xc000170608)
  	/percona-backup-mongodb/vendor/github.com/spf13/cobra/command.go:1117 +0x3ff
  github.com/spf13/cobra.(*Command).Execute(...)
  	/percona-backup-mongodb/vendor/github.com/spf13/cobra/command.go:1041
  main.main()
  	/percona-backup-mongodb/cmd/pbm/main.go:76 +0x45
  
assert False
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f8ecf6f1b10>

    @pytest.mark.timeout(600,func_only=True)
    def test_incremental_PBM_T277(start_cluster,cluster):
        cluster.check_pbm_status()
        cluster.make_backup("incremental --base")
        pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
        backup = cluster.make_backup("incremental")
        result=pymongo.MongoClient(cluster.connection)["test"]["test"].delete_many({})
        assert int(result.deleted_count) == len(documents)
        cluster.upgrade()
        cluster.check_pbm_status()
        try:
>           cluster.make_restore(backup,restart_cluster=True, check_pbm_status=True)

test_upgrade.py:88: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f8ecf6f1b10>, name = '2025-02-05T13:54:31Z'
kwargs = {'check_pbm_status': True, 'restart_cluster': True}
client = MongoClient(host=['mongos:27017'], document_class=dict, tz_aware=False, connect=True)
result = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f8ed0b7fa50>, exit_status=2, command=b'time...godb/vendor/github.com/spf13/cobra/command.go:1041\nmain.main()\n\t/percona-backup-mongodb/cmd/pbm/main.go:76 +0x45\n')
n = <testinfra.host.Host docker://rscfg01>, timeout = 240, error = ''
host = 'rscfg03', container = <Container: 002066b54823>

    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")
        timeout=kwargs.get('timeout', 240)
        result = n.run('timeout ' + str(timeout) + ' pbm restore ' + name + ' --wait')
    
        if result.rc == 0:
            Cluster.log(result.stdout)
        else:
            # try to catch possible failures if timeout exceeded
            error=''
            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))
                        logs = get_logs.output.decode('utf-8')
                        Cluster.log(logs)
                        if '"s":"F"' in logs:
                            error = logs
                except docker.errors.APIError:
                    pass
            if error:
                assert False, result.stdout + result.stderr + "\n" + error
            else:
>               assert False, result.stdout + result.stderr
E               AssertionError: Starting restore 2025-02-05T13:55:03.41644909Z from '2025-02-05T13:54:31Z'.panic: errors: *target must be interface or implement error
E               
E               goroutine 1 [running]:
E               errors.As({0x13f90e0, 0xc0005069f0}, {0x11122e0, 0xc000012228})
E               	/usr/local/go/src/errors/wrap.go:111 +0x206
E               github.com/pkg/errors.As(...)
E               	/percona-backup-mongodb/vendor/github.com/pkg/errors/go113.go:31
E               github.com/percona/percona-backup-mongodb/pbm/errors.As(...)
E               	/percona-backup-mongodb/pbm/errors/errors.go:33
E               github.com/percona/percona-backup-mongodb/pbm/storage/s3.(*S3).FileStat(0xc000386c00, {0xc000370090, 0x2f})
E               	/percona-backup-mongodb/pbm/storage/s3/s3.go:495 +0x691
E               github.com/percona/percona-backup-mongodb/pbm/restore.GetPhysRestoreMeta({0xc000048620, 0x1d}, {0x1408e80, 0xc000386c00}, {0x1406600, 0xc000040e00})
E               	/percona-backup-mongodb/pbm/restore/storage.go:21 +0x104
E               main.doRestore.func1({0x14051b0, 0xc0002959d0}, {0x140b8f8, 0xc00031e930}, {0xc000048620, 0x1d})
E               	/percona-backup-mongodb/cmd/pbm/restore.go:500 +0x15e
E               main.waitForRestoreStatus({0x14051b0, 0xc0002959d0}, {0x140b8f8, 0xc00031e930}, {0xc000048620, 0x1d}, 0xc000549980)
E               	/percona-backup-mongodb/cmd/pbm/restore.go:563 +0x21e
E               main.doRestore({0x1405108, 0xc000305560}, {0x140b8f8, 0xc00031e930}, 0xc0001fc0c0, 0x0, 0x0, {0x0, 0x0, 0x0}, ...)
E               	/percona-backup-mongodb/cmd/pbm/restore.go:506 +0xdc5
E               main.runRestore({0x1405108, 0xc000305560}, {0x140b8f8, 0xc00031e930}, 0xc000384740, 0xc0001fc0c0, {0xc000393740, 0xd}, {0x11e306c, 0x4})
E               	/percona-backup-mongodb/cmd/pbm/restore.go:162 +0xaf5
E               main.(*pbmApp).buildRestoreCmd.func1(0x72799c3400000000?, {0xc0001e48a0?, 0x0?, 0x0?})
E               	/percona-backup-mongodb/cmd/pbm/main.go:742 +0xa5
E               main.(*pbmApp).buildRestoreCmd.(*pbmApp).wrapRunE.func2(0xc00016f000?, {0xc0001e48a0?, 0x4?, 0x11e316c?})
E               	/percona-backup-mongodb/cmd/pbm/main.go:85 +0x33
E               github.com/spf13/cobra.(*Command).execute(0xc000206308, {0xc0001e4880, 0x2, 0x2})
E               	/percona-backup-mongodb/vendor/github.com/spf13/cobra/command.go:985 +0xaca
E               github.com/spf13/cobra.(*Command).ExecuteC(0xc000170608)
E               	/percona-backup-mongodb/vendor/github.com/spf13/cobra/command.go:1117 +0x3ff
E               github.com/spf13/cobra.(*Command).Execute(...)
E               	/percona-backup-mongodb/vendor/github.com/spf13/cobra/command.go:1041
E               main.main()
E               	/percona-backup-mongodb/cmd/pbm/main.go:76 +0x45

cluster.py:467: AssertionError

During handling of the above exception, another exception occurred:

start_cluster = True, cluster = <cluster.Cluster object at 0x7f8ecf6f1b10>

    @pytest.mark.timeout(600,func_only=True)
    def test_incremental_PBM_T277(start_cluster,cluster):
        cluster.check_pbm_status()
        cluster.make_backup("incremental --base")
        pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
        backup = cluster.make_backup("incremental")
        result=pymongo.MongoClient(cluster.connection)["test"]["test"].delete_many({})
        assert int(result.deleted_count) == len(documents)
        cluster.upgrade()
        cluster.check_pbm_status()
        try:
            cluster.make_restore(backup,restart_cluster=True, check_pbm_status=True)
            assert pymongo.MongoClient(cluster.connection)["test"]["test"].count_documents({}) == len(documents)
            assert pymongo.MongoClient(cluster.connection)["test"].command("collstats", "test").get("sharded", False)
            Cluster.log("Finished successfully")
        except AssertionError as e:
            if "is not compatible with" in str(e):
                Cluster.log("[PBM-1069] Expected failure: \n" + str(e))
                Cluster.log("Finished successfully")
            else:
>               assert False, str(e)
E               AssertionError: Starting restore 2025-02-05T13:55:03.41644909Z from '2025-02-05T13:54:31Z'.panic: errors: *target must be interface or implement error
E                 
E                 goroutine 1 [running]:
E                 errors.As({0x13f90e0, 0xc0005069f0}, {0x11122e0, 0xc000012228})
E                 	/usr/local/go/src/errors/wrap.go:111 +0x206
E                 github.com/pkg/errors.As(...)
E                 	/percona-backup-mongodb/vendor/github.com/pkg/errors/go113.go:31
E                 github.com/percona/percona-backup-mongodb/pbm/errors.As(...)
E                 	/percona-backup-mongodb/pbm/errors/errors.go:33
E                 github.com/percona/percona-backup-mongodb/pbm/storage/s3.(*S3).FileStat(0xc000386c00, {0xc000370090, 0x2f})
E                 	/percona-backup-mongodb/pbm/storage/s3/s3.go:495 +0x691
E                 github.com/percona/percona-backup-mongodb/pbm/restore.GetPhysRestoreMeta({0xc000048620, 0x1d}, {0x1408e80, 0xc000386c00}, {0x1406600, 0xc000040e00})
E                 	/percona-backup-mongodb/pbm/restore/storage.go:21 +0x104
E                 main.doRestore.func1({0x14051b0, 0xc0002959d0}, {0x140b8f8, 0xc00031e930}, {0xc000048620, 0x1d})
E                 	/percona-backup-mongodb/cmd/pbm/restore.go:500 +0x15e
E                 main.waitForRestoreStatus({0x14051b0, 0xc0002959d0}, {0x140b8f8, 0xc00031e930}, {0xc000048620, 0x1d}, 0xc000549980)
E                 	/percona-backup-mongodb/cmd/pbm/restore.go:563 +0x21e
E                 main.doRestore({0x1405108, 0xc000305560}, {0x140b8f8, 0xc00031e930}, 0xc0001fc0c0, 0x0, 0x0, {0x0, 0x0, 0x0}, ...)
E                 	/percona-backup-mongodb/cmd/pbm/restore.go:506 +0xdc5
E                 main.runRestore({0x1405108, 0xc000305560}, {0x140b8f8, 0xc00031e930}, 0xc000384740, 0xc0001fc0c0, {0xc000393740, 0xd}, {0x11e306c, 0x4})
E                 	/percona-backup-mongodb/cmd/pbm/restore.go:162 +0xaf5
E                 main.(*pbmApp).buildRestoreCmd.func1(0x72799c3400000000?, {0xc0001e48a0?, 0x0?, 0x0?})
E                 	/percona-backup-mongodb/cmd/pbm/main.go:742 +0xa5
E                 main.(*pbmApp).buildRestoreCmd.(*pbmApp).wrapRunE.func2(0xc00016f000?, {0xc0001e48a0?, 0x4?, 0x11e316c?})
E                 	/percona-backup-mongodb/cmd/pbm/main.go:85 +0x33
E                 github.com/spf13/cobra.(*Command).execute(0xc000206308, {0xc0001e4880, 0x2, 0x2})
E                 	/percona-backup-mongodb/vendor/github.com/spf13/cobra/command.go:985 +0xaca
E                 github.com/spf13/cobra.(*Command).ExecuteC(0xc000170608)
E                 	/percona-backup-mongodb/vendor/github.com/spf13/cobra/command.go:1117 +0x3ff
E                 github.com/spf13/cobra.(*Command).Execute(...)
E                 	/percona-backup-mongodb/vendor/github.com/spf13/cobra/command.go:1041
E                 main.main()
E                 	/percona-backup-mongodb/cmd/pbm/main.go:76 +0x45
E                 
E               assert False

test_upgrade.py:97: AssertionError

Check failure on line 59 in psmdb-testing/pbm-functional/pytest/test_vault.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_vault.test_incremental_PBM_T200

AssertionError: Starting restore 2025-02-05T13:55:54.070179531Z from '2025-02-05T13:55:46Z'.panic: errors: *target must be interface or implement error

goroutine 1 [running]:
errors.As({0x13f90e0, 0xc0002fc270}, {0x11122e0, 0xc000012150})
	/usr/local/go/src/errors/wrap.go:111 +0x206
github.com/pkg/errors.As(...)
	/percona-backup-mongodb/vendor/github.com/pkg/errors/go113.go:31
github.com/percona/percona-backup-mongodb/pbm/errors.As(...)
	/percona-backup-mongodb/pbm/errors/errors.go:33
github.com/percona/percona-backup-mongodb/pbm/storage/s3.(*S3).FileStat(0xc000040e40, {0xc0000d60c0, 0x30})
	/percona-backup-mongodb/pbm/storage/s3/s3.go:495 +0x691
github.com/percona/percona-backup-mongodb/pbm/restore.GetPhysRestoreMeta({0xc0002183c0, 0x1e}, {0x1408e80, 0xc000040e40}, {0x1406600, 0xc0001fd2c0})
	/percona-backup-mongodb/pbm/restore/storage.go:21 +0x104
main.doRestore.func1({0x14051b0, 0xc00028f650}, {0x140b8f8, 0xc00004c5c0}, {0xc0002183c0, 0x1e})
	/percona-backup-mongodb/cmd/pbm/restore.go:500 +0x15e
main.waitForRestoreStatus({0x14051b0, 0xc00028f650}, {0x140b8f8, 0xc00004c5c0}, {0xc0002183c0, 0x1e}, 0xc0004b9980)
	/percona-backup-mongodb/cmd/pbm/restore.go:563 +0x21e
main.doRestore({0x1405108, 0xc000294ea0}, {0x140b8f8, 0xc00004c5c0}, 0xc0001fe0c0, 0x0, 0x0, {0x0, 0x0, 0x0}, ...)
	/percona-backup-mongodb/cmd/pbm/restore.go:506 +0xdc5
main.runRestore({0x1405108, 0xc000294ea0}, {0x140b8f8, 0xc00004c5c0}, 0xc000056960, 0xc0001fe0c0, {0xc0001d9d50, 0xb}, {0x11e306c, 0x4})
	/percona-backup-mongodb/cmd/pbm/restore.go:162 +0xaf5
main.(*pbmApp).buildRestoreCmd.func1(0xbeff85e600000000?, {0xc0001e48a0?, 0x0?, 0x0?})
	/percona-backup-mongodb/cmd/pbm/main.go:742 +0xa5
main.(*pbmApp).buildRestoreCmd.(*pbmApp).wrapRunE.func2(0xc00016f000?, {0xc0001e48a0?, 0x4?, 0x11e316c?})
	/percona-backup-mongodb/cmd/pbm/main.go:85 +0x33
github.com/spf13/cobra.(*Command).execute(0xc000206308, {0xc0001e4880, 0x2, 0x2})
	/percona-backup-mongodb/vendor/github.com/spf13/cobra/command.go:985 +0xaca
github.com/spf13/cobra.(*Command).ExecuteC(0xc000170608)
	/percona-backup-mongodb/vendor/github.com/spf13/cobra/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
	/percona-backup-mongodb/vendor/github.com/spf13/cobra/command.go:1041
main.main()
	/percona-backup-mongodb/cmd/pbm/main.go:76 +0x45
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f8ecf31b5d0>

    @pytest.mark.timeout(300,func_only=True)
    def test_incremental_PBM_T200(start_cluster,cluster):
        cluster.check_pbm_status()
        cluster.make_backup("incremental --base")
        pymongo.MongoClient(cluster.connection)["test"]["test"].insert_many(documents)
        backup=cluster.make_backup("incremental")
        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_vault.py:59: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f8ecf31b5d0>, name = '2025-02-05T13:55:46Z'
kwargs = {'check_pbm_status': True, 'restart_cluster': True}
result = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f8ecf1b0250>, exit_status=2, command=b'time...godb/vendor/github.com/spf13/cobra/command.go:1041\nmain.main()\n\t/percona-backup-mongodb/cmd/pbm/main.go:76 +0x45\n')
n = <testinfra.host.Host docker://rs101>, timeout = 240, error = ''
host = 'rs103', container = <Container: 23d87cf84758>

    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")
        timeout=kwargs.get('timeout', 240)
        result = n.run('timeout ' + str(timeout) + ' pbm restore ' + name + ' --wait')
    
        if result.rc == 0:
            Cluster.log(result.stdout)
        else:
            # try to catch possible failures if timeout exceeded
            error=''
            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))
                        logs = get_logs.output.decode('utf-8')
                        Cluster.log(logs)
                        if '"s":"F"' in logs:
                            error = logs
                except docker.errors.APIError:
                    pass
            if error:
                assert False, result.stdout + result.stderr + "\n" + error
            else:
>               assert False, result.stdout + result.stderr
E               AssertionError: Starting restore 2025-02-05T13:55:54.070179531Z from '2025-02-05T13:55:46Z'.panic: errors: *target must be interface or implement error
E               
E               goroutine 1 [running]:
E               errors.As({0x13f90e0, 0xc0002fc270}, {0x11122e0, 0xc000012150})
E               	/usr/local/go/src/errors/wrap.go:111 +0x206
E               github.com/pkg/errors.As(...)
E               	/percona-backup-mongodb/vendor/github.com/pkg/errors/go113.go:31
E               github.com/percona/percona-backup-mongodb/pbm/errors.As(...)
E               	/percona-backup-mongodb/pbm/errors/errors.go:33
E               github.com/percona/percona-backup-mongodb/pbm/storage/s3.(*S3).FileStat(0xc000040e40, {0xc0000d60c0, 0x30})
E               	/percona-backup-mongodb/pbm/storage/s3/s3.go:495 +0x691
E               github.com/percona/percona-backup-mongodb/pbm/restore.GetPhysRestoreMeta({0xc0002183c0, 0x1e}, {0x1408e80, 0xc000040e40}, {0x1406600, 0xc0001fd2c0})
E               	/percona-backup-mongodb/pbm/restore/storage.go:21 +0x104
E               main.doRestore.func1({0x14051b0, 0xc00028f650}, {0x140b8f8, 0xc00004c5c0}, {0xc0002183c0, 0x1e})
E               	/percona-backup-mongodb/cmd/pbm/restore.go:500 +0x15e
E               main.waitForRestoreStatus({0x14051b0, 0xc00028f650}, {0x140b8f8, 0xc00004c5c0}, {0xc0002183c0, 0x1e}, 0xc0004b9980)
E               	/percona-backup-mongodb/cmd/pbm/restore.go:563 +0x21e
E               main.doRestore({0x1405108, 0xc000294ea0}, {0x140b8f8, 0xc00004c5c0}, 0xc0001fe0c0, 0x0, 0x0, {0x0, 0x0, 0x0}, ...)
E               	/percona-backup-mongodb/cmd/pbm/restore.go:506 +0xdc5
E               main.runRestore({0x1405108, 0xc000294ea0}, {0x140b8f8, 0xc00004c5c0}, 0xc000056960, 0xc0001fe0c0, {0xc0001d9d50, 0xb}, {0x11e306c, 0x4})
E               	/percona-backup-mongodb/cmd/pbm/restore.go:162 +0xaf5
E               main.(*pbmApp).buildRestoreCmd.func1(0xbeff85e600000000?, {0xc0001e48a0?, 0x0?, 0x0?})
E               	/percona-backup-mongodb/cmd/pbm/main.go:742 +0xa5
E               main.(*pbmApp).buildRestoreCmd.(*pbmApp).wrapRunE.func2(0xc00016f000?, {0xc0001e48a0?, 0x4?, 0x11e316c?})
E               	/percona-backup-mongodb/cmd/pbm/main.go:85 +0x33
E               github.com/spf13/cobra.(*Command).execute(0xc000206308, {0xc0001e4880, 0x2, 0x2})
E               	/percona-backup-mongodb/vendor/github.com/spf13/cobra/command.go:985 +0xaca
E               github.com/spf13/cobra.(*Command).ExecuteC(0xc000170608)
E               	/percona-backup-mongodb/vendor/github.com/spf13/cobra/command.go:1117 +0x3ff
E               github.com/spf13/cobra.(*Command).Execute(...)
E               	/percona-backup-mongodb/vendor/github.com/spf13/cobra/command.go:1041
E               main.main()
E               	/percona-backup-mongodb/cmd/pbm/main.go:76 +0x45

cluster.py:467: AssertionError