On Tue, Feb 24, 2015 at 04:20:19PM +0100, Pierre-Yves Chibon wrote:
> On Mon, Feb 23, 2015 at 04:42:46PM -0500, David Gay wrote:
> > ----- Original Message -----
> > > From: "Pierre-Yves Chibon" <[email protected]>
> > [snip]
> >
> > > Before we move MirrorManager2 to prod, here is what I think would be nice
> > > to
> > > do/have:
> > >
> > > - Pickle validation
> > > - Figure a way to validate a pickle after its creation and before
> > > moving it
> > > to
> > > the mirrorlist boxes
> > > - Find out if we can improve our tests some more
> > > (to improve our confidence that we're ready)
> > > - Engage the mirror mailing list and try to get them to react on the
> > > coming
> > > changes
> > >
> > > The pickle validation might also be an interesting idea to check if there
> > > is
> > > a
> > > difference between the pickle generated by prod and the one generated in
> > > stg.
> > >
...
> >
> > I'd like to help move this along to production. I have very limited
> > knowledge of the MM codebase, but I did attend the MM FAD, so I have at
> > least a vague understanding of how it works. Are there any changes to these
> > lists since last week? What might be productive to work on? Like I said, my
> > knowledge is limited, but pickle validation sounds like a pretty general
> > Python task. Maybe I could look into that?
>
> None of these things have progressed over the last week.
> Clearly the three points at the top have the most priority for MM2 (imo) and
> the
> pickle validation might be tricky (how to test it) but is something I really
> think I want to have before we switch.
I found out this morning that I have a couple of files around mirrormanager's
pickle, might be useful, maybe not but here they are :)
Apparently I have been comparing MM1 and MM2 pickles at one point :)
Pierre
#!/usr/bin/python
import cPickle
with open('mm1_mirrorlist_cache.pkl') as stream:
mm1 = cPickle.load(stream)
with open('mm2_mirrorlist_cache.pkl') as stream:
#with open('mm2_pickle.pkl') as stream:
mm2 = cPickle.load(stream)
nok = []
for k in mm1:
if mm1[k] != mm2[k]:
nok.append(k)
print 'NOK', k
else:
print 'OK', k
print list(enumerate(nok))
print '\n'
for key in nok:
print '**', key
for k in sorted(mm1[key].keys()):
if k not in mm1[key]:
print 'NOK - abs (mm1)', k
elif k not in mm2[key]:
print 'NOK - abs (mm2)', k
elif sorted(mm1[key][k]) != sorted(mm2[key][k]):
nok.append(k)
print 'NOK - diff', k
#else:
#print 'OK', k
for key in nok:
print '**', key
for k in sorted(mm2[key].keys()):
if k not in mm1[key]:
print 'NOK - abs (mm1)', k
elif k not in mm2[key]:
print 'NOK - abs (mm2)', k
elif sorted(mm1[key][k]) != sorted(mm2[key][k]):
nok.append(k)
print 'NOK - diff', k
#!/usr/bin/python
import cPickle
import sys
if len(sys.argv) != 2:
print 'Usage: load_pickle.py <pickle_file>'
sys.exit(1)
pickle = sys.argv[1]
with open(pickle) as stream:
mm2 = cPickle.load(stream)
print(mm2.keys())
_______________________________________________
infrastructure mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/infrastructure