You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/01/11 10:18:53 UTC

[GitHub] [apisix] membphis commented on a change in pull request #3129: feat: support linux "resolv.conf" file resolve process

membphis commented on a change in pull request #3129:
URL: https://github.com/apache/apisix/pull/3129#discussion_r554942722



##########
File path: apisix/init.lua
##########
@@ -52,7 +52,7 @@ local function parse_args(args)
     dns_resolver = args and args["dns_resolver"]
     local options = {
         nameservers = dns_resolver,
-        timeout = 5000,
+        timeout = 2000,

Review comment:
       why do we need to change this?

##########
File path: apisix/cli/ops.lua
##########
@@ -105,6 +105,7 @@ local function local_dns_resolver(file_path)
     for line in file:lines() do
         local addr, n = line:gsub("^nameserver%s+(%d+%.%d+%.%d+%.%d+)%s*$", "%1")
         if n == 1 then
+            io.stderr:write("DNS: ",addr,"\n")

Review comment:
       why do we use `io.stderr` here? is it an error case?




----------------------------------------------------------------
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:
users@infra.apache.org