Kyle-Cooley opened a new issue #2313:
URL: https://github.com/apache/camel-k/issues/2313
# Steps to Reproduce
1. Install camel k into a fresh environment (no existing
IntegrationPlatforms, IntegrationKits, Integrations)
2. Create the following IntegrationPlatform with the route trait disabled:
```
apiVersion: camel.apache.org/v1
kind: IntegrationPlatform
metadata:
name: camel-k
spec:
build:
maven:
settings: {}
registry: {}
kamelet: {}
resources: {}
traits:
route:
configuration:
enabled: false
```
3. Create the hello world Integration:
```
apiVersion: camel.apache.org/v1
kind: Integration
metadata:
name: hello
namespace: kamel-test
spec:
sources:
- content: |
from('timer:tick?period=3000')
.setBody().constant('Hello world from Camel K')
.to('log:info')
name: hello.groovy
```
4. Observe the camel k operator repeatedly crash with similar output:
```
{"level":"info","ts":1621455577.5915878,"logger":"camel-k.trait","msg":"Apply
trait: quarkus"}
E0519 20:19:37.591935 1 runtime.go:78] Observed a panic: "invalid
memory address or nil pointer dereference" (runtime error: invalid memory
address or nil pointer dereference)
goroutine 1111 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic(0x20e2820, 0x3775320)
k8s.io/[email protected]/pkg/util/runtime/runtime.go:74 +0x95
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
k8s.io/[email protected]/pkg/util/runtime/runtime.go:48 +0x89
panic(0x20e2820, 0x3775320)
runtime/panic.go:969 +0x1b9
github.com/apache/camel-k/pkg/trait.(*routeTrait).Configure(0xc001da4750,
0xc001da3540, 0x0, 0x0, 0x0)
github.com/apache/camel-k/pkg/trait/route.go:85 +0x259
github.com/apache/camel-k/pkg/trait.(*Catalog).apply(0xc0035d1dd0,
0xc001da3540, 0x27fe5e0, 0xc000fbac80)
github.com/apache/camel-k/pkg/trait/trait_catalog.go:109 +0x3b9
github.com/apache/camel-k/pkg/trait.Apply(0x27bfce0, 0xc0035d0e10,
0x27fe5e0, 0xc000fbac80, 0x0, 0xc001d79440, 0x0, 0x0, 0x1a)
github.com/apache/camel-k/pkg/trait/trait.go:46 +0xf0
github.com/apache/camel-k/pkg/controller/integrationkit.(*initializeAction).Handle(0xc001215e00,
0x27bfce0, 0xc0035d0e10, 0xc001d79440, 0xc001aedac8, 0x1, 0x1)
github.com/apache/camel-k/pkg/controller/integrationkit/initialize.go:46 +0x65
github.com/apache/camel-k/pkg/controller/integrationkit.(*reconcileIntegrationKit).Reconcile(0xc000dcc450,
0x27bfce0, 0xc0035d0e10, 0xc003ad1b30, 0xa, 0xc0010a4ca0, 0x18, 0xc001dc6960,
0xc001dc6960, 0x276f9c0, ...)
github.com/apache/camel-k/pkg/controller/integrationkit/integrationkit_controller.go:250
+0xe86
github.com/apache/camel-k/pkg/util/monitoring.(*instrumentedReconciler).Reconcile(0xc000fbad00,
0x27bfce0, 0xc0035d0e10, 0xc003ad1b30, 0xa, 0xc0010a4ca0, 0x18, 0xc0035d0e10,
0x40a43f, 0xc00003a000, ...)
github.com/apache/camel-k/pkg/util/monitoring/controller.go:71 +0xd9
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc00121fea0,
0x27bfc20, 0xc000b877c0, 0x2193700, 0xc001204960)
sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:263
+0x317
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc00121fea0,
0x27bfc20, 0xc000b877c0, 0x0)
sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:235
+0x205
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1.1(0x27bfc20,
0xc000b877c0)
sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:198
+0x4a
k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext.func1()
k8s.io/[email protected]/pkg/util/wait/wait.go:185 +0x37
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0xc000bb8750)
k8s.io/[email protected]/pkg/util/wait/wait.go:155 +0x5f
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc001aedf50, 0x276e100,
0xc0014815f0, 0xc000b87701, 0xc000f78a20)
k8s.io/[email protected]/pkg/util/wait/wait.go:156 +0xad
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc000bb8750, 0x3b9aca00, 0x0,
0x1458201, 0xc000f78a20)
k8s.io/[email protected]/pkg/util/wait/wait.go:133 +0x98
k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext(0x27bfc20,
0xc000b877c0, 0xc000d206b0, 0x3b9aca00, 0x0, 0x1)
k8s.io/[email protected]/pkg/util/wait/wait.go:185 +0xa6
k8s.io/apimachinery/pkg/util/wait.UntilWithContext(0x27bfc20, 0xc000b877c0,
0xc000d206b0, 0x3b9aca00)
k8s.io/[email protected]/pkg/util/wait/wait.go:99 +0x57
created by
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1
sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:195
+0x4e7
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=0x1d22879]
goroutine 1111 [running]:
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
k8s.io/[email protected]/pkg/util/runtime/runtime.go:55 +0x10c
panic(0x20e2820, 0x3775320)
runtime/panic.go:969 +0x1b9
github.com/apache/camel-k/pkg/trait.(*routeTrait).Configure(0xc001da4750,
0xc001da3540, 0x0, 0x0, 0x0)
github.com/apache/camel-k/pkg/trait/route.go:85 +0x259
github.com/apache/camel-k/pkg/trait.(*Catalog).apply(0xc0035d1dd0,
0xc001da3540, 0x27fe5e0, 0xc000fbac80)
github.com/apache/camel-k/pkg/trait/trait_catalog.go:109 +0x3b9
github.com/apache/camel-k/pkg/trait.Apply(0x27bfce0, 0xc0035d0e10,
0x27fe5e0, 0xc000fbac80, 0x0, 0xc001d79440, 0x0, 0x0, 0x1a)
github.com/apache/camel-k/pkg/trait/trait.go:46 +0xf0
github.com/apache/camel-k/pkg/controller/integrationkit.(*initializeAction).Handle(0xc001215e00,
0x27bfce0, 0xc0035d0e10, 0xc001d79440, 0xc001aedac8, 0x1, 0x1)
github.com/apache/camel-k/pkg/controller/integrationkit/initialize.go:46 +0x65
github.com/apache/camel-k/pkg/controller/integrationkit.(*reconcileIntegrationKit).Reconcile(0xc000dcc450,
0x27bfce0, 0xc0035d0e10, 0xc003ad1b30, 0xa, 0xc0010a4ca0, 0x18, 0xc001dc6960,
0xc001dc6960, 0x276f9c0, ...)
github.com/apache/camel-k/pkg/controller/integrationkit/integrationkit_controller.go:250
+0xe86
github.com/apache/camel-k/pkg/util/monitoring.(*instrumentedReconciler).Reconcile(0xc000fbad00,
0x27bfce0, 0xc0035d0e10, 0xc003ad1b30, 0xa, 0xc0010a4ca0, 0x18, 0xc0035d0e10,
0x40a43f, 0xc00003a000, ...)
github.com/apache/camel-k/pkg/util/monitoring/controller.go:71 +0xd9
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc00121fea0,
0x27bfc20, 0xc000b877c0, 0x2193700, 0xc001204960)
sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:263
+0x317
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc00121fea0,
0x27bfc20, 0xc000b877c0, 0x0)
sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:235
+0x205
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1.1(0x27bfc20,
0xc000b877c0)
sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:198
+0x4a
k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext.func1()
k8s.io/[email protected]/pkg/util/wait/wait.go:185 +0x37
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0xc000bb8750)
k8s.io/[email protected]/pkg/util/wait/wait.go:155 +0x5f
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc001aedf50, 0x276e100,
0xc0014815f0, 0xc000b87701, 0xc000f78a20)
k8s.io/[email protected]/pkg/util/wait/wait.go:156 +0xad
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc000bb8750, 0x3b9aca00, 0x0,
0x1458201, 0xc000f78a20)
k8s.io/[email protected]/pkg/util/wait/wait.go:133 +0x98
k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext(0x27bfc20,
0xc000b877c0, 0xc000d206b0, 0x3b9aca00, 0x0, 0x1)
k8s.io/[email protected]/pkg/util/wait/wait.go:185 +0xa6
k8s.io/apimachinery/pkg/util/wait.UntilWithContext(0x27bfc20, 0xc000b877c0,
0xc000d206b0, 0x3b9aca00)
k8s.io/[email protected]/pkg/util/wait/wait.go:99 +0x57
created by
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1
sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:195
+0x4e7
```
# Expected behavior
The user can successfully create an integrationplatform with the route trait
disabled.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]