backend/common/rhnException.py | 102 -----------------
backend/rhn-conf/rhn_server.conf | 4
backend/satellite_exporter/handlers/non_auth_dumper.py | 3
backend/server/handlers/sat/auth.py | 3
backend/server/handlers/xmlrpc/registration.py | 1
backend/server/rhnHandler.py | 4
backend/server/rhnServer/server_class.py | 6 -
backend/server/rhnServer/server_lib.py | 45 -------
8 files changed, 6 insertions(+), 162 deletions(-)
New commits:
commit 2fb9d4a520ccb3d65c06b32a07262b0dd7e3e50c
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Feb 4 15:35:37 2013 +0100
Stop referencing URL which no longer exists.
diff --git a/backend/common/rhnException.py b/backend/common/rhnException.py
index bd3f1f2..a5ce364 100644
--- a/backend/common/rhnException.py
+++ b/backend/common/rhnException.py
@@ -181,10 +181,7 @@ maximum membership exceeded"),
# issued by an RHN Server/Satellite to the proxy
1002: _("""
RHN Proxy system ID does not match an RHN Proxy Server
- in the database. Please contact your designated Red Hat representative
- or visit
https://rhn.redhat.com/help/contact.pxt immediately if
- experiencing difficulties with the process of enabling or continued
- enablement of this RHN Proxy Server.
+ in the database.
"""),
1003: _("RHN Proxy session token is invalid."),
1004: _("RHN Proxy session token has expired."),
commit c6a18dee30455992592d8bcfaf4ae848e898f3e0
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Feb 4 15:34:58 2013 +0100
The abuse_check was a hosted feature.
diff --git a/backend/common/rhnException.py b/backend/common/rhnException.py
index 71530c2..bd3f1f2 100644
--- a/backend/common/rhnException.py
+++ b/backend/common/rhnException.py
@@ -110,21 +110,6 @@ on this system."),
The architecture of the package is not supported by Red Hat Network
"""),
47: _("""Invalid RPM header"""),
- 49: _("""
- You are getting this error because RHN has detected an abuse of
- service from this system and account. This error is triggered when
- your system makes too many connections to Red Hat Network. This
- error can not be triggered under a normal use of the Red Hat Network
- service as configured by default on Red Hat Linux.
-
- The Red Hat Network services for this system will remain disabled
- until you will reduce the RHN network traffic from your system to
- acceptable limits.
-
- Please log into RHN and visit https://%(hostname)s/help/contact.pxt
- to contact technical support if you think you have received this
- message in error.
- """),
# For the uploading tools
50: _("Invalid information uploaded to the server"),
53: _("Error uploading network interfaces configuration."),
diff --git a/backend/rhn-conf/rhn_server.conf b/backend/rhn-conf/rhn_server.conf
index bfb599a..00606c0 100644
--- a/backend/rhn-conf/rhn_server.conf
+++ b/backend/rhn-conf/rhn_server.conf
@@ -27,10 +27,6 @@ proxy_auth_timeout = 21600.0 # 6 hours
# Directory location of cached packages lists. (Created automatically)
pkg_list_dir = /var/up2date/list
-# Check for abuse of service? Yes (1) or No (0)
-# Turn off if intending to meddle with the rhnsd login interval.
-abuse_check = 0
-
# In HOURS, if throttling how long is the grace period for free users.
throttle_grace_period = 168.0 # 7 days
diff --git a/backend/satellite_exporter/handlers/non_auth_dumper.py
b/backend/satellite_exporter/handlers/non_auth_dumper.py
index 921a127..27d14c2 100644
--- a/backend/satellite_exporter/handlers/non_auth_dumper.py
+++ b/backend/satellite_exporter/handlers/non_auth_dumper.py
@@ -57,9 +57,6 @@ class NonAuthenticatedDumper(rhnHandler, dumper.XML_Dumper):
self._is_closed = 0
self._compressed_stream = None
- # Don't check for abuse
- self.check_for_abuse = 0
-
self.functions = [
'arches',
'arches_extra',
diff --git a/backend/server/handlers/sat/auth.py b/backend/server/handlers/sat/auth.py
index 4ea593a..9201927 100644
--- a/backend/server/handlers/sat/auth.py
+++ b/backend/server/handlers/sat/auth.py
@@ -34,9 +34,6 @@ class Authentication(rhnHandler):
self.functions.append('check')
self.functions.append('login')
- # our own defaults for authentication
- self.check_for_abuse = 0
-
# this is populated directly by server.apacheRequest.py
self.remote_hostname = ''
diff --git a/backend/server/handlers/xmlrpc/registration.py
b/backend/server/handlers/xmlrpc/registration.py
index 549744b..460a0ed 100644
--- a/backend/server/handlers/xmlrpc/registration.py
+++ b/backend/server/handlers/xmlrpc/registration.py
@@ -119,7 +119,6 @@ class Registration(rhnHandler):
self.load_user = 0
self.check_entitlement = 0
self.throttle = 0
- self.check_for_abuse = 1
# a mapping between vendor and asset tags or serial numbers.
# if we want to support other vendors for re
diff --git a/backend/server/rhnHandler.py b/backend/server/rhnHandler.py
index 44d6343..a68fe14 100644
--- a/backend/server/rhnHandler.py
+++ b/backend/server/rhnHandler.py
@@ -38,8 +38,6 @@ class rhnHandler(RPC_Base):
self.load_user = 0
# do we check for entitlement of the server
self.check_entitlement = 1
- # do we check for abuse
- self.check_for_abuse = 1
# do we attempt throttling
self.throttle = CFG.THROTTLE
# attempt quality of service checks
@@ -63,7 +61,7 @@ class rhnHandler(RPC_Base):
self.server = server
# update the latest checkin time
if self.update_checkin:
- server.checkin(check_for_abuse = self.check_for_abuse)
+ server.checkin()
if not server.validateSatCert():
log_error("Satellite Certificate has expired")
diff --git a/backend/server/rhnServer/server_class.py
b/backend/server/rhnServer/server_class.py
index 3344805..ad5e2cf 100644
--- a/backend/server/rhnServer/server_class.py
+++ b/backend/server/rhnServer/server_class.py
@@ -705,12 +705,12 @@ class Server(ServerWrapper):
return 0
return 1
- def checkin(self, commit = 1, check_for_abuse = 1):
+ def checkin(self, commit = 1):
""" convenient wrapper for these thing until we clean the code up
"""
if not self.server.has_key("id"):
return 0 # meaningless if rhnFault not raised
- return server_lib.checkin(self.server["id"], commit,
- check_for_abuse=check_for_abuse)
+ return server_lib.checkin(self.server["id"], commit)
+
def throttle(self):
""" convenient wrapper for these thing until we clean the code up
"""
if not self.server.has_key("id"):
diff --git a/backend/server/rhnServer/server_lib.py
b/backend/server/rhnServer/server_lib.py
index 5ee78ca..1acf9c6 100644
--- a/backend/server/rhnServer/server_lib.py
+++ b/backend/server/rhnServer/server_lib.py
@@ -195,26 +195,8 @@ def create_server_setup(server_id, org_id):
return 1
-def __special_server(server_id):
- """ checks if this server is a special kind so that we don't raise
an
- abuse error for it
- """
- # if a proxy or a satellite we don't enforce this. thanks chip.
- h = rhnSQL.prepare("""
- select 1 from rhnProxyInfo where server_id = :server_id
- union
- select 1 from rhnSatelliteInfo where server_id = :server_id
- """)
- h.execute(server_id = server_id)
- ret = h.fetchone_dict()
- if ret:
- return 1
- return 0
-
-
-def checkin(server_id, commit=1, check_for_abuse=1):
+def checkin(server_id, commit=1):
""" checkin - update the last checkin time
- - check for abuse of service.
"""
log_debug(3, server_id)
h = rhnSQL.prepare("""
@@ -225,31 +207,6 @@ def checkin(server_id, commit=1, check_for_abuse=1):
h.execute(server_id = server_id)
if commit:
rhnSQL.commit()
- # If not checking for abuse, short-circuit the rest.
- if not CFG.ABUSE_CHECK or not check_for_abuse:
- return 1
- # now check for abusers
- h = rhnSQL.prepare("""
- select s.name, si.checkin_counter - ((sysdate - s.created) * 100) ticks
- from rhnServer s, rhnServerInfo si
- where s.id = si.server_id
- and sysdate - s.created > 7
- and s.id = :server_id
- """)
- h.execute(server_id = server_id)
- ret = h.fetchone_dict()
- if not ret:
- return 1
- # we only allow a threshold of 1500 extra connections above what we
- # think is the absolute max.
- if ret["ticks"] > 1500:
- # special servers are exempt
- if __special_server(server_id):
- return 1
- log_error("Abuse of Service", server_id)
- rhnSQL.commit() # don't leave uncommited stuff behind
- raise rhnFault(49, "Abuse of Service detected for server %s (%s)"
- % (ret["name"], server_id), 0)
return 1
def set_qos(server_id):
commit fdb360affd9d981760977db906716a6f2b8e6c48
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Feb 4 15:02:45 2013 +0100
Removing rhnFault codes that are not raised anywhere in our code base.
diff --git a/backend/common/rhnException.py b/backend/common/rhnException.py
index d2829fe..71530c2 100644
--- a/backend/common/rhnException.py
+++ b/backend/common/rhnException.py
@@ -39,15 +39,12 @@ templateValues = {
# 2000-2999: RHN Satellite specific interation errors
FaultArray = {
- 10000: _("Outage mode"),
# 0-999: RHN client/client-like interaction errors:
1: _("This does not appear to be a valid username."),
2: _("Invalid username and password combination."),
3: _("This login is already taken, or the password is incorrect."),
4: _("Permission denied."),
- 5: _("Can not create new entry."),
6: _("Object not found."),
- 7: _("Account limits exceeded."),
8: _("Invalid System Digital ID."),
9: _("Invalid System Credentials."),
10: _("Could not retrieve user data from database."),
@@ -56,19 +53,13 @@ FaultArray = {
13: _("Minimum username length violation."),
14: _("Minimum password length violation."),
15: _("The username contains invalid characters."),
- 16: _("Invalid product registration code."),
17: _("File not found."),
- 18: _("Invalid Architecture and OS release combination."),
19: _("Architecture and OS version combination is not supported."),
20: _("Could not retrieve system data from database."),
21: _("Invalid arguments passed to function."),
22: _("Unable to retrieve requested entry."),
23: _("Could not update database entry."),
24: _("Unsupported server architecture."),
- 25: _("LDAP operation failed."),
- 26: _("Backend RPM database failure: can not retrieve \
-requested information."),
- 27: _("Server Entry is busy."),
28: _("""
The anonymous server functionality is no longer available.
@@ -97,7 +88,6 @@ on this system."),
39: _("The system is not currently subscribed to the specified
channel."),
40: _("The specified channel does not exist."),
41: _("Invalid channel version."),
- 42: _("Invalid ORG_ID requested"),
43: _("""
User group membership limits exceeded.
@@ -119,18 +109,7 @@ on this system."),
The architecture of the package is not supported by Red Hat Network
"""),
- 46: _("""
- Incompatible architectures.
-
- The architecture of the package you are trying to upload is not
- compatible with the channel architecture.
- """),
47: _("""Invalid RPM header"""),
- 48: _("""
- Invalid channel.
-
- The channel you have specified does not exist.
- """),
49: _("""
You are getting this error because RHN has detected an abuse of
service from this system and account. This error is triggered when
@@ -148,18 +127,6 @@ on this system."),
"""),
# For the uploading tools
50: _("Invalid information uploaded to the server"),
- 51: _("""
- Demo service currently disabled due to high load. If you would like
- to see Red Hat's policies on Demo service, or find out how you can
- purchase a subscription service and receive priority download access,
- please go to http://%(hostname)s/preview/index.pxt
- """),
- 52: _("""
- Access to Red Hat Network is currently limited to subscription customers.
- Please try again later. If you would like to become a subscription
- customer, go to https://%(hostname)s/preview/priority_service.pxt for
- more information.
- """),
53: _("Error uploading network interfaces configuration."),
54: _("""
Package Upload Failed due to uniqueness constraint violation.
@@ -192,7 +159,6 @@ on this system."),
"""),
72: _("""You can not unsubscribe from base
channel."""),
73: _("""Satellite or Proxy channel can not be
subscribed."""),
- 74: _(""), # not used, reserved for Hosted-only RegistrationDenied error.
# 80-90: server group errors
80: _("There was an error while trying to join the system to its
groups"),
@@ -204,36 +170,16 @@ maximum membership exceeded"),
# 100-109: e-mail and uuid related faults
100: _("Maximum e-mail length violation."),
- 101: _("Changing e-mail address is not supported."),
105: _("This system has been previously registered."),
106: _("Invalid username"),
- # 110-129: disabled org errors
- 110: _("Service for your account has been disabled."),
- 111: _("Email address not validated; service disabled"),
- 112: _("Survey not filled out; service disabled"),
-
- # 130-140: bugzilla errata import errors
- 130: _("Bugzilla erratum import error"),
-
# 140-159 applet errors
140: _("Unable to look up server"),
# 160-179: OSAD errors
160: _("Required argument is missing"),
- # 500-599: Package Uploader errors
- 500: _("Missing HTTP header information"),
- 501: _("The package's checksum signature does not match the header
one"),
- 502: _("Header information does not match package metainformation"),
- 503: _("Package with a different signature already uploaded"),
- 504: _("Not an RPM package"),
- 505: _("Unsigned RPM package"),
- 506: _("Incompatible package and channel architectures"),
- 507: _("Incompatible checksum type"),
-
# 600-699: RHEL5+ EN errors
- 600: _("Invalid Entitlement Number"),
601: _("No entitlement information tied to hardware"),
602: _("Installation number is not entitling"),
@@ -264,16 +210,6 @@ maximum membership exceeded"),
RHN Satellite user creation is not allowed via rhn_register;
please contact your sysadmin to have your account created.
"""),
- 2002: _("""
- RHN Satellite system ID does not match an RHN Satellite Server
- in the database. Please contact your designated Red Hat representative
- or visit
https://rhn.redhat.com/help/contact.pxt immediately if
- experiencing difficulties with the process of enabling or continued
- enablement of this RHN Satellite Server.
- """),
- 2003: _("""
- This satellite server is not allowed to access the specified channel
- """),
2004: _("""
This satellite server is not allowed to use Inter Satellite Sync on this satellite
"""),
@@ -281,20 +217,10 @@ maximum membership exceeded"),
Inter Satellite Sync is disabled on this satellite.
"""),
- # Kickstart errors
- 2100: _("Access denied to kickstart tree"),
- 2101: _("Could not find kickstart file"),
- 2102: _("""
- Kickstart tree would not lint, there are packages
- missing in the channel
- """),
-
# 3000-3999: XML dumper errors:
3000: _("Invalid datatype passed"),
3001: _("Unable to retrieve channel"),
- 3002: _("Invalid package name"),
3003: _("Unable to retrieve package"),
- 3004: _("Invalid erratum name"),
3005: _("Unable to retrieve erratum"),
3006: _("Invalid satellite certificate"),
3007: _("File is missing"),
@@ -304,7 +230,6 @@ maximum membership exceeded"),
3011: _("Invalid version string"),
3012: _("Mismatching versions"),
3013: _("Invalid channel version"),
- 3014: _("Missing snapshot for channels"),
3015: _("No comps file for channel"),
3016: _("Unable to retrieve comps file"),
@@ -325,13 +250,6 @@ maximum membership exceeded"),
4015: _("Full path of file must be specified"),
4016: _("Invalid revision number"),
4017: _("Cannot compare files of different file type"),
-
- # 5000 - 5099: entitlement mapper errors
- 5000: _("The speicified item is not present in the input"),
- 5001: _("Invalid item code"),
- 5002: _("Invalid user role"),
- 5003: _("Invalid server group"),
- 5004: _("Invalid channel family"),
}