Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TEST] TestBackupRestore::test_connection[S3] test fails making consecutive tests fail for backup & restore #1568

Open
khushboo-rancher opened this issue Oct 3, 2024 · 3 comments · May be fixed by #1580
Assignees
Labels
area/backend-automation Implement with pytest

Comments

@khushboo-rancher
Copy link
Collaborator

What's the test to develop? Please describe

 @pytest.mark.dependency()
    def test_connection(self, api_client, backup_config, config_backup_target):
        code, data = api_client.settings.backup_target_test_connection()
>       assert 200 == code, f'Failed to test backup target connection: {data}'
E       AssertionError: Failed to test backup target connection: {"errors":["can't connect to backup target \u0026{Type:s3 Endpoint:http://172.19.99.205:9000 AccessKeyID:minioadmin SecretAccessKey:minioadmin BucketName:giants BucketRegion:ecmlab Cert: VirtualHostedStyle:false}, error: secrets \"harvester-backup-target-secret\" not found"]}
E       assert 200 == 503

api_client = HarvesterAPI('https://172.19.xyz.x ...

@irishgordo
Copy link
Contributor

at first brief audit everything looks good on the connection side.
the earlier building of the secret is failing probably... still investigating
secrets \"harvester-backup-target-secret\" not found"

@noahgildersleeve
Copy link
Contributor

I retested this with a local environment with v1.4.0-rc1 and it all passed. However I had some issues when trying to run the test with other tests, that might be unrelated though.

irishgordo added a commit to irishgordo/tests that referenced this issue Oct 9, 2024
* fixes s3 connection building, allowing us to wait for a short period
  of time to allow the secret for longhorn-system to be built on
  Harvester side

Resovles: fix/1568
See also: harvester#1568
@irishgordo irishgordo linked a pull request Oct 9, 2024 that will close this issue
@irishgordo
Copy link
Contributor

irishgordo commented Oct 9, 2024

@noahgildersleeve - 🤔 - hmmm, I can consistently reproduce this issue with v1.4.0-rc1 locally -> w/ a separate Harvester bare-metal cluster.
It seems to be a timing issue.

I've opened up a PR to fix this:
#1580

Demonstrated in video below with:

  • 2 Node Bare-Metal External V1.4.0-rc1 Harvester Cluster HP DL160s
  • Just running tests locally w/ Python3.10 venv setup in VSCode
  • A minio instance running with TLS/SSL via Docker locally, additional-ca added to Harvester side
s3-connection-building-issue.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend-automation Implement with pytest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants