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

feat: register lease/cluster/maintanance grpc gateway handlers #31

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

fengxsong
Copy link
Contributor

Since APISIX had remove support for connecting to etcd via grpc connection, and for now apisix-ingress-controller adds an experimental feature that act as an etcd-adapter, when running in this mode, the following error will be reported in the APISIX gateway logs

2024/01/31 07:16:36 [error] 88#88: *1982 lua user thread aborted: runtime error: /usr/local/apisix/apisix/core/etcd.lua:336: attempt to index field 'body' (a nil value)
stack traceback:
coroutine 0:
	/usr/local/apisix/apisix/core/etcd.lua: in function 'set'
	/usr/local/apisix/apisix/plugins/server-info.lua:128: in function 'set'
	/usr/local/apisix/apisix/plugins/server-info.lua:192: in function 'report'
	/usr/local/apisix/apisix/plugins/server-info.lua:292: in function </usr/local/apisix/apisix/plugins/server-info.lua:287>
coroutine 1:
	[C]: in function 'thread_wait'
	/usr/local/apisix/apisix/timers.lua:52: in function </usr/local/apisix/apisix/timers.lua:32>
	[C]: in function 'pcall'
	/usr/local/apisix/apisix/core/timer.lua:40: in function </usr/local/apisix/apisix/core/timer.lua:36>
	[C]: in function 'pcall'
	/usr/local/apisix/apisix/core/timer.lua:63: in function </usr/local/apisix/apisix/core/timer.lua:56>, context: ngx.timer

Looking at the code of APISIX, it will try to request the Lease API of etcdserver.

So it seems that it's better to register the rest grpc gateway handlers as here. (at lease the LeaseHandler)

Signed-off-by: fengxusong <fengxsong@outlook.com>
@CLAassistant
Copy link

CLAassistant commented Jan 31, 2024

CLA assistant check
All committers have signed the CLA.

@fengxsong
Copy link
Contributor Author

Related to apache/apisix-helm-chart#714

@monkeyDluffy6017 monkeyDluffy6017 merged commit 0343aa7 into api7:main Feb 1, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants