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

request help: start failed #1267

Closed
xiangtianyu opened this issue Aug 24, 2022 · 10 comments
Closed

request help: start failed #1267

xiangtianyu opened this issue Aug 24, 2022 · 10 comments
Labels
question Further information is requested

Comments

@xiangtianyu
Copy link
Contributor

Issue description

I used 1.4.1 in our test env, and met the same problem with #1165 , so i cherry pick the fix merge #1191 into our branch (1.4.1) and when we start, it failed with such error :

I0824 14:10:16.460432       1 leaderelection.go:248] attempting to acquire leader lease apisix/ingress-apisix-leader...
I0824 14:10:16.503746       1 leaderelection.go:258] successfully acquired lease apisix/ingress-apisix-leader
I0824 14:10:20.313336       1 request.go:601] Waited for 1.00022017s due to client-side throttling, not priority and fairness, request: GET:https://10.2.0.1:443/apis/apisix.apache.org/v2beta3/namespaces/nuanwa/apisixroutes
I0824 14:10:30.512912       1 request.go:601] Waited for 5.386238117s due to client-side throttling, not priority and fairness, request: GET:https://10.2.0.1:443/apis/apisix.apache.org/v2beta3/namespaces/6e41e048-1c25-4309-a381-ef87b61875cb/apisixtlses
panic: interface conversion: interface {} is kube.ApisixUpstreamEvent, not string

goroutine 455 [running]:
github.com/apache/apisix-ingress-controller/pkg/ingress.(*apisixUpstreamController).handleSyncErr(0xc003ba2240, {0x17fe1e0?, 0xc002a24800}, {0x1e73e00, 0xc005e60280})
       /build/pkg/ingress/apisix_upstream.go:326 +0x5c7
github.com/apache/apisix-ingress-controller/pkg/ingress.(*apisixUpstreamController).runWorker(0xc003ba2240, {0x1e8ce20, 0xc000474800})
       /build/pkg/ingress/apisix_upstream.go:85 +0x92
created by github.com/apache/apisix-ingress-controller/pkg/ingress.(*apisixUpstreamController).run
       /build/pkg/ingress/apisix_upstream.go:71 +0x2de

And then i found a similar fix #1192 ,and then cherry picked the merge, but when i have an another try,it still failed. Is this a bug?

Environment

  • your apisix-ingress-controller version (output of apisix-ingress-controller version --long):
  • your Kubernetes cluster version (output of kubectl version):
  • if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a):
@AlinsRan
Copy link
Contributor

Let me take a look at this code. /build/pkg/ingress/apisix_upstream.go:326

@AlinsRan
Copy link
Contributor

AlinsRan commented Aug 24, 2022

You should use apisix-ingress-controller 1.5.0-rc1 verson. This v2 version supports the introduction of. Those PR are dependent.

@tao12345666333
Copy link
Member

In fact, this is due to your incomplete cherry-pick of all its dependencies. I suggest you to use the current 1.5.0-rc1 version directly

@tao12345666333 tao12345666333 added the wontfix This will not be worked on label Aug 24, 2022
@xiangtianyu
Copy link
Contributor Author

You should use apisix-ingress-controller 1.5.0-rc1 verson. This v2 version supports the introduction of. Those PR are dependent.

line 326 is "zap.String("ApisixUpstream", event.Object.(string)),"

func (c *apisixUpstreamController) handleSyncErr(obj interface{}, err error) {
	if err == nil {
		c.workqueue.Forget(obj)
		c.controller.MetricsCollector.IncrSyncOperation("upstream", "success")
		return
	}

	event := obj.(*types.Event)
	if k8serrors.IsNotFound(err) && event.Type != types.EventDelete {
		log.Infow("sync ApisixUpstream but not found, ignore",
			zap.String("event_type", event.Type.String()),
			zap.String("ApisixUpstream", event.Object.(string)),
		)
		c.workqueue.Forget(event)
		return
	}
	log.Warnw("sync ApisixUpstream failed, will retry",
		zap.Any("object", obj),
		zap.Error(err),
	)
	c.workqueue.AddRateLimited(obj)
	c.controller.MetricsCollector.IncrSyncOperation("upstream", "failure")
}

@xiangtianyu
Copy link
Contributor Author

In fact, this is due to your incomplete cherry-pick of all its dependencies. I suggest you to use the current 1.5.0-rc1 version directly

I've followed this task #1194 , and the task "a new Helm chart release" was marked as done

@AlinsRan
Copy link
Contributor

There is indeed this problem. Do you want to try to fix it?

@xiangtianyu
Copy link
Contributor Author

There is indeed this problem. Do you want to try to fix it?

Actually, i have no idea about this :(

@AlinsRan
Copy link
Contributor

OK, I'll fix it right away.

@AlinsRan
Copy link
Contributor

Thank you for your feedback. #1268

@tao12345666333 tao12345666333 added question Further information is requested and removed wontfix This will not be worked on labels Aug 25, 2022
@tao12345666333
Copy link
Member

#1268 has been merged. I think we can close this one. If your question still not resovled, feel free to reopen it and reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants