Bug 563173 - Timing in rhnsd broken, mismatch with man page
Summary: Timing in rhnsd broken, mismatch with man page
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 0.7
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Jan Pazdziora (Red Hat)
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
: 554756 (view as bug list)
Depends On:
Blocks: space08
TreeView+ depends on / blocked
 
Reported: 2010-02-09 12:38 UTC by Jan Pazdziora (Red Hat)
Modified: 2013-07-10 15:11 UTC (History)
3 users (show)

Fixed In Version: rhnsd-4.9.3-1
Clone Of:
Environment:
Last Closed: 2010-04-12 15:01:40 UTC
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora (Red Hat) 2010-02-09 12:38:36 UTC
Description of problem:

The man page of rhns says:

       rhnsd is typically started from the initialization (init)
       scripts in /etc/init.d/rhnsd.  when it’s time  to  poll
       the  Red  Hat  Network servers for available updates and actions.
       The default interval is every 240 minutes.  The minimum polling
       interval is 60 minutes.

and
       Specify the interval that rhnsd should wait between checking
       the Red Hat Network. Default is 240 minutes, the minimum is
       60  minutes.

However, when I change the default

       INTERVAL=240

in /etc/sysconfig/rhn/rhnsd to

       INTERVAL=40

I get the following message in /var/log/messages:

       rhnsd: Red Hat Network Services Daemon running with check_in interval set to 40 seconds.

Therefore, the problems are:

1) 40 seconds < 60 minutes which is the claimed minimum.
2) Since the default value is 240, it means that the value is in minutes, not in seconds as the message in /var/log/messages has us believe.

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

rhnsd-4.8.3-1.el5

How reproducible:

Deterministic.

Steps to Reproduce:
1. With default configuration (240), run service rhnsd restart and watch /var/log/messages.
2. Change the value in /etc/sysconfig/rhn/rhnsd to 40 and run service rhnsd restart; watch /var/log/messages.
  
Actual results:

Feb  9 07:13:35 hp-dx2200-01 rhnsd: Red Hat Network Services Daemon running with check_in interval set to 240 seconds.
Feb  9 07:13:35 hp-dx2200-01 rhnsd[7029]: Red Hat Network Services Daemon starting up.

Feb  9 07:36:57 hp-dx2200-01 rhnsd: Red Hat Network Services Daemon running with check_in interval set to 40 seconds.
Feb  9 07:36:57 hp-dx2200-01 rhnsd[7266]: Red Hat Network Services Daemon starting up.

Expected results:

Red Hat Network Services Daemon running with check_in interval set to 240 minutes.

^^ Note minutes, not seconds.

Red Hat Network Services Daemon running with check_in interval set to 60 minutes.

^^ Note that the 40 minutes in config value was adjusted to the documented minimum, 60 minutes.

Additional info:

This bugzilla was prompted by bug 533838 (private).

Comment 1 Jan Pazdziora (Red Hat) 2010-02-09 12:38:53 UTC
Taking.

Comment 2 Jan Pazdziora (Red Hat) 2010-02-09 13:49:10 UTC
Actually, another issue is that the "running with check_in interval" message is always printed twice:

Feb  9 07:13:35 hp-dx2200-01 rhnsd: Red Hat Network Services Daemon running with check_in interval set to 240 seconds.
Feb  9 07:13:35 hp-dx2200-01 rhnsd: Red Hat Network Services Daemon running with check_in interval set to 240 seconds.
Feb  9 07:13:35 hp-dx2200-01 rhnsd[7029]: Red Hat Network Services Daemon starting up.
Feb  9 07:36:57 hp-dx2200-01 rhnsd[7029]: Exiting
Feb  9 07:36:57 hp-dx2200-01 rhnsd: Red Hat Network Services Daemon running with check_in interval set to 40 seconds.
Feb  9 07:36:57 hp-dx2200-01 rhnsd: Red Hat Network Services Daemon running with check_in interval set to 40 seconds.
Feb  9 07:36:57 hp-dx2200-01 rhnsd[7266]: Red Hat Network Services Daemon starting up.

That should also be fixed.

Comment 3 Jan Pazdziora (Red Hat) 2010-02-09 13:52:38 UTC
Another issue: if there is /etc/sysconfig/rhn/rhnsd with INTERVAL=240 and rhnsd is started with --interval 80, it will run with value 80. If the daemon is then sent HUP, it will run with 240, not 80 set with the command line option.

Is that correct?

Comment 4 Jan Pazdziora (Red Hat) 2010-02-09 14:41:20 UTC
Fixes in Spacewalk master 5fe3abb16874bb8ac34706883a0530cbe1e8e2e2 to 51f27ff6e5e01df1023a07fe52660fc25dd1d237.

Comment 5 Jan Pazdziora (Red Hat) 2010-02-09 14:56:13 UTC
Note that we will likely want to remove the actual handling from 
SIGHUP_handler and just set some flag and alarm the sleep as well.

Comment 7 Jan Pazdziora (Red Hat) 2010-02-10 13:44:12 UTC
(In reply to comment #5)
> Note that we will likely want to remove the actual handling from 
> SIGHUP_handler and just set some flag and alarm the sleep as well.    

Actually, it seems to behave reliably.

Comment 8 Jan Pazdziora (Red Hat) 2010-04-12 15:01:05 UTC
Tagged and built as rhnsd-4.9.3-1.

Comment 9 Jan Pazdziora (Red Hat) 2010-04-12 15:01:40 UTC
The fix was part of Spacewalk 0.8 client release.

Comment 10 Jan Pazdziora (Red Hat) 2010-11-26 15:13:48 UTC
*** Bug 554756 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.