Skip to content

test flake: cli/TestServer/BuiltinPostgres: Text file busy #74

@johnstcn

Description

@johnstcn

Seen here: https://github.com/coder/coder/actions/runs/9663390099/job/26655447154?pr=13659

=== FAIL: cli TestServer/BuiltinPostgres (180.03s)
    clitest.go:75: invoking command: coder --global-config /tmp/TestServerBuiltinPostgres1925950231/002 server --http-address :0 --access-url http://example.com --cache-dir /tmp/TestServerBuiltinPostgres1925950231/001
    t.go:99: 2024-06-25 13:30:49.176 [info]  cli: stdout: Started HTTP listener at http://[::]:38055
    t.go:99: 2024-06-25 13:30:49.176 [info]  cli: stdout: Using built-in PostgreSQL (/tmp/TestServerBuiltinPostgres1925950231/002/postgres)
    clitest.go:261: command "coder server" exited with error: running command "coder server": Failed to start built-in PostgreSQL. Optionally, specify an external deployment with `--postgres-url`:
            github.com/coder/coder/v2/cli.startBuiltinPostgres
                /home/runner/work/coder/coder/cli/server.go:1992
          - unable to init database using '/tmp/TestServerBuiltinPostgres1925950231/002/postgres/bin/bin/initdb -A password -U coder -D /tmp/TestServerBuiltinPostgres1925950231/002/postgres/data --pwfile=/tmp/TestServerBuiltinPostgres1925950231/002/postgres/runtime/pwfile': exit status 1
        sh: 1: /tmp/TestServerBuiltinPostgres1925950231/002/postgres/bin/bin/postgres: Text file busy
        no data was returned by command ""/tmp/TestServerBuiltinPostgres1925950231/002/postgres/bin/bin/postgres" -V"
        initdb: error: The program "postgres" is needed by initdb but was not found in the
        same directory as "/tmp/TestServerBuiltinPostgres1925950231/002/postgres/bin/bin/initdb".
        Check your installation.
    clitest.go:172: 
        	Error Trace:	/home/runner/work/coder/coder/cli/clitest/clitest.go:172
        	            				/opt/hostedtoolcache/go/1.22.4/x64/src/runtime/asm_amd64.s:1695
        	Error:      	Received unexpected error:
        	            	running command "coder server": Failed to start built-in PostgreSQL. Optionally, specify an external deployment with `--postgres-url`:
        	            	    github.com/coder/coder/v2/cli.startBuiltinPostgres
        	            	        /home/runner/work/coder/coder/cli/server.go:1992
        	            	  - unable to init database using '/tmp/TestServerBuiltinPostgres1925950231/002/postgres/bin/bin/initdb -A password -U coder -D /tmp/TestServerBuiltinPostgres1925950231/002/postgres/data --pwfile=/tmp/TestServerBuiltinPostgres1925950231/002/postgres/runtime/pwfile': exit status 1
        	            	sh: 1: /tmp/TestServerBuiltinPostgres1925950231/002/postgres/bin/bin/postgres: Text file busy
        	            	no data was returned by command ""/tmp/TestServerBuiltinPostgres1925950231/002/postgres/bin/bin/postgres" -V"
        	            	initdb: error: The program "postgres" is needed by initdb but was not found in the
        	            	same directory as "/tmp/TestServerBuiltinPostgres1925950231/002/postgres/bin/bin/initdb".
        	            	Check your installation.
        	Test:       	TestServer/BuiltinPostgres
    server_test.go:173: 
        	Error Trace:	/home/runner/work/coder/coder/cli/server_test.go:173
        	Error:      	Condition never satisfied
        	Test:       	TestServer/BuiltinPostgres
        	Messages:   	failed to get access URL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions