[Yum-devel] decrease error level of individual mirror failure?

Matthew Miller mattdm at mattdm.org
Wed Jul 13 12:40:41 UTC 2005


This trivial patch decreases the error level of the 'Trying other mirror'
failure from 1 to 2. This will make it show up by default, but not in
scripts which set -e1. 

For our automatic updates at BU, our mirror list consists of an AFS URL
followed by an FTP URL, with failovermethod=priority. If someone is
off-campus or behind a NAT box (AFS doesn't play well with NAT) or otherwise
hates OpenAFS (justifiable), the first mirror will always fail. This isn't
interesting information, and in fact is bugging the heck out of some of our
admins (read: Paul Stauffer).

However, I don't want to supress all level 1 errors -- I'd much rather this
particular one be lowered to 2. What'dya think?


Index: output.py
===================================================================
RCS file: /cvsroot/yum/cvs/yum/output.py,v
retrieving revision 1.61
diff -u -r1.61 output.py
--- output.py	13 Jun 2005 02:09:44 -0000	1.61
+++ output.py	13 Jul 2005 12:15:47 -0000
@@ -45,8 +45,8 @@
     def failureReport(self, errobj):
         """failure output for failovers from urlgrabber"""
         
-        self.errorlog(1, '%s: %s' % (errobj.url, str(errobj.exception)))
-        self.errorlog(1, 'Trying other mirror.')
+        self.errorlog(2, '%s: %s' % (errobj.url, str(errobj.exception)))
+        self.errorlog(2, 'Trying other mirror.')
         raise errobj.exception
     
         


-- 
Matthew Miller           mattdm at mattdm.org        <http://www.mattdm.org/>
Boston University Linux      ------>                <http://linux.bu.edu/>
Current office temperature: 75 degrees Fahrenheit.



More information about the Yum-devel mailing list