Bug 982673 - rhnsd minimum interval should fit within 1 minute
rhnsd minimum interval should fit within 1 minute
Status: NEW
Product: Spacewalk
Classification: Community
Component: Clients (Show other bugs)
1.9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tomáš Kašpárek
Red Hat Satellite QA List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-09 10:31 EDT by Marcelo Moreira de Mello
Modified: 2017-10-31 04:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 982678 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposted patch (1.72 KB, patch)
2013-07-09 10:36 EDT, Marcelo Moreira de Mello
no flags Details | Diff

  None (edit)
Description Marcelo Moreira de Mello 2013-07-09 10:31:56 EDT
Description of problem:

Investigating the code we could see that rhnsd poller interval are different between RHEL5 branch and RHEL6, Spacewalk branch. 

rhnsd on RHEL5 allows polling with the minimum interval set as 1 minute, while on RHEL6 and Spacewalk the minimum value is 60 minutes. 

RHEL6
-------
$ git branch
  master
* rhel-6.4

$ grep MIN_INTERVAL rhnsd.c  | grep ^#define
#define MIN_INTERVAL  60         /* minimal sane interval; RHN will blacklist

RHEL5
-------
$ git branch
  master
* rhel-5.9

$ grep MIN_INTERVAL rhnsd.c  | grep ^#define
#define MIN_INTERVAL  1         /* minimal sane interval; RHN will blacklist


  We should allow our customers to be able to polling actions within 1 minute interval. 


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

rhnsd-5.0.9-1 (nightly build on spacewalk)


How reproducible:
100%


Steps to Reproduce:
1. man rhnsd


Actual results:

 The default  interval  is  every 240 minutes.  The minimum polling interval is 60 minutes.


Expected results:

The default interval is every 240 minutes.  The minimum polling interval is 1 minute. A polling interval of less
       than 60 minutes will get your server blocked if you are connecting to rhn.redhat.com.



Additional info:

  cliff, sherr and me already discussed this issue
Comment 1 Marcelo Moreira de Mello 2013-07-09 10:36:51 EDT
Created attachment 771060 [details]
Proposted patch


  This patch addresses the issue reported on this bug setting the minimum interval to 1 minute.
Comment 2 Marcelo Moreira de Mello 2013-07-09 10:56:08 EDT
Testing with value set to 30min. Monitoring it using a systemtap. 

# service rhnsd restart
Stopping Red Hat Network Daemon:                           [  OK  ]
Starting Red Hat Network Daemon:                           [  OK  ]

Mon Jul  8 21:47:04 2013: rhn_check(36671) connecting to RHN port 443 by UID 0
Mon Jul  8 21:47:04 2013: rhn_check(36671) connecting to RHN port 443 by UID 0
Mon Jul  8 21:47:05 2013: rhn_check(36671) connecting to RHN port 443 by UID 0
Mon Jul  8 22:17:04 2013: rhn_check(44123) connecting to RHN port 443 by UID 0
Mon Jul  8 22:17:05 2013: rhn_check(44123) connecting to RHN port 443 by UID 0
Mon Jul  8 22:17:05 2013: rhn_check(44123) connecting to RHN port 443 by UID 0
Mon Jul  8 22:47:05 2013: rhn_check(51560) connecting to RHN port 443 by UID 0
Mon Jul  8 22:47:05 2013: rhn_check(51560) connecting to RHN port 443 by UID 0
Mon Jul  8 22:47:05 2013: rhn_check(51560) connecting to RHN port 443 by UID 0
Mon Jul  8 23:17:04 2013: rhn_check(59000) connecting to RHN port 443 by UID 0
Mon Jul  8 23:17:04 2013: rhn_check(59000) connecting to RHN port 443 by UID 0
Mon Jul  8 23:17:05 2013: rhn_check(59000) connecting to RHN port 443 by UID 0
Mon Jul  8 23:47:04 2013: rhn_check(66442) connecting to RHN port 443 by UID 0
Mon Jul  8 23:47:04 2013: rhn_check(66442) connecting to RHN port 443 by UID 0
Mon Jul  8 23:47:05 2013: rhn_check(66442) connecting to RHN port 443 by UID 0
Tue Jul  9 00:17:04 2013: rhn_check(73886) connecting to RHN port 443 by UID 0
Tue Jul  9 00:17:05 2013: rhn_check(73886) connecting to RHN port 443 by UID 0
Comment 3 Jan Pazdziora 2013-07-10 05:20:00 EDT
The RHEL 5 code is wrong, and that issue was fixed via bug 563173.
Comment 4 Jan Pazdziora 2013-07-10 05:22:08 EDT
I mean, you can of course change the default to go down to 1 minute, just please don't use the RHEL 5 behaviour as a justification.

Also please note that Spacewalk has no safeguards against clients hitting it every minute (like hosted has). So I'd propose to first make sure Spacewalk is able to reject service if its load is too high before releasing client code which can easily take the server to its knees.

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