-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
Quality / Stability / Reliability
-
False
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description:{}
Summary:{}
The observability-operator controller crashes with a nil pointer dereference panic when an ObservabilityInstaller resource is created with an empty spec (spec: {}). The controller should handle empty specs gracefully and treat them as disabled capabilities.
Steps to Reproduce:{}
1. Create an ObservabilityInstaller with empty spec:
apiVersion: observability.openshift.io/v1alpha1
kind: ObservabilityInstaller
metadata:
name: test-empty-spec
namespace: observability-operator
spec: {}
2. Apply the resource to the cluster
3. Check the operator logs
Expected Behavior:{}
- Resource should be created successfully
- Controller should handle empty spec gracefully
- tracing.enabled should default to false
- No operator components should be deployed
- Controller should not panic
Actual Behavior:{}
- Resource is created successfully
- Controller immediately panics with runtime error: invalid memory address or nil pointer dereference
- Panic occurs at tempo_components.go:34 in the tempoStack() function
- Controller enters infinite panic/recovery loop
- Stack trace shows nil pointer access when trying to read instance.Spec.Capabilities.Tracing.Storage.ObjectStorageSpec
Root Cause:{}
The getReconcilers() function calls tempoStack(instance) without checking if instance.Spec.Capabilities is nil. When spec: {} is provided, Capabilities is nil, but the code assumes it's always present.
Error Details:{}
panic: runtime error: invalid memory address or nil pointer dereferenc at github.com/rhobs/observability-operator/pkg/controllers/observability.tempoStack(0xc000cb8420) /workspace/pkg/controllers/observability/tempo{}components.go:34 +0xd6{_}