olpc-update server selection

Martin Langhoff martin.langhoff at gmail.com
Wed Nov 25 11:09:39 EST 2009


On Wed, Nov 25, 2009 at 4:10 PM, Daniel Drake <dsd at laptop.org> wrote:
> Going back to recent olpc-update changes...

Good timing. I am about to look into olpc-update (to wrap up for 8.2.x).

> The current logic of choosing which server(s) to query is not really
> suitable for places where the OATS server is not the school server, but
> there are school servers online too.

Ummm. Reading the current code in query(), both in master and in
8.2-fixes, it will try the local XS and the configured OATS server --
in that order. If the request to the local XS errors out or returns an
invalid response (non 200) it attempts the next one.

> In these situations there will be a responsive OATS server on the
> schoolserver, but the one we want them to contact is at a different
> address. With the current logic, the fact that the school server
> responds means that the other one is not try.

What case are you thinking of? Situations where the local server
doesn't know the XO? Or is not running an OATS (in that case, the XS
returns 404... and is no prob)?

> I propose we change the logic to this:
>
> - If a server can be read from ANTITHEFT_SERVER_FILE then use it.
>  (this file will not be shipped in our builds, but deployments can add
>   it)
> - Otherwise default to http://schoolserver
>
> Then the out-of-the-box configuration will still talk to the school
> server, and deployments can override that by creating the
> ANTITHEFT_SERVER_FILE when necessary.

I prefer to

 - Try the local XS, and maybe be more eager to retry to the global
OATS server if the response is not satisfactory. Trying local first
saves bandwidth, and if it errors out, it errors out faster too :-)

 - Try the antitheft server (if it is configured) of the XS doesn't
respond, as we may be at a non-school connection. We want that to
happen because it's an important chance to tell a stolen XO that is...
stolen.

> antitheft.laptop.org drops out of the picture

Yep, removing the fallback to antitheft.l.o ok with me. A bit. I am
ambivalent about it actually.

We lose the ability to help small deployments mark an XO as stolen. I
know there is a lot of talk of "getting out of that business", but it
_is_ am important aspect of what we do, and our small/midsize
deployments care enough about it that some part of OLPC needs to
provide some infra for that. (IOWs: there aren't enough Daniels in
this world for all of them).

Anyway - we'll probably end up making as spin that re-adds
'antitheft.laptop.org' as a configured value. Ah, progress ;-)



m
-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff



More information about the Devel mailing list