panic: runtime error: invalid memory address or nil pointer dereference SIGSEGV related to Healthcheck #934
Closed
Description
Similar to #918 and #892 but slightly different cause.
This one is triggered by the healthcheck
, this runs if healthcheck
is removed.
This may have been fixed in #926 but I'm unable to test that yet.
version: '3'
services:
postgres:
image: postgres
healthcheck:
test: psql postgres --command "select 1"
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres
broker_app:
image: dius/pact-broker
ports:
- "80:80"
links:
- postgres
environment:
PACT_BROKER_DATABASE_USERNAME: postgres
PACT_BROKER_DATABASE_PASSWORD: password
PACT_BROKER_DATABASE_HOST: postgres
PACT_BROKER_DATABASE_NAME: postgres
$ kompose convert -f docker-compose.yml
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2220748]
goroutine 1 [running]:
github.com/kubernetes/kompose/pkg/loader/compose.parseHealthCheck(0xc4200a9b80, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/private/tmp/kompose-20180105-58832-38j8jm/kompose-1.7.0/src/github.com/kubernetes/kompose/pkg/loader/compose/v3.go:190 +0x78
github.com/kubernetes/kompose/pkg/loader/compose.dockerComposeToKomposeMapping(0xc42037f580, 0x25, 0xc4200a86e0, 0x1, 0x1, 0xc42048a570)
/private/tmp/kompose-20180105-58832-38j8jm/kompose-1.7.0/src/github.com/kubernetes/kompose/pkg/loader/compose/v3.go:255 +0x11b2
github.com/kubernetes/kompose/pkg/loader/compose.parseV3(0xc4203dd3f0, 0x1, 0x1, 0x1, 0x1, 0x0, 0x30, 0x27ea960)
/private/tmp/kompose-20180105-58832-38j8jm/kompose-1.7.0/src/github.com/kubernetes/kompose/pkg/loader/compose/v3.go:113 +0x22b
github.com/kubernetes/kompose/pkg/loader/compose.(*Compose).LoadFile(0x3724c40, 0xc4203dd3f0, 0x1, 0x1, 0xc42048a120, 0x0, 0x0, 0xc, 0x8)
/private/tmp/kompose-20180105-58832-38j8jm/kompose-1.7.0/src/github.com/kubernetes/kompose/pkg/loader/compose/compose.go:186 +0x4d2
github.com/kubernetes/kompose/pkg/app.Convert(0x100000100, 0x0, 0x0, 0x0, 0x0, 0x28aa4b8, 0x4, 0x0, 0x28be4a7, 0x15, ...)
/private/tmp/kompose-20180105-58832-38j8jm/kompose-1.7.0/src/github.com/kubernetes/kompose/pkg/app/app.go:227 +0x145
github.com/kubernetes/kompose/cmd.glob..func3(0x36f2960, 0xc420179f20, 0x0, 0x2)
/private/tmp/kompose-20180105-58832-38j8jm/kompose-1.7.0/src/github.com/kubernetes/kompose/cmd/convert.go:95 +0x4d
github.com/kubernetes/kompose/vendor/github.com/spf13/cobra.(*Command).execute(0x36f2960, 0xc420179ee0, 0x2, 0x2, 0x36f2960, 0xc420179ee0)
/private/tmp/kompose-20180105-58832-38j8jm/kompose-1.7.0/src/github.com/kubernetes/kompose/vendor/github.com/spf13/cobra/command.go:704 +0x2c6
github.com/kubernetes/kompose/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x36f2da0, 0x36f31e0, 0x24a03d0, 0x36f2ee0)
/private/tmp/kompose-20180105-58832-38j8jm/kompose-1.7.0/src/github.com/kubernetes/kompose/vendor/github.com/spf13/cobra/command.go:785 +0x30e
github.com/kubernetes/kompose/vendor/github.com/spf13/cobra.(*Command).Execute(0x36f2da0, 0x0, 0xc420241f48)
/private/tmp/kompose-20180105-58832-38j8jm/kompose-1.7.0/src/github.com/kubernetes/kompose/vendor/github.com/spf13/cobra/command.go:738 +0x2b
github.com/kubernetes/kompose/cmd.Execute()
/private/tmp/kompose-20180105-58832-38j8jm/kompose-1.7.0/src/github.com/kubernetes/kompose/cmd/root.go:92 +0x31
main.main()
/private/tmp/kompose-20180105-58832-38j8jm/kompose-1.7.0/main.go:22 +0x20
Metadata
Assignees
Labels
No labels