🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80282

Re: HOWTO change IPs of a productive server, smoothly?

#80282
From: Julien ÉLIE
Date: Sun, 08 Mar 2009 21:27
58 lines
3788 bytes
Hi Michael,

> It would be a nice addon to innfeed, if one could propagate IP changes
> to peers using the established and accepted old IP.

Automatically checking for new IPs would be better...

See ticket #76:
    http://inn.eyrie.org/trac/ticket/76

A long-standing problem with innd is that it stores the DNS lookup
results for everything in incoming.conf when it starts up and then
never rechecks DNS.  Most sites periodically reload incoming.conf
to work around this, but it still breaks the DNS requirement
to honor TTL.

Unfortunately, there's no way to do asynchronous DNS lookups using the
getaddrinfo() interface, which is required to support /etc/hosts and
other non-DNS sources of IP information, and we can't do the blocking
calls since they can block for a long time.

That leaves, as a solution, doing DNS resolution in a child process and
then asynchronously filling in the results.  This will require putting
incoming connections to sleep until the DNS resolution finishes, and
then waking them up to do permission checking.

-=-=-=-

RFC 3977 says:

    If NNTP clients or servers cache the results of host name lookups
    in order to achieve a performance improvement, they MUST observe
    the TTL information reported by DNS.

innd caches DNS lookups when reading incoming.conf and doesn't refresh
its knowledge of DNS except when incoming.conf is reloaded.

Impact:  An explicit reload is required whenever the IP address of any
peer changes, and in the presence of network renumbering innd is
vulnerable to spoofing if DNS is the only authentication mechanism used.

Suggested fix:  This is hard to fix without unacceptable performance
impact.  The only good fix is to either fork a separate helper process
to do DNS lookups (since gethostbyname may block for essentially
an arbitrarily long period) or to use the direct resolver library so
that one can get access to a file descriptor and throw it into the
select loop.  Either way, this requires keeping a DNS file descriptor
in the main select loop and updating knowledge of DNS periodically,
which is a substantial amount of additional complexity.

-- 
Julien ÉLIE

« -- Et souvenez-vous ! La seule chose que nous ayons à craindre,
  c'est que le ciel nous tombe sur la tête !
  -- ...Et souvenez-vous, Romains, la seule chose que nous ayons
  à craindre, c'est les Gaulois ! » (Astérix)
Technical Details
Message-ID: <gp1dah$bge$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border2.nntp.ams.giganews.com!nntp.giganews.com!feeder1.news.weretis.net!weretis.net!news.trigofacile.com!not-for-mail
References: <gos3dm$21ju$1@de-l.enfer-du-nord.net> <gosb7u$179$1@aux.snarked.org> <gp1b9f$cg7$1@de-l.enfer-du-nord.net>

Show Full Headers
Complete Article Headers
Message-ID: <gp1dah$bge$1@news.trigofacile.com>
Subject: Re: HOWTO change IPs of a productive server, smoothly?
Date: Sun, 8 Mar 2009 22:27:48 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <gos3dm$21ju$1@de-l.enfer-du-nord.net> <gosb7u$179$1@aux.snarked.org> <gp1b9f$cg7$1@de-l.enfer-du-nord.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border2.nntp.ams.giganews.com!nntp.giganews.com!feeder1.news.weretis.net!weretis.net!news.trigofacile.com!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 58
NNTP-Posting-Host: aaubervilliers-151-1-69-80.w81-48.abo.wanadoo.fr
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
 reply-type=original
Content-Transfer-Encoding: 8bit
X-Trace: news.trigofacile.com 1236547729 11790 81.48.72.80 (8 Mar 2009
X-Complaints-To: abuse@trigofacile.com
NNTP-Posting-Date: Sun, 8 Mar 2009 21:28:49 +0000 (UTC)
In-Reply-To: <gp1b9f$cg7$1@de-l.enfer-du-nord.net>
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049