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

[v13] Postgres backend and Azure session storage backport #29705

Merged
merged 3 commits into from Jul 27, 2023

Conversation

espadolini
Copy link
Contributor

This PR backports #29025, #29057, #29069, #29682 to branch/v13.

espadolini and others added 3 commits July 27, 2023 19:39
* Azure Blob Storage for sessions

* use blob batch for part cleanup

* address comments

* require https/http/azblob/azblob-http scheme
* Postgres events

* Update lib/events/pgevents/pgevents.go

Co-authored-by: Krzysztof Skrzętnicki <krzysztof.skrzetnicki@goteleport.com>

* clarify setupAndMigrate

* simplify AzureBeforeConnect

* Add a test for pagination keys

* Allow idempotent retries where appropriate

* Update lib/events/pgevents/common/utils.go

Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>

* clarify defaultRetentionPeriod

* warn about expanding the searchEvents query

* describe azidentity errors

* move non-postgres options to the fragment

* move common package to pgbk

* move SetupAndMigrate to common

* TestPaginationKeyRoundtrip can be t.Parallel()

---------

Co-authored-by: Krzysztof Skrzętnicki <krzysztof.skrzetnicki@goteleport.com>
Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>
* Postgres backend

* Use batch to mark read transactions as read only

* Allow the backend_version creation to fail

* clarify setupAndMigrate

* simplify AzureBeforeConnect

* Allow idempotent retries for reads

* rm go.sum && go mod tidy

* clarify error messages

* clarify TELEPORT_PGBK_TEST_PARAMS_JSON

* Describe why we always use the real clock

* move SetupAndMigrate to common

* update revision comment

* clarify batches

* actually use the context in conn.Close

* give a reason why we silence logs in the change feed

* order expiration deletes by expiry time

* reduce defaultChangeFeedBatchSize down to 1000

we seem to be handling outrageous load fine even with 1000, and 10k (if
actually hit) all but guarantees that we go over the default work_mem,
forcing postgres to spill to disk; it's a tunable, anyway

* parse expires as timestamptz in pollChangeFeed

* implement GetName

* blindly try to grant REPLICATION

* default_transaction_isolation in RuntimeParams

* Always use NewDefaultAzureCredential

* retry unique_violation and exclusion_violation

* fix pgevents.TestConfig

* extract isSerializationErrorCode

* polish the default_transaction_isolation check

* Fix typo in Clock doc comment

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

* expires is a Timestamptz

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
@public-teleport-github-review-bot

@espadolini - this PR will require admin approval to merge due to its size. Consider breaking it up into a series smaller changes.

@github-actions github-actions bot requested a review from jakule July 27, 2023 17:57
@github-actions github-actions bot added audit-log Issues related to Teleports Audit Log size/xl labels Jul 27, 2023
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from jakule July 27, 2023 19:59
@espadolini espadolini added this pull request to the merge queue Jul 27, 2023
Merged via the queue into branch/v13 with commit f36b706 Jul 27, 2023
23 checks passed
@espadolini espadolini deleted the espadolini/postgres-azure-backport branch July 27, 2023 20:18
@fheinecke fheinecke mentioned this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit-log Issues related to Teleports Audit Log backport size/xl
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants