From 3af7bf49de68f745876fb26392e013c873a1a8f7 Mon Sep 17 00:00:00 2001
From: onefang
Date: Fri, 28 Jan 2022 05:58:19 +1000
Subject: Include DNSRR: maybe in the DNSRR checks.
---
apt-panopticon-report-email-web.lua | 25 ++++++++++++++-----------
apt-panopticon.lua | 2 +-
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua
index 071771b..2b29cdf 100755
--- a/apt-panopticon-report-email-web.lua
+++ b/apt-panopticon-report-email-web.lua
@@ -202,11 +202,11 @@ local DNSrrTest = function(hosts, k)
space = ' '
no = "no"
end
- if (APT.options.roundRobin.value ~= k) and (nil ~= hosts[APT.options.roundRobin.value]) and (nil ~= hosts[k].IPs) then
+ if (APT.options.roundRobin.value ~= k) and (nil ~= hosts[APT.options.roundRobin.value]) and (nil ~= hosts[k].IPs) and ("no" ~= hosts[k].DNSRR) then
APT.allpairs(hosts[k].IPs,
function(i, w, k, v)
- if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname.value] then
- if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname.value][i] then
+-- if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname.value] then
+-- if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname.value][i] then
local log = logCount(APT.options.roundRobin.value, i)
local inRR = "✅"
if nil ~= log:find("❌" end
@@ -218,12 +218,12 @@ local DNSrrTest = function(hosts, k)
if APT.html then i = "" .. i .. "" end
dns = dns .. inRR .. i
end
- end
- end
+-- end
+-- end
end
)
- if "" == dns then dns = no end
end
+ if "" == dns then dns = no end
return dns
end
@@ -321,7 +321,8 @@ local makeTable = function(web, hosts)
week = '
' .. percentUp .. '% up | ' .. percentUpdated .. '% updated | '
-- if ('100.00' ~= percentUp) or ('100.00' ~= percentUpdated) then inRR = "❌" end
end
- if "yes" ~= hosts[k].DNSRR then inRR = " " end
+ if "maybe" == hosts[k].DNSRR then inRR = "❓" end
+ if "no" == hosts[k].DNSRR then inRR = " " end
web:write("" .. ftp .. " | " .. http .. " | " .. https .. " | " .. rsync .. " | " .. inRR .. " " .. dns ..
" | " .. protocol .. " | " .. redirects .. " | " .. sanity .. " | " .. integrity .. " | " .. '' .. rate ..
@@ -370,7 +371,7 @@ local makeIPlist = function(hosts)
if (APT.testing("IPv6") and ("AAAA" == u)) or ("A" == u) then
local inRR = ""
local lc = logCount(k, i)
- if checkRR and ('yes' == hosts[k].DNSRR) then
+ if checkRR and ('no' ~= hosts[k].DNSRR) then
-- If there where errors, warnings, or timeouts, then it'll have that wrapped in font tags.
inRR = "✅"
if nil ~= lc:find("❓" end
+ if "no" == hosts[k].DNSRR then inRR = "" end
local log = '[graphs] '
if "" == log then n[l][i] = u else n[l][log .. inRR .. ' ' .. revDNS(hosts, k, i) .. ' ' .. lc] = u end
end
@@ -394,7 +396,7 @@ local makeIPlist = function(hosts)
if (APT.testing("IPv6") and ("AAAA" == w)) or ("A" == w) then
local inRR = ""
local lc = logCount(k, l)
- if checkRR and ('yes' == hosts[k].DNSRR) then
+ if checkRR and ('no' ~= hosts[k].DNSRR) then
-- If there where errors, warnings, or timeouts, then it'll have that wrapped in font tags.
inRR = "✅"
if nil ~= lc:find("❓" end
+ if "no" == hosts[k].DNSRR then inRR = "" end
local log = '[graphs] '
if "" == log then n[l] = w else n[log .. inRR .. ' ' .. revDNS(hosts, k, l) .. ' ' .. lc] = w end
end
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index cf40ce4..83f119a 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -195,7 +195,7 @@ gatherIPs = function (host)
-- If this is the DNS-RR domain name, gather the IPs for the mirrors that mirror_list.txt says should be in it.
if host == APT.options.roundRobin.value then
for k, m in pairs(APT.mirrors) do
- if "yes" == m.DNSRR then
+ if ("yes" == m.DNSRR) or ("maybe" == m.DNSRR) then
gatherIPs(m.FQDN)
IP[host][m.FQDN] = IP[m.FQDN]
-- Strip them out so we don't test them twice.
--
cgit v1.1
|