weizhouapache commented on PR #56:
URL:
https://github.com/apache/cloudstack-kubernetes-provider/pull/56#issuecomment-1900486299
@Pearl1594
I tested with CKS cluster deployment and nginx deployment/service.
without this change
```
E0119 13:23:09.742798 1 controller.go:244] error processing service
default/nginx-service (will retry): failed to ensure load balancer: error
creating new firewall rule for public IP cd17cbc3-538a-439b-b7a0-4f493d8443f5,
proto tcp, port 80, allowed [0.0.0.0/0]: CloudStack API error 431
(CSExceptionErrorCode: 9999): There is no new provider for IP 10.0.53.175 of
service Firewall!
```
with this change, it crashed at line 166
```
I0119 14:05:45.321563 1 event.go:294] "Event occurred"
object="default/nginx-service" fieldPath="" kind="Service" apiVersion="v1"
type="Normal" reason="EnsuringLoadBalancer" message="Ensuring load balancer"
E0119 14:05:52.775883 1 runtime.go:79] Observed a panic: "invalid
memory address or nil pointer dereference" (runtime error: invalid memory
address or nil pointer dereference)
goroutine 299 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic({0x1d8c880?, 0x33f2140})
/go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:75
+0x99
k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0xc0007756e0?})
/go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:49
+0x75
panic({0x1d8c880, 0x33f2140})
/usr/local/go/src/runtime/panic.go:884 +0x212
github.com/apache/cloudstack-go/v2/cloudstack.(*NetworkService).GetNetworkByID(0xc00041dce0,
{0xc0005cdb30, 0x24}, {0xc000012fc0, 0x1, 0x50?})
/go/pkg/mod/github.com/apache/cloudstack-go/[email protected]/cloudstack/NetworkService.go:3557
+0x1b6
github.com/apache/cloudstack-kubernetes-provider.(*CSCloud).EnsureLoadBalancer(0xc0004a7980,
{0xc00068f800?, 0x21fca68?}, {0x20f7fd6, 0xa}, 0xc0007b6000, {0xc000012db8,
0x1, 0x1})
/go/src/github.com/apache/cloudstack-kubernetes-provider/cloudstack_loadbalancer.go:166
+0x1543
k8s.io/cloud-provider/controllers/service.(*Controller).ensureLoadBalancer(0xc00044d260,
{0x23f4d70, 0xc00065e240}, 0x20f1674?)
/go/pkg/mod/k8s.io/[email protected]/controllers/service/controller.go:459
+0x117
k8s.io/cloud-provider/controllers/service.(*Controller).syncLoadBalancerIfNeeded(0xc00044d260,
{0x23f4d70, 0xc00065e240}, 0xc0007b6000, {0xc00005cd08, 0x15})
/go/pkg/mod/k8s.io/[email protected]/controllers/service/controller.go:414
+0x6cc
k8s.io/cloud-provider/controllers/service.(*Controller).processServiceCreateOrUpdate(0xc00044d260,
{0x23f4d70, 0xc00065e240}, 0xc0007b6000, {0xc00005cd08, 0x15})
/go/pkg/mod/k8s.io/[email protected]/controllers/service/controller.go:346
+0x146
k8s.io/cloud-provider/controllers/service.(*Controller).syncService(0xc00044d260,
{0x23f4d70, 0xc00065e240}, {0xc00005cd08, 0x15})
/go/pkg/mod/k8s.io/[email protected]/controllers/service/controller.go:887
+0x257
k8s.io/cloud-provider/controllers/service.(*Controller).processNextWorkItem(0xc00044d260,
{0x23f4d70, 0xc00065e240})
/go/pkg/mod/k8s.io/[email protected]/controllers/service/controller.go:304
+0x127
k8s.io/cloud-provider/controllers/service.(*Controller).worker(0xc0008e0600?,
{0x23f4d70, 0xc00065e240})
/go/pkg/mod/k8s.io/[email protected]/controllers/service/controller.go:283
+0x39
k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext.func1()
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:190 +0x25
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0x603c86b68e?)
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:157 +0x3e
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0x0?, {0x23d9960,
0xc0008e0600}, 0x1, 0xc00066a300)
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:158 +0xb6
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0x2fea4e8bf0db330b?,
0x3b9aca00, 0x0, 0xe2?, 0x714083b09f70d83c?)
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:135 +0x89
k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext({0x23f4d70,
0xc00065e240}, 0xc00068e7c0, 0xac5c70001ad37c31?, 0x255bd85d5287fd9c?, 0xe2?)
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:190 +0x99
k8s.io/apimachinery/pkg/util/wait.UntilWithContext({0x23f4d70?,
0xc00065e240?}, 0x0?, 0x0?)
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:101 +0x2b
created by k8s.io/cloud-provider/controllers/service.(*Controller).Run
/go/pkg/mod/k8s.io/[email protected]/controllers/service/controller.go:241
+0x246
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=0x193b676]
goroutine 299 [running]:
k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0xc0007756e0?})
/go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:56
+0xd7
panic({0x1d8c880, 0x33f2140})
/usr/local/go/src/runtime/panic.go:884 +0x212
github.com/apache/cloudstack-go/v2/cloudstack.(*NetworkService).GetNetworkByID(0xc00041dce0,
{0xc0005cdb30, 0x24}, {0xc000012fc0, 0x1, 0x50?})
/go/pkg/mod/github.com/apache/cloudstack-go/[email protected]/cloudstack/NetworkService.go:3557
+0x1b6
github.com/apache/cloudstack-kubernetes-provider.(*CSCloud).EnsureLoadBalancer(0xc0004a7980,
{0xc00068f800?, 0x21fca68?}, {0x20f7fd6, 0xa}, 0xc0007b6000, {0xc000012db8,
0x1, 0x1})
/go/src/github.com/apache/cloudstack-kubernetes-provider/cloudstack_loadbalancer.go:166
+0x1543
k8s.io/cloud-provider/controllers/service.(*Controller).ensureLoadBalancer(0xc00044d260,
{0x23f4d70, 0xc00065e240}, 0x20f1674?)
/go/pkg/mod/k8s.io/[email protected]/controllers/service/controller.go:459
+0x117
k8s.io/cloud-provider/controllers/service.(*Controller).syncLoadBalancerIfNeeded(0xc00044d260,
{0x23f4d70, 0xc00065e240}, 0xc0007b6000, {0xc00005cd08, 0x15})
/go/pkg/mod/k8s.io/[email protected]/controllers/service/controller.go:414
+0x6cc
k8s.io/cloud-provider/controllers/service.(*Controller).processServiceCreateOrUpdate(0xc00044d260,
{0x23f4d70, 0xc00065e240}, 0xc0007b6000, {0xc00005cd08, 0x15})
/go/pkg/mod/k8s.io/[email protected]/controllers/service/controller.go:346
+0x146
k8s.io/cloud-provider/controllers/service.(*Controller).syncService(0xc00044d260,
{0x23f4d70, 0xc00065e240}, {0xc00005cd08, 0x15})
/go/pkg/mod/k8s.io/[email protected]/controllers/service/controller.go:887
+0x257
k8s.io/cloud-provider/controllers/service.(*Controller).processNextWorkItem(0xc00044d260,
{0x23f4d70, 0xc00065e240})
/go/pkg/mod/k8s.io/[email protected]/controllers/service/controller.go:304
+0x127
k8s.io/cloud-provider/controllers/service.(*Controller).worker(0xc0008e0600?,
{0x23f4d70, 0xc00065e240})
/go/pkg/mod/k8s.io/[email protected]/controllers/service/controller.go:283
+0x39
k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext.func1()
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:190 +0x25
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0x603c86b68e?)
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:157 +0x3e
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0x0?, {0x23d9960,
0xc0008e0600}, 0x1, 0xc00066a300)
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:158 +0xb6
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0x2fea4e8bf0db330b?,
0x3b9aca00, 0x0, 0xe2?, 0x714083b09f70d83c?)
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:135 +0x89
k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext({0x23f4d70,
0xc00065e240}, 0xc00068e7c0, 0xac5c70001ad37c31?, 0x255bd85d5287fd9c?, 0xe2?)
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:190 +0x99
k8s.io/apimachinery/pkg/util/wait.UntilWithContext({0x23f4d70?,
0xc00065e240?}, 0x0?, 0x0?)
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:101 +0x2b
created by k8s.io/cloud-provider/controllers/service.(*Controller).Run
/go/pkg/mod/k8s.io/[email protected]/controllers/service/controller.go:241
+0x246
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]