Fix DNS failures in L4 services
This commit is contained in:
parent
f527441319
commit
f6aded2c51
3 changed files with 103 additions and 6 deletions
|
|
@ -1,9 +1,7 @@
|
|||
-- this is the Lua representation of TCP/UDP Configuration
|
||||
local tcp_udp_configuration_data = ngx.shared.tcp_udp_configuration_data
|
||||
|
||||
local _M = {
|
||||
nameservers = {}
|
||||
}
|
||||
local _M = {}
|
||||
|
||||
function _M.get_backends_data()
|
||||
return tcp_udp_configuration_data:get("backends")
|
||||
|
|
|
|||
|
|
@ -689,12 +689,19 @@ stream {
|
|||
-- init modules
|
||||
local ok, res
|
||||
|
||||
ok, res = pcall(require, "configuration")
|
||||
if not ok then
|
||||
error("require failed: " .. tostring(res))
|
||||
else
|
||||
configuration = res
|
||||
configuration.nameservers = { {{ buildResolversForLua $cfg.Resolver $cfg.DisableIpv6DNS }} }
|
||||
end
|
||||
|
||||
ok, res = pcall(require, "tcp_udp_configuration")
|
||||
if not ok then
|
||||
error("require failed: " .. tostring(res))
|
||||
else
|
||||
tcp_udp_configuration = res
|
||||
tcp_udp_configuration.nameservers = { {{ buildResolversForLua $cfg.Resolver $cfg.DisableIpv6DNS }} }
|
||||
end
|
||||
|
||||
ok, res = pcall(require, "tcp_udp_balancer")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue