You are viewing a plain text version of this content. The canonical link for it is here.
Posted to infrastructure-issues@apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2015/09/03 13:25:46 UTC

[jira] [Created] (INFRA-10242) closer.lua: can fail if mirrors.list isn't updated every day

Sebb created INFRA-10242:
----------------------------

             Summary: closer.lua: can fail if mirrors.list isn't updated every day
                 Key: INFRA-10242
                 URL: https://issues.apache.org/jira/browse/INFRA-10242
             Project: Infrastructure
          Issue Type: Bug
            Reporter: Sebb


closer.lua only processes mirrors that have a last updated date in the last 24 hours. The date is taken from the mirrors.list file, so if that is not updated for a day then no mirrors will match - not even the backup ones.

If no backup mirrors are found, then the script currently fails with:

lua: ./closer.lua:114: attempt to index a nil value (local 'bmap')
stack traceback:
	./closer.lua:114: in function 'handle'


The previous version of the script (mirrors.cgi) took a different approach.
It checked the date of mirrors.list, and only considered mirrors that were more than a day old relative to the date of the file. It also ignored the date for the backup mirrors, so these always matched.

There are several issues here:
1) backup mirrors should not be subject to the staleness check
2) if no backup mirrors are found, the code should not crash
3) the staleness check needs to consider the date when the liveness data was last update

Patch to follow



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)