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

add RDS MariaDB e2e tests #40066

Merged
merged 7 commits into from
Apr 8, 2024
Merged

Conversation

GavinFrazar
Copy link
Contributor

@GavinFrazar GavinFrazar commented Mar 30, 2024

This PR adds RDS MariaDB discovery, connection, and auto user provisioning tests.

stacked on #40065 and will be automatically rebased onto master when that merges.

We only added auto user provisioning in v14 for mariadb, but I'm backporting to v13 for discovery and connection tests. we only added e2e test in v14. Soon to be out of support anyway. I'll only backport to v14+.

@GavinFrazar GavinFrazar added database-access Database access related issues and PRs backport/branch/v13 backport/branch/v14 no-changelog Indicates that a PR does not require a changelog entry backport/branch/v15 labels Mar 30, 2024
@github-actions github-actions bot requested review from mdwn and probakowski March 30, 2024 02:34
Copy link
Contributor

@greedy52 greedy52 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. Same comment as the other PR that we need to verify db_roles are assigned to the user.

e2e/aws/rds_test.go Outdated Show resolved Hide resolved
Base automatically changed from gavinfrazar/update-rds-e2e-tests to master April 2, 2024 18:14
* if a role or user doesn't exist, that is not an error nor is it worth
  logging during auto user teardown.
@GavinFrazar GavinFrazar force-pushed the gavinfrazar/e2e-test-rds-mariadb branch from fd02d99 to dbe00fc Compare April 4, 2024 01:22
@GavinFrazar
Copy link
Contributor Author

GavinFrazar commented Apr 4, 2024

@greedy52 let me know if there's any issues with doing dbe00fc

I also updated the mariadb tests to check all role assignments work

@GavinFrazar
Copy link
Contributor Author

I can't figure out why the gha runners are being blocked by the MariaDB instance.

performance_schema is disabled by default, so it wouldn't even be possible to look at that.

I figured out that a host only gets blocked for connection failure, not auth failure. This can be simulated by just running nc -q 0 -v <host> <port> - the protocol handshake is server initiated and since we start talking to the db and then leave, it counts as a connection failure.

Default max_connect_errors is 100. I'm going to bump that value up a lot and then just wait for the db to get recreated over the weekend.

@greedy52
Copy link
Contributor

greedy52 commented Apr 5, 2024

I can't figure out why the gha runners are being blocked by the MariaDB instance.

performance_schema is disabled by default, so it wouldn't even be possible to look at that.

I figured out that a host only gets blocked for connection failure, not auth failure. This can be simulated by just running nc -q 0 -v <host> <port> - the protocol handshake is server initiated and since we start talking to the db and then leave, it counts as a connection failure.

Default max_connect_errors is 100. I'm going to bump that value up a lot and then just wait for the db to get recreated over the weekend.

Sounds good. Hopefully we will see some data once performance_schema is enabled.

Copy link
Contributor

@camscale camscale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bot

@GavinFrazar GavinFrazar added this pull request to the merge queue Apr 8, 2024
Merged via the queue into master with commit 54d2e90 Apr 8, 2024
38 checks passed
@GavinFrazar GavinFrazar deleted the gavinfrazar/e2e-test-rds-mariadb branch April 8, 2024 22:03
@public-teleport-github-review-bot

@GavinFrazar See the table below for backport results.

Branch Result
branch/v14 Failed
branch/v15 Failed

GavinFrazar added a commit that referenced this pull request Apr 11, 2024
* add AWS RDS MariaDB e2e tests

* fix spurious teardown error logs

* if a role or user doesn't exist, that is not an error nor is it worth
  logging during auto user teardown.

* check for admin option

* add some extra secret fetching checkings

* only drop redshift user if the user exists
GavinFrazar added a commit that referenced this pull request Apr 11, 2024
* add AWS RDS MariaDB e2e tests

* fix spurious teardown error logs

* if a role or user doesn't exist, that is not an error nor is it worth
  logging during auto user teardown.

* check for admin option

* add some extra secret fetching checkings

* only drop redshift user if the user exists
github-merge-queue bot pushed a commit that referenced this pull request Apr 18, 2024
* add AWS RDS MariaDB e2e tests

* fix spurious teardown error logs

* if a role or user doesn't exist, that is not an error nor is it worth
  logging during auto user teardown.

* check for admin option

* add some extra secret fetching checkings

* only drop redshift user if the user exists
github-merge-queue bot pushed a commit that referenced this pull request Apr 18, 2024
* add AWS RDS MariaDB e2e tests

* fix spurious teardown error logs

* if a role or user doesn't exist, that is not an error nor is it worth
  logging during auto user teardown.

* check for admin option

* add some extra secret fetching checkings

* only drop redshift user if the user exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v14 backport/branch/v15 database-access Database access related issues and PRs no-changelog Indicates that a PR does not require a changelog entry size/md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants