fix(tencent-cloud-cls): DNS parsing failure#9843
Conversation
| local ip_list = {} | ||
| for _, v in ipairs(resolved.ip) do | ||
| insert_tab(ip_list, v) | ||
| if not resolved.ip then |
There was a problem hiding this comment.
There was a problem hiding this comment.
The original code used socket.dns.topip, I didn't modify it. What is the difference between these two methods?
There was a problem hiding this comment.
You could check the logic between the two functions, we always use parse_domain, maybe it will resolve the problem of the socket.dns.toip occasionally returns nil
There was a problem hiding this comment.
It seems can't resolve this problem.
# Failed test 't/plugin/tencent-cloud-cls.t TEST 10: log use log_format - pattern "[error]" should not match any line in error.log but matches line "2023/07/18 21:16:48 [error] 28051\#33045887: *50 [lua] resolver.lua:80: parse_domain(): failed to parse domain: jiangfuchengdeMacBook-Pro.local, error: failed to query the DNS server: dns server error: 3 name error, context: ngx.timer, client: 127.0.0.1, server: 0.0.0.0:1984" (req 0)
If we can't merge this temporary fix, I will investigate the reasons for the failure.
There was a problem hiding this comment.
This pr is ok, but we need to know the reason
There was a problem hiding this comment.
@jiangfucheng do you have any update for this ?
There was a problem hiding this comment.
Sorry, there is currently no conclusion yet.
|
@jiangfucheng Any updates? |
|
Could you add a test case to cover this? You could hack the function |
Added, thanks. |
* upstream/master: (77 commits) docs: Update admin-api.md (apache#10056) ci: fix a bug that can not open nginx.pid (apache#10061) feat: remove rust dependency by rollback lua-resty-ldap on master (apache#9936) docs: fix grpc-transcode.md error (apache#10059) feat: upgrade lua dependencies (apache#10051) fix: rollback lua-resty-session to 3.10 (apache#10046) feat: upgrade resty-redis-cluster from 1.02-4->1.05-1 (apache#10041) feat: update lua library (apache#10037) fix: worker not exited when executing quit or reload command (apache#9909) fix: traffic split plugin not validating upstream_id (apache#10008) ci: update the timeout value in cli.yml (apache#10026) fix(tencent-cloud-cls): DNS parsing failure (apache#9843) chore(deps): bump actions/setup-node from 3.7.0 to 3.8.0 (apache#10025) feat(openid-connect): add proxy_opts attribute (apache#9948) perf(log-rotate): replace string.sub with string.byte (apache#9984) fix(ci): replace github action in update-labels.yml (apache#9987) fix: can't sync etcd data if key has special character (apache#9967) perf(aws-lambda): cache the index of the array (apache#9944) fix: add support for dependency installation on endeavouros (apache#9985) chore(ci): automate management of unresponded issues (apache#9927) ...
Description
Fixes #9842
Checklist