X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C79D62.BDC708D0@onstor-exch02.onstor.net>; Wed, 23 May 2007 10:49:41 -0700
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-class: urn:content-classes:message
Subject: RE: nfxdns library porting
Date: Wed, 23 May 2007 10:49:41 -0700
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E03D90D7C@onstor-exch02.onstor.net>
In-Reply-To: <20070523103719.14a0cccb@ripper.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: nfxdns library porting
Thread-Index: AcedYQL+ZMk0bIfRSfCN6+GwdAxF1wAACLpA
References: <BB375AF679D4A34E9CA8DFA650E2B04E03D90D47@onstor-exch02.onstor.net> <20070523103719.14a0cccb@ripper.onstor.net>
From: "Maxim Kozlovsky" <maxim.kozlovsky@onstor.com>
To: "Andy Sharp" <andy.sharp@onstor.com>,
	<dl-cougar>

Using named does not avoid the modifications to the resolver library,
and adds the named modifications. The problem is not only setting the
appropriate domain, but also reaching the domain name server. The entity
establishing the connection to the name server, whether this is named or
the resolver library itself as it is now, has to know the virtual server
ID. The virtual server ID has to be carried through all the layers down
to the socket creation call, which makes the modifications to the libc
(and named) unfortunate necessity.=20

-----Original Message-----
From: Andy Sharp=20
Sent: Wednesday, May 23, 2007 10:37 AM
To: dl-cougar
Subject: Re: nfxdns library porting

On Wed, 23 May 2007 10:24:51 -0700 "Maxim Kozlovsky"
<maxim.kozlovsky@onstor.com> wrote:

> Hello,
>=20
> Yesterday we discussed with Andy the options on the resolver library
> porting (ssc-nfxnis/nfxdns-*), here is the recap:
>=20
> Our BSD libc resolver library has been modified to provide the name
> resolution in the context of the virtual server. Instead of single
> per-process context, each process has per-virtual server resolver
> state. Before calling into the resolver library, the nfxdns code
> modifies the library global variable to select the appropriate
> context. In some cases, the calls are made to the library internal
> functions, which will not be available in the Linux version.
>=20
> There are several options:
>=20
> 1)	Make the equivalent changes in the Linux libc
> 2)	Use the already modified BSD resolver library instead of
> libc for nfxdns.=20
> 3)	Do something different :-)
>=20
> Due to the time and resources constraints the third options is not
> feasible. Neither 1 nor 2 are very appealing from aesthetical point of
> view, however we need to pick one, and between these two the second
> seems the most promising to me. The problem reduces to compiling the
> BSD library code for Linux, which should not be that hard. If anybody
> has better ideas, please share.

Here's my idea, however, I think #2 may fit into our delivery schedule
for phase 1 a little better, but I'm not sure about that.  This really
should be pretty simple to implement.  But then there's debugging....

Run named (bind9 package) on the ssc, and configure it with virtual
servers info .. just like they were real domains authoratively hosted
by the ssc.  Very simple.  Even though the clusterdb is the real
authority.  Every time the data is updated in the clusterdb, just fire a
thread to dump the data for that vserver to the bind config file(s) and
restart named.  No custom libresolv modifications to jam into libc or
our own code, and completely portable - as long as you use named.
Simple, clean, efficient.

Comments?

Cheers,

a

