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

TestInitDatabaseService/enabled_invalid_databases flakiness #42963

Closed
ravicious opened this issue Jun 14, 2024 · 7 comments · Fixed by #47750 or #50702
Closed

TestInitDatabaseService/enabled_invalid_databases flakiness #42963

ravicious opened this issue Jun 14, 2024 · 7 comments · Fixed by #47750 or #50702
Assignees

Comments

@ravicious
Copy link
Member

ravicious commented Jun 14, 2024

Failure

Link(s) to logs

Relevant snippet

    service_test.go:1807: 
        	Error Trace:	/__w/teleport/teleport/lib/service/service_test.go:1807
        	Error:      	Received unexpected error:
        	            	context deadline exceeded
        	Test:       	TestInitDatabaseService/enabled_invalid_databases
@ibeckermayer
Copy link
Contributor

@ibeckermayer
Copy link
Contributor

ibeckermayer commented Jun 17, 2024

@zmb3
Copy link
Collaborator

zmb3 commented Sep 10, 2024

New hit here: https://github.com/gravitational/teleport/actions/runs/10798727879/job/29952841726?pr=46226

Looks like the tempdir cleanup problem:

=== FAIL: lib/service TestInitDatabaseService/enabled_invalid_databases (6.21s)
    testing.go:1232: TempDir RemoveAll cleanup: unlinkat /tmp/TestInitDatabaseServiceenabled_invalid_databases626223594/003: directory not empty

@zmb3 zmb3 reopened this Sep 10, 2024
@rosstimothy
Copy link
Contributor

Nightly test runner is also hitting the directory cleanup:

OUTPUT github.com/gravitational/teleport/lib/service.TestInitDatabaseService
===================================================
=== RUN   TestInitDatabaseService
=== PAUSE TestInitDatabaseService
=== CONT  TestInitDatabaseService
{"timestamp":"2024-10-14T11:14:55Z","level":"debug","caller":"lite/lite.go:259","message":"Connected to database","component":"sqlite","database":"file:/tmp/847634349/proc/sqlite.db?_busy_timeout=10000&_sync=FULL&_txlock=immediate","poll_stream_period":1000000000}
--- FAIL: TestInitDatabaseService (0.00s)
{"timestamp":"2024-10-14T11:14:58Z","level":"error","caller":"machineidv1/spiffe_federation_syncer.go:187","message":"SPIFFEFederation syncer encountered a fatal error, it will restart after backoff","component":"proc:12","pid":"552672.12","component":"auth:12","component":"auth:spiffe_federation_syncer","error":"disk I/O error: no such file or directory","restart_after":8760519528}
{"caller":"service/supervisor.go:255","component":"proc:12","level":"debug","message":"Service is completed and removed.","pid":"552672.12","service":"auth.spiffe_federation_syncer","timestamp":"2024-10-14T11:14:58Z"}
===================================================
OUTPUT github.com/gravitational/teleport/lib/service.TestInitDatabaseService/enabled_invalid_databases
===================================================
=== RUN   TestInitDatabaseService/enabled_invalid_databases
=== PAUSE TestInitDatabaseService/enabled_invalid_databases
=== CONT  TestInitDatabaseService/enabled_invalid_databases
    testing.go:1232: TempDir RemoveAll cleanup: unlinkat /tmp/TestInitDatabaseServiceenabled_invalid_databases2806506600/001: directory not empty
--- FAIL: TestInitDatabaseService/enabled_invalid_databases (3.05s)```

rosstimothy added a commit that referenced this issue Oct 21, 2024
Addresses two separate issues caused by using t.TempDir as the
data directory in the test.

- Session recording is disabled to avoid cleanup problems with
  a non-empty data dir
- The debug service is disabled to prevent long unix socket
  paths from failing tests on macOS

Closes #42963
github-merge-queue bot pushed a commit that referenced this issue Oct 21, 2024
Addresses two separate issues caused by using t.TempDir as the
data directory in the test.

- Session recording is disabled to avoid cleanup problems with
  a non-empty data dir
- The debug service is disabled to prevent long unix socket
  paths from failing tests on macOS

Closes #42963
github-actions bot pushed a commit that referenced this issue Oct 21, 2024
Addresses two separate issues caused by using t.TempDir as the
data directory in the test.

- Session recording is disabled to avoid cleanup problems with
  a non-empty data dir
- The debug service is disabled to prevent long unix socket
  paths from failing tests on macOS

Closes #42963
github-merge-queue bot pushed a commit that referenced this issue Oct 21, 2024
Addresses two separate issues caused by using t.TempDir as the
data directory in the test.

- Session recording is disabled to avoid cleanup problems with
  a non-empty data dir
- The debug service is disabled to prevent long unix socket
  paths from failing tests on macOS

Closes #42963
@gabrielcorado gabrielcorado reopened this Nov 26, 2024
@rosstimothy
Copy link
Contributor

This test is likely prone to the same issues that TestDynamicClientReuse had. Namely, we are closing the process without waiting for all the services to be completed first.

@espadolini
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants