wins failover not working + patch

gdoucet at csc.com gdoucet at csc.com
Fri Aug 17 19:57:04 GMT 2001


Ok , nice someone is working on it.

I was wondering if I was the only one using this feature!!


I saw the function lib/wins_srv.c:wins_srv_ip(), but this function only
return a good wins found in wins_srv_list, but in
libsmb/namequery.c:resolve_wins() call wins_srv_ip only once and then in
libsmb/namerequery.c:name_query() it call wins_srv_died.

It would be better to check if the wins is up in wins_srv_ip() and if not:
wins_srv_ip() would call  wins_srv_died() if the wins is down. So theire
will no need to call wins_srv_died elsewhere.

Does it make sense?

Theire is no function to mark a DNS server down in gethostbyname()!


Maybe put the test from  wins_resolve in wins_srv_ip would be appropriate,
something like that:
                sock = open_socket_in(  SOCK_DGRAM, 0, 3,
                                        interpret_addr(lp_socket_address
()),
                                        True );
                if (sock != -1) {
                        *return_iplist = name_query( sock,      name,
                                                     name_type, False,
                                                     True,      wins_ip,
                                                     return_count);
                        if(*return_iplist == NULL) {
                                close(sock);
                                wins_srv_died(wins_ip)
                        }
                        close(sock);
                }

Anyway it is great that check this out with the other.

Thanks for the responds.


- -
Geoffroy Doucet
Unix Support
GPES - Capacity Management & Workgroup Support
CSC
Montreal BAN
Phone: 514-818-2817
ESN:       88-82817
E-Mail : gdoucet at csc dot com


NO!

There is a reason I never finished this.  It's not set up to work yet.
Not at all.  The code is all there but I need to sit down with Jeremy next
week and work out some UNICAST_SUBNET issues.

There is, within nmbd, something called the UNICAST_SUBNET.  I need to run
through the code with some other folks on the team to ensure that the
UNICAST_SUBNET is not impacted by failover, or that it is properly updated
if it would be impacted.  I did not write that bit and, to be honest, I'm
not clear on how it works.  It's part of the mechanism that distributes
packets to the correct queues when they arrive.

Anyway, I can go over this with the Team at the CIFS conference next
week.  It may be very simple (and I may be paranoid for nothing) but I
prefer not to mess with code unless I'm clear about how it works.

> I discover that the wins failover did not work. I check the code, and in
> the function resolve_wins, it only try one wins server from the list.
>
> Here is a prelimary patch of source/libsmb/namequery.c that try every
wins
> until it found one that is good.

The code, as written, already does that.  I just need to change two
function calls.  See lib/wins_srv.c:wins_srv_ip()

> I also found that wins_srv_ip, don't work so great. It mark down a wins
> only in the same process, every process will need to mark down the defect
> wins. It would be great to store the wins server list in a tdb maybe??

Yes, that would be a problem, but a minor one.  The fact that we can
failover at all will be an advantage.  Keeping a list of two or three
WINS servers in a tdb is likely to be overkill.

> If someone could check it and include it in the cvs tree, it would be
> great.

Thanks for your effort, but there's just that little bit more that needs
to be done.

Chris -)-----

--
Christopher R. Hertel -)-----                   University of Minnesota
crh at nts.umn.edu              Networking and Telecommunications Services

    Ideals are like stars; you will not succeed in touching them
    with your hands...you choose them as your guides, and following
    them you will reach your destiny.  --Carl Schultz








More information about the samba-technical mailing list