flyctl
flyctl copied to clipboard
`pg restart --force`: runtime error: invalid memory address or nil pointer dereference
Describe the bug
Running: fly pg restart -a <app> --force causes a invalid memory address fault
- Operating system
fly version
flyctl v0.3.25 linux/amd64 Commit: 8fb314c9230ba972453b5ebf292214d10f076468 BuildDate: 2024-10-21T16:49:16Z
** Paste your fly.toml
This is a Postgress DB
** Command output: **
$ fly pg restart -a ... --force
No leader found, but continuing with restart
Identifying cluster role(s)
Machine 39080ec170e875: readonly
Restarting machine 39080ec170e875
Waiting for 39080ec170e875 to become healthy (started, 3/3)
Machine 39080ec170e875 restarted successfully!
Oops, something went wrong! Could you try that again?
runtime error: invalid memory address or nil pointer dereference
goroutine 1 [running]:
runtime/debug.Stack()
/home/runner/go/pkg/mod/golang.org/[email protected]/src/runtime/debug/stack.go:24 +0x5e
github.com/superfly/flyctl/internal/sentry.printError({0x24389a0, 0x40b4110})
/home/runner/work/flyctl/flyctl/internal/sentry/sentry.go:190 +0x16f
github.com/superfly/flyctl/internal/sentry.Recover({0x24389a0, 0x40b4110})
/home/runner/work/flyctl/flyctl/internal/sentry/sentry.go:180 +0xb4
main.run.func1()
/home/runner/work/flyctl/flyctl/main.go:40 +0x2f
panic({0x24389a0?, 0x40b4110?})
/home/runner/go/pkg/mod/golang.org/[email protected]/src/runtime/panic.go:770 +0x132
github.com/superfly/flyctl/internal/command/postgres.machinesRestart({0x2d09bb0, 0xc000a28900}, {0x7ffc1cf7acb0, 0xb}, 0xc000925878)
/home/runner/work/flyctl/flyctl/internal/command/postgres/restart.go:127 +0xaf2
github.com/superfly/flyctl/internal/command/postgres.runRestart({0x2d09bb0, 0xc0006f6870})
/home/runner/work/flyctl/flyctl/internal/command/postgres/restart.go:73 +0x199
github.com/superfly/flyctl/internal/command/postgres.newRestart.New.newRunE.func1(0xc0008ce608, {0x27ac864?, 0x4?, 0x27ac6b8?})
/home/runner/work/flyctl/flyctl/internal/command/command.go:140 +0x1d9
github.com/spf13/cobra.(*Command).execute(0xc0008ce608, {0xc0001bc4e0, 0x3, 0x3})
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:985 +0xaca
github.com/spf13/cobra.(*Command).ExecuteC(0xc0002daf08)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).ExecuteContextC(...)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1050
github.com/superfly/flyctl/internal/cli.Run({0x2d09d38?, 0xc0006ad240?}, 0xc0003a80a0, {0xc0000501f0, 0x5, 0x5})
/home/runner/work/flyctl/flyctl/internal/cli/cli.go:94 +0x69a
main.run()
/home/runner/work/flyctl/flyctl/main.go:47 +0x156
main.main()
/home/runner/work/flyctl/flyctl/main.go:26 +0x18
Exit 3