Skip to content

Running brev shell in docker ubuntu causes panic if ssh-client is not installed. #185

@ElCapitanT

Description

@ElCapitanT

Hello together,

I am new to brev and wanted to check if it fits my needs, so I hoped right in and ordered a spot instance for a T4 GPU with spot pricing. This shall run ollama at some point, but at first, I failed to access the instance via shell.

I am running ubuntu22.04 with docker, and in docker I am running ubuntu22.04. I do that for any given new software if possible, just to get a feeling of it. That allows me to throw away the container if I don't like it.

Running brev-cli in docker throws this error

brev shell --host ollama-proto
⣯ waiting for instance to be ready... panic: runtime error: index out of range [1] with length 1 [recovered]
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
github.com/brevdev/brev-cli/pkg/errors.SentryErrorReporter.Setup.func1()
/home/runner/work/brev-cli/brev-cli/pkg/errors/errors.go:50 +0x8b
panic({0x1a1af20, 0xc00051b770})
/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/panic.go:884 +0x213
github.com/brevdev/brev-cli/pkg/cmd/shell.waitForSSHToBeAvailable({0xc00051b578, 0x11}, 0xc000592000)
/home/runner/work/brev-cli/brev-cli/pkg/cmd/shell/shell.go:154 +0x27b
github.com/brevdev/brev-cli/pkg/cmd/shell.runShellCommand(0xc00089fd90?, {0x1e11588?, 0xc000692f00}, {0x7ffdcd7bb956, 0xc}, {0x0, 0x0}, 0x1)
/home/runner/work/brev-cli/brev-cli/pkg/cmd/shell/shell.go:109 +0x3a7
github.com/brevdev/brev-cli/pkg/cmd/shell.NewCmdShell.func1(0xc0002d0a00?, {0xc00027b980?, 0x2?, 0x2?})
/home/runner/work/brev-cli/brev-cli/pkg/cmd/shell/shell.go:57 +0x53
github.com/spf13/cobra.(*Command).execute(0xc0002d0a00, {0xc00027b960, 0x2, 0x2})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:856 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0xc000620f00)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:974 +0x3bd
github.com/spf13/cobra.(*Command).Execute(0x0?)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:902 +0x19
main.main()
/home/runner/work/brev-cli/brev-cli/main.go:16 +0x4a

Which isn't that helpful. Took me a moment that the wrapped ssh-client was missing, which solves that. Do you mind adding this as a proper requirement or at least as a error message?

Thank you and kind regards
Tom

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions