Makefile
by Matt Domsch
Makefile | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 6efcd3d4c9df4114eb686944f51c90c9d0bae7e9
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Wed Apr 21 10:44:12 2010 -0500
make clean also removes .py[co] files
diff --git a/Makefile b/Makefile
index 5488522..055a094 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,8 @@ all:
clean:
-rm -rf *.tar.gz *.rpm *~ dist/ $(SPEC) $(RELEASE_PY) server/mirrormanager.egg-info server/build
+ -find . -name \*.pyc -exec rm \{\} \;
+ -find . -name \*.pyo -exec rm \{\} \;
$(SPEC):
sed -e 's/##VERSION##/$(RELEASE_VERSION)/' $(SPEC).in > $(SPEC)
14 years
server/dev.cfg
by Matt Domsch
server/dev.cfg | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 2e912657f8cecff95c33b4bff920a6df07926644
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Fri Apr 9 11:11:37 2010 -0500
add max_propogation_days config option
diff --git a/server/dev.cfg b/server/dev.cfg
index ef35022..a02cd89 100644
--- a/server/dev.cfg
+++ b/server/dev.cfg
@@ -16,7 +16,11 @@
#mirrormanager.admin_group = 'sysadmin'
# maximum number of days a mirror may be stale (correct, but
# out-of-date content), before being removed from the mirrorlist.
-#mirrormanager.max_stale_days = 7
+#mirrormanager.max_stale_days = 3
+# maximum number of days a mirror can take to get new files, before
+# being removed from the mirrorlist. This should be less than
+# max_stale_days.
+#mirrormanager.max_propogation_days = 2
# update-master-directory-list upstream definition
# a dictionary in a list with following content
14 years
server/mirrormanager
by Matt Domsch
server/mirrormanager/model.py | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
New commits:
commit b27bef5f75b710c4b21f4d5bf65b254304025594
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Fri Apr 9 10:27:05 2010 -0500
ageFileDetails(): account for propogation delays
scenario: f12 update pushed 2010-04-03T05:00:31.359362. The following
f12 update was pushed 2010-04-09T01:30:03.61679, about 6 days later.
So, when the later update got pushed, MM "forgot" about the earlier
update (because it was more than 2 days "stale"), but the mirrors
hadn't yet picked up the new update, so yum refused to use any of the
mirrors. And of course, it happened simultaneous with 13-Beta getting
staged to the mirrors so mirrors couldn't pick up the F12 update as
quickly as they normally would.
This hadn't bitten us before, when we had a max 7 days stale rule,
because we have been pushing updates faster than every 7 days. But
with the 2-day rule, we get bit.
This change adds a new config option,
mirrormanager.max_propogation_days (default=2), and changes the
default max_stale_days to 3. When a new FileDetail is created, any
that are stale will get deleted, leaving the most recent, and also
leaving the second-most recent if the most recent one is newer than
max_propogation_days. This ensures that mirrors that are pretty
current, but haven't had a chance to catch an update within a few
hours, are still usable by yum, at least until the crawler finds them
to be not up-to-date.
diff --git a/server/mirrormanager/model.py b/server/mirrormanager/model.py
index c7ff62f..34c92fb 100644
--- a/server/mirrormanager/model.py
+++ b/server/mirrormanager/model.py
@@ -667,11 +667,18 @@ class Directory(SQLObject):
SQLObject.destroySelf(self)
def age_file_details(self):
- """For each file, keep at least 1 FileDetail entry, removing
- any others that are more than 7 days old."""
- max_stale = config.get('mirrormanager.max_stale_days', 7)
+ """For each file, keep at least 1 FileDetail entry.
+ Remove the second-most recent entry if the most recent entry is older than
+ max_propogation_days. This gives mirrors time to pick up the
+ most recent change.
+ Remove any others that are more than max_stale_days old."""
+
+ max_stale = config.get('mirrormanager.max_stale_days', 3)
+ max_propogation = config.get('mirrormanager.max_propogation_days', 2)
fd = {}
- weekago = int(time.time()) - (60*60*24*max_stale)
+ t = int(time.time())
+ stale = t - (60*60*24*max_stale)
+ propogation = t - (60*60*24*max_propogation)
for f in self.fileDetails:
if f.filename not in fd:
@@ -681,8 +688,13 @@ class Directory(SQLObject):
for filename, fds in fd.iteritems():
if len(fds) > 1:
- for f in fds[1:]:
- if f.timestamp < weekago:
+ start=2
+ # second-most recent only if most recent has had time to propogate
+ if fds[0].timestamp < propogation:
+ start=1
+ # all others
+ for f in fds[start:]:
+ if f.timestamp < stale:
f.destroySelf()
class Category(SQLObject):
14 years
server/generate-worldmap
by Matt Domsch
server/generate-worldmap | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit d029de525b967bcc25ee8da88ab4fb8f933411fc
Author: Matt Domsch <Matt_Domsch(a)dell.com>
Date: Thu Apr 1 16:10:01 2010 -0500
fix generate-worldmap for python-basemap changes
diff --git a/server/generate-worldmap b/server/generate-worldmap
index 171dfc7..4b3ea35 100755
--- a/server/generate-worldmap
+++ b/server/generate-worldmap
@@ -22,7 +22,15 @@ matplotlib.use('Agg')
from pylab import *
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
-from matplotlib.toolkits.basemap import Basemap
+
+# ABI breakage
+try:
+ # this export sucks - basemap should do this automatically
+ os.environ['BASEMAPDATA'] = '/usr/share/basemap'
+ from mpl_toolkits.basemap import Basemap
+except:
+ # python-basemap-0.9.5
+ from matplotlib.toolkits.basemap import Basemap
from turbogears.database import PackageHub
hub = __connection__ = None
14 years, 1 month