Bug 594668

Summary: ypbind probes for the fastest server too often
Product: Red Hat Enterprise Linux 5 Reporter: Tomas Smetana <tsmetana>
Component: ypbindAssignee: Honza Horak <hhorak>
Status: CLOSED CURRENTRELEASE QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: urgent    
Version: 5.5CC: azelinka, bgollahe, kvolny, mpoole, ovasik, prc
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Each NIS client can bind to different NIS servers, but can only be bound to one server at a time. To maintain its connection to a server, an NIS client checks connection to an active server every 20 seconds and once in a while tries to find the fastest available server. Previously, clients searched for the fastest server every minute, which sometimes caused heavy traffic and response delays. With this update, clients search for the fastest server every 15 minutes, preventing this bug.
Story Points: ---
Clone Of:
: 594670 594693 (view as bug list) Environment:
Last Closed: 2013-09-23 11:13:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 594693, 714028    

Description Tomas Smetana 2010-05-21 10:04:08 UTC
Description of problem:
The ypbind manual page says that it checks the current server every 20s to confirm it is up, and also pings all configured servers every 15 minutes to check on which is currently the fastest to respond. In fact it pings the servers every minute which may cause ypbind to flip the servers very often.

Version-Release number of selected component (if applicable):
ypbind-1.19-12

How reproducible:
Always

Steps to Reproduce:
1. configure ypbind to try to contact more servers, i.e. add two servers to /etc/yp.conf (one of them must be reachable):

ypserver 192.168.1.1
ypserver 192.168.1.2

2. start ypbind in the debug mode

ypbind -debug

3. it logs out the pings of the servers
  
Actual results:
The "Check new for fastest server." logs appear every minute:

Expected results:
The "Check new for fastest server" logs appear every 15 minutes (as documented)

Additional info:
This seems to be caused by the ypbind-mt-1.19-log-binds.patch which contains the following chunk:
@@ -1031,7 +1067,8 @@ test_bindings (void *param __attribute__
      pthread_exit (&success);

     lastcheck += ping_interval;
-      if (lastcheck >= 900) /* 900 = 15min. */
+      //if (lastcheck >= 900) /* 900 = 15min. */
+      if (lastcheck >= 60) /* 900 = 15min. */

At the first glance it looks like this has been added for the debugging purposes to test the patch for the bug #198689.  We should revert this part or explain why does the interval have to be shortened this much and fix the documentation.

Comment 1 Karel Klíč 2010-05-21 10:55:09 UTC
Correct, it seems it was added for debugging purposes.
The limit should be set back to 900.

Comment 4 RHEL Program Management 2010-08-09 18:44:27 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 8 RHEL Program Management 2011-01-11 21:16:11 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 9 RHEL Program Management 2011-01-12 15:24:31 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 10 RHEL Program Management 2011-05-31 14:00:26 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 17 Tomas Capek 2011-06-20 11:39:35 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Each NIS client can bind to different NIS servers, but can only be bound to one server at a time. To maintain its connection to a server, an NIS client checks connection to an active server every 20 seconds and once in a while tries to find the fastest available server. Previously, clients searched for the fastest server every minute, which sometimes caused heavy traffic and response delays. With this update, clients search for the fastest server every 15 minutes, preventing this bug.

Comment 20 Karel Volný 2011-11-10 15:01:32 UTC
just a note, with RHEL5.8-SERVER-20111030.0 BETA 1.0 - ypbind-1.19-12.el5_6.1 this fails our regression testing, it seems that ypbind doesn't do the checks at all (IOW, the debug log does not contain any single occurence of "Checking for new fastest server.")

Comment 21 Karel Volný 2012-01-04 10:01:13 UTC
(In reply to comment #20)
> just a note, with RHEL5.8-SERVER-20111030.0 BETA 1.0 - ypbind-1.19-12.el5_6.1
> this fails our regression testing, it seems that ypbind doesn't do the checks
> at all (IOW, the debug log does not contain any single occurence of "Checking
> for new fastest server.")

seems like misconfiguration which wasn't discovered before thanks to different lab environment

test updated:

[kvolny@kvolny bz594668-ypbind-probes-for-the-fastest-server-too-often]$ cvs diff -r 1.9 runtest.sh 
Index: runtest.sh
===================================================================
RCS file: /cvs/dist/tests/ypbind/Regression/bz594668-ypbind-probes-for-the-fastest-server-too-often/runtest.sh,v
retrieving revision 1.9
retrieving revision 1.10
diff -r1.9 -r1.10
37a38
>       rlFileBackup /etc/yp.conf
42a44
>       echo 'domain AZOR server 1.2.3.4' >> /etc/yp.conf
73a76
>       rlFileRestore