[Freeipa-devel] [PATCH] 921 fix existing replication agreements

Martin Kosek mkosek at redhat.com
Wed Feb 8 08:47:12 UTC 2012


On Tue, 2012-02-07 at 15:37 -0500, Rob Crittenden wrote:
> Martin Kosek wrote:
> > On Mon, 2012-01-30 at 10:50 -0500, Rob Crittenden wrote:
> >> Rob Crittenden wrote:
> >>> Alexander Bokovoy wrote:
> >>>> On Mon, 30 Jan 2012, Rob Crittenden wrote:
> >>>>>> Yes, this was my first suggestion. I mentioned this general utility
> >>>>>> as a
> >>>>>> second option if we need to implement this onetime fix as a separate
> >>>>>> tool for some reason.
> >>>>>>
> >>>>>> Martin
> >>>>>>
> >>>>>
> >>>>> This is for FreeIPA 2.1 which doesn't support update plugins.
> >>>> I think we can handle 2.1 branch separately but for 2.2 onwards this
> >>>> could be a standard procedure which could be wired into postinstall
> >>>> scriplet on RPM-based systems.
> >>>
> >>> That's the plan. Once this script gets acked it is a short hop to being
> >>> an update plugin that will be reviewed separately.
> >>>
> >>> rob
> >>>
> >>
> >> Updated ipa-2-1 branch patch attached.
> >>
> >> rob
> >
> > NACK.
> >
> > I agree with this approach (this patch for ipa-2-1, LDAP update plugin
> > based solution for ipa-2-2, master) but there are few issues left:
> >
> > 1) ipa-2-1 branch does not have log manager. It is on ipa-2-2 and master
> > branches only:
> >
> > # ipa-fixreplica --help
> > There was a problem importing one of the required Python modules. The
> > error was:
> >
> >      No module named ipa_log_manager
> >
> > 2) The extraneous options were removed, but there are some left-overs:
> >
> > # ipa-fixreplica -t
> > Traceback (most recent call last):
> >    File "/usr/sbin/ipa-fixreplica", line 118, in<module>
> >      sys.exit(main())
> >    File "/usr/sbin/ipa-fixreplica", line 69, in main
> >      options, args = parse_options()
> >    File "/usr/sbin/ipa-fixreplica", line 54, in parse_options
> >      config.init_config(options)
> >    File "/usr/lib/python2.7/site-packages/ipapython/config.py", line 219,
> > in init_config
> >      config.default_realm = options.realm
> > AttributeError: Values instance has no attribute 'realm'
> >
> > Martin
> >
> 
> Ok, this time a fully-tested back port. I've scrapped the config.* calls 
> and only call the standard logger set up when root. I added a log file 
> too so we can track when it ran and what the outcome was.
> 
> rob

Yup, now it works fine. ACK.

I just improved indentation in these 2 lines:

+    if os.getegid() == 0:
+     installutils.standard_logging_setup("/var/log/ipaserver-fixreplica.log", options.debug, filemode='a')

and pushed to ipa-2-1.


I suppose that ipa-2-2 and master branches will have the fix in a form
update plugin as discussed above.

Martin




More information about the Freeipa-devel mailing list