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

fix(vmop): fix panic if VM is not exist #129

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

yaroslavborbat
Copy link
Member

@yaroslavborbat yaroslavborbat commented Jun 13, 2024

Description

Fix panic in UpdateStatus for non existing VM

Why do we need it, and what problem does it solve?

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

goroutine 459 [running]:
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
        /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:116 +0x1fa
panic({0x1923d80, 0x2b55c10})
        /usr/local/go/src/runtime/panic.go:884 +0x213
github.com/deckhouse/virtualization-controller/pkg/controller/vmop.(*Reconciler).UpdateStatus(0xc000297c10?, {0x1e3c078?, 0xc002a8e3c0?}, {{{0xc000297c10?, 0x1e4f0f8?}, {0xc0006406c0?, 0x1e23f20?}}}, 0xc002a8e3f0, {{0x1e442e0, 0xc0001897a0}, ...})
        /usr/local/go/src/virtualization-controller/pkg/controller/vmop/vmop_reconciler.go:172 +0xa10

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Signed-off-by: yaroslavborbat <[email protected]>
@fl64 fl64 changed the title fix(vmop): fix panic if vm is not exist fix(vmop): fix panic if VM is not exist Jun 13, 2024
@yaroslavborbat yaroslavborbat merged commit 9b90641 into main Jun 13, 2024
20 of 26 checks passed
@yaroslavborbat yaroslavborbat deleted the fix/vmop/fix-panic-if-vm-not-exist branch June 13, 2024 13:05
universal-itengineer pushed a commit that referenced this pull request Jun 13, 2024
Description
Fix panic in UpdateStatus for non existing VM

Signed-off-by: yaroslavborbat <[email protected]>
(cherry picked from commit 9b90641)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants