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

bug: Operator fails with SIGSEGV while trying to create datastreams service without SA key #241

Open
mvgorbunov opened this issue Aug 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mvgorbunov
Copy link
Contributor

ydb-kubernetes-operator v0.5.22

Trying to create datastreams service without IAM SA key (just enable service in database specification)

spec:
  configuration: ""
  storageEndpoint: ""
  domain: dev
  resources:
    containerResources:
      limits:
        memory: 16Gi
      requests:
        cpu: 8
        memory: 16Gi
    storageUnits:
      - count: 1
        unitKind: ssd
  image:
    tag: "24.1.18-stream-nb-1.2"
    pullSecret: ydb-cr-puller
  nodes: 3
  datastreams:
    enabled: true

Operator gets crashed in reconcile loop:

2024-08-09T16:07:08Z	INFO	Observed a panic in reconciler: runtime error: invalid memory address or nil pointer dereference	{"controller": "database", "controllerGroup": "ydb.tech", "controllerKind": "Database", "Database": {"name":"stunder-test","namespace":"ydb-dev"}, "namespace": "ydb-dev", "name": "stunder-test", "reconcileID": "90537b9a-d16f-428e-933b-f0c3171a0db2"}
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=0x0 pc=0x18c48d8]

goroutine 645 [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:119 +0x1fa
panic({0x1b33ce0, 0x2fe20b0})
	/usr/local/go/src/runtime/panic.go:884 +0x213
github.com/ydb-platform/ydb-kubernetes-operator/internal/resources.(*DatabaseStatefulSetBuilder).buildDatastreamsIAMServiceAccountKeyVolume(...)
	/workspace/internal/resources/database_statefulset.go:380
github.com/ydb-platform/ydb-kubernetes-operator/internal/resources.(*DatabaseStatefulSetBuilder).buildVolumes(0xc00cc41620)
	/workspace/internal/resources/database_statefulset.go:186 +0xd38
github.com/ydb-platform/ydb-kubernetes-operator/internal/resources.(*DatabaseStatefulSetBuilder).buildPodTemplateSpec(_)
	/workspace/internal/resources/database_statefulset.go:106 +0x85
github.com/ydb-platform/ydb-kubernetes-operator/internal/resources.(*DatabaseStatefulSetBuilder).Build(0xc00cc41620, {0x20f7200?, 0xc00c89ea00})
	/workspace/internal/resources/database_statefulset.go:63 +0x245
github.com/ydb-platform/ydb-kubernetes-operator/internal/controllers/database.(*Reconciler).handleResourcesSync.func1()
	/workspace/internal/controllers/database/sync.go:394 +0x5e
github.com/ydb-platform/ydb-kubernetes-operator/internal/resources.mutate(0xc00c89ea00?, {{0xc000e8c1c0?, 0x20e9188?}, {0xc000e8c190?, 0x20f7200?}}, {0x20f7200, 0xc00c89ea00})
	/workspace/internal/resources/resource.go:92 +0x55
github.com/ydb-platform/ydb-kubernetes-operator/internal/resources.CreateOrUpdateOrMaybeIgnore({0x20dd160, 0xc00cbc7290}, {0x20e9188, 0xc0003828a0}, {0x20f7200?, 0xc00c89ea00}, 0x0?, 0xc0007f5a68)
	/workspace/internal/resources/resource.go:165 +0x10a
github.com/ydb-platform/ydb-kubernetes-operator/internal/controllers/database.(*Reconciler).handleResourcesSync(0xc00095eb90, {0x20dd160, 0xc00cbc7290}, 0xc00cbbf690)
	/workspace/internal/controllers/database/sync.go:391 +0x2e5
github.com/ydb-platform/ydb-kubernetes-operator/internal/controllers/database.(*Reconciler).Sync(0x0?, {0x20dd160, 0xc00cbc7290}, 0x0?)
	/workspace/internal/controllers/database/sync.go:46 +0xf6
github.com/ydb-platform/ydb-kubernetes-operator/internal/controllers/database.(*Reconciler).Reconcile(0xc00095eb90, {0x20dd160, 0xc00cbc7290}, {{{0xc00133b406?, 0x0?}, {0xc00133b410?, 0x40de67?}}})
	/workspace/internal/controllers/database/controller.go:74 +0x214
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0x20dd160?, {0x20dd160?, 0xc00cbc7290?}, {{{0xc00133b406?, 0x1a836c0?}, {0xc00133b410?, 0x40f926?}}})
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:122 +0xc8
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc000319040, {0x20dd0b8, 0xc00095eaf0}, {0x1bcc7c0?, 0xc0003901a0?})
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:323 +0x377
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc000319040, {0x20dd0b8, 0xc00095eaf0})
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:274 +0x1d9
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:235 +0x85
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:231 +0x587
@mvgorbunov mvgorbunov added the bug Something isn't working label Aug 12, 2024
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

No branches or pull requests

1 participant