Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

argo-rollouts lint 1.3.0 segfaults when there's a VirtualService specified #2322

Closed
2 tasks done
bitti opened this issue Oct 12, 2022 · 2 comments · Fixed by #2324
Closed
2 tasks done

argo-rollouts lint 1.3.0 segfaults when there's a VirtualService specified #2322

bitti opened this issue Oct 12, 2022 · 2 comments · Fixed by #2324
Labels
bug Something isn't working

Comments

@bitti
Copy link

bitti commented Oct 12, 2022

Checklist:

  • I've included steps to reproduce the bug.
  • I've inclued the version of argo rollouts.

Describe the bug

Since the last two versions or so, I can't lint manifest which contain a VirtualService together with a Rollout anymore, because I get a segfault.

To Reproduce

Minimal example:

kubectl argo rollouts lint -f /dev/stdin <<EOF
---
# Source: service/templates/deployment.yaml
apiVersion: argoproj.io/v1alpha1
kind: Rollout
---
# Source: service/templates/virtualservice.yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
EOF

Output

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x26b42bc]

goroutine 1 [running]:
github.com/argoproj/argo-rollouts/pkg/kubectl-argo-rollouts/cmd/lint.setVirtualServiceManagedAnnotation({0xc00017a600?, 0x1, 0x100d0e5?}, {{0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, {0x0, ...}, ...})
	/go/src/github.com/argoproj/argo-rollouts/pkg/kubectl-argo-rollouts/cmd/lint/lint.go:292 +0xbc
github.com/argoproj/argo-rollouts/pkg/kubectl-argo-rollouts/cmd/lint.(*LintOptions).lintResource(0x0?, {0x2090fa540?, 0x0?})
	/go/src/github.com/argoproj/argo-rollouts/pkg/kubectl-argo-rollouts/cmd/lint/lint.go:120 +0x7f0
github.com/argoproj/argo-rollouts/pkg/kubectl-argo-rollouts/cmd/lint.NewCmdLint.func1(0xc000140f00?, {0xc00041e580?, 0x2?, 0x2?})
	/go/src/github.com/argoproj/argo-rollouts/pkg/kubectl-argo-rollouts/cmd/lint/lint.go:56 +0x37
github.com/spf13/cobra.(*Command).execute(0xc000140f00, {0xc00041e560, 0x2, 0x2})
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:872 +0x694
github.com/spf13/cobra.(*Command).ExecuteC(0xc000140000)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:990 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:918
main.main()
	/go/src/github.com/argoproj/argo-rollouts/cmd/kubectl-argo-rollouts/main.go:21 +0x9a

Expected behavior

No crash but linting results.

Version

Happens both on macOS ARM (with x86_64 executable) and Linux AMD64 (I didn't test other systems).

$ kubectl argo rollouts version
kubectl-argo-rollouts: v1.3.0+93ed7a4
  BuildDate: 2022-09-19T02:51:42Z
  GitCommit: 93ed7a497b021051bf6845da90907d67c231e703
  GitTreeState: clean
  GoVersion: go1.18.6
  Compiler: gc
  Platform: darwin/amd64
$ kubectl argo rollouts version
kubectl-argo-rollouts: v1.3.0+93ed7a4
  BuildDate: 2022-09-19T02:46:42Z
  GitCommit: 93ed7a497b021051bf6845da90907d67c231e703
  GitTreeState: clean
  GoVersion: go1.18.6
  Compiler: gc
  Platform: linux/amd64

Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

@bitti bitti added the bug Something isn't working label Oct 12, 2022
@zachaller
Copy link
Collaborator

Can you provide your full rollout object i think I have an idea on what is going on but I would like to view a more valid rollout object as well?

@bitti
Copy link
Author

bitti commented Oct 13, 2022

Can you provide your full rollout object i think I have an idea on what is going on but I would like to view a more valid rollout object as well?

Why should that matter, if it's invalid I should just get a validation error? I'd need to scrub the full rollout from any company sensitive data, which is additional work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants