|
url: strings.Replace(url, "v1", "v2-beta", 1), |
This line brings bug, when rancher url contents v1, e.g
https://rancher-v1.example.com/ the secret drive will crashes, as the url will be replaced to
https://rancher-v2-beta.example.com/ which is not resolvable.
goroutine 1 [running]:
8/6/2020 1:42:22 PMpanic(0x770da0, 0xc420018050)
8/6/2020 1:42:22 PM /usr/local/go/src/runtime/panic.go:500 +0x1a1
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/vendor/github.com/urfave/cli.HandleAction.func1(0xc420049990)
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/vendor/github.com/urfave/cli/app.go:472 +0x29e
8/6/2020 1:42:22 PMpanic(0x770da0, 0xc420018050)
8/6/2020 1:42:22 PM /usr/local/go/src/runtime/panic.go:458 +0x243
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/secrets.rancherSecretGetter.GetSecrets(0xc42000c048, 0x14, 0xc420012058, 0x28, 0xc420012740, 0x34, 0xc4200d4930, 0xc4200c2c20, 0xc42000d1d0, 0x0, ...)
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/secrets/getter.go:48 +0x2e2
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/secrets.(*rancherSecretGetter).GetSecrets(0xc420012780, 0xc42000d1d0, 0xc420012780, 0x0, 0x0, 0x0, 0xc4200001a0)
8/6/2020 1:42:22 PM :1 +0x79
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/secrets.(*FlexVolume).Attach(0xc420019100, 0xc42000d170, 0x380, 0x74ad80, 0xc420028038, 0x0)
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/secrets/volume.go:79 +0x339
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/vendor/github.com/rancher/rancher-flexvol.AttachVol(0xc42008e640, 0xc4200494d8, 0x55b961)
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/vendor/github.com/rancher/rancher-flexvol/attach.go:25 +0x13f
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/vendor/github.com/rancher/rancher-flexvol.handleErr.func1(0xc42008e640, 0x0, 0x0)
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/vendor/github.com/rancher/rancher-flexvol/response.go:52 +0x44
8/6/2020 1:42:22 PMreflect.Value.call(0x762740, 0xc420019130, 0x13, 0x7beecd, 0x4, 0xc420049930, 0x1, 0x1, 0x488f68, 0x7b5c80, ...)
8/6/2020 1:42:22 PM /usr/local/go/src/reflect/value.go:434 +0x5c8
8/6/2020 1:42:22 PMreflect.Value.Call(0x762740, 0xc420019130, 0x13, 0xc420049930, 0x1, 0x1, 0x0, 0x140, 0x140)
8/6/2020 1:42:22 PM /usr/local/go/src/reflect/value.go:302 +0xa4
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/vendor/github.com/urfave/cli.HandleAction(0x762740, 0xc420019130, 0xc42008e640, 0x0, 0x0)
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/vendor/github.com/urfave/cli/app.go:481 +0x1e0
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/vendor/github.com/urfave/cli.Command.Run(0x7bf6ee, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c303b, 0x12, 0x0, ...)
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/vendor/github.com/urfave/cli/command.go:186 +0xc26
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/vendor/github.com/urfave/cli.(*App).Run(0xc4200c6000, 0xc42000c120, 0x3, 0x3, 0x0, 0x0)
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/vendor/github.com/urfave/cli/app.go:235 +0x60c
8/6/2020 1:42:22 PMmain.main()
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/main.go:18 +0xb5
8/6/2020 1:42:22 PMtime="2020-08-06T05:42:22Z" level=error msg="Failed to attach, opts==
secrets-flexvol/secrets/getter.go
Line 28 in 63806ab
This line brings bug, when rancher url contents v1, e.g https://rancher-v1.example.com/ the secret drive will crashes, as the url will be replaced to https://rancher-v2-beta.example.com/ which is not resolvable.
goroutine 1 [running]:
8/6/2020 1:42:22 PMpanic(0x770da0, 0xc420018050)
8/6/2020 1:42:22 PM /usr/local/go/src/runtime/panic.go:500 +0x1a1
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/vendor/github.com/urfave/cli.HandleAction.func1(0xc420049990)
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/vendor/github.com/urfave/cli/app.go:472 +0x29e
8/6/2020 1:42:22 PMpanic(0x770da0, 0xc420018050)
8/6/2020 1:42:22 PM /usr/local/go/src/runtime/panic.go:458 +0x243
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/secrets.rancherSecretGetter.GetSecrets(0xc42000c048, 0x14, 0xc420012058, 0x28, 0xc420012740, 0x34, 0xc4200d4930, 0xc4200c2c20, 0xc42000d1d0, 0x0, ...)
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/secrets/getter.go:48 +0x2e2
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/secrets.(*rancherSecretGetter).GetSecrets(0xc420012780, 0xc42000d1d0, 0xc420012780, 0x0, 0x0, 0x0, 0xc4200001a0)
8/6/2020 1:42:22 PM :1 +0x79
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/secrets.(*FlexVolume).Attach(0xc420019100, 0xc42000d170, 0x380, 0x74ad80, 0xc420028038, 0x0)
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/secrets/volume.go:79 +0x339
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/vendor/github.com/rancher/rancher-flexvol.AttachVol(0xc42008e640, 0xc4200494d8, 0x55b961)
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/vendor/github.com/rancher/rancher-flexvol/attach.go:25 +0x13f
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/vendor/github.com/rancher/rancher-flexvol.handleErr.func1(0xc42008e640, 0x0, 0x0)
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/vendor/github.com/rancher/rancher-flexvol/response.go:52 +0x44
8/6/2020 1:42:22 PMreflect.Value.call(0x762740, 0xc420019130, 0x13, 0x7beecd, 0x4, 0xc420049930, 0x1, 0x1, 0x488f68, 0x7b5c80, ...)
8/6/2020 1:42:22 PM /usr/local/go/src/reflect/value.go:434 +0x5c8
8/6/2020 1:42:22 PMreflect.Value.Call(0x762740, 0xc420019130, 0x13, 0xc420049930, 0x1, 0x1, 0x0, 0x140, 0x140)
8/6/2020 1:42:22 PM /usr/local/go/src/reflect/value.go:302 +0xa4
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/vendor/github.com/urfave/cli.HandleAction(0x762740, 0xc420019130, 0xc42008e640, 0x0, 0x0)
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/vendor/github.com/urfave/cli/app.go:481 +0x1e0
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/vendor/github.com/urfave/cli.Command.Run(0x7bf6ee, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c303b, 0x12, 0x0, ...)
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/vendor/github.com/urfave/cli/command.go:186 +0xc26
8/6/2020 1:42:22 PMgithub.com/rancher/secrets-flexvol/vendor/github.com/urfave/cli.(*App).Run(0xc4200c6000, 0xc42000c120, 0x3, 0x3, 0x0, 0x0)
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/vendor/github.com/urfave/cli/app.go:235 +0x60c
8/6/2020 1:42:22 PMmain.main()
8/6/2020 1:42:22 PM /go/src/github.com/rancher/secrets-flexvol/main.go:18 +0xb5
8/6/2020 1:42:22 PMtime="2020-08-06T05:42:22Z" level=error msg="Failed to attach, opts==