[Yum-devel] [PATCH/RFC] What to do if a plugin fails to load?

Jeremy Katz katzj at redhat.com
Wed Jun 13 19:15:12 UTC 2007

On Wed, 2007-06-13 at 14:52 -0400, Matthew Miller wrote:
> On Wed, Jun 13, 2007 at 02:43:13PM -0400, Jeremy Katz wrote:
> > In some cases (especially on distro upgrades where you have to do
> > further updates after the fact), loading plugins can fail to load for
> > various reasons.  We should probably be tolerant of that and just not
> > load them.  What do people think of the attached?
> Not to make things more difficult, but some plugins may be more vital than
> others -- in some cases, running with a plugin disabled may really screw up
> the system. (For example, protectbase.) 

Yeah, that's what makes things hard...  but blowing up with a traceback
of ImportError is almost certainly the wrong failure mode.

> How about making "failure mode" a
> standard configuration option in the conf file for each plugin?

And then you get to "what if reading the conf file fails"?  

Realistically, we just need to decide on a line and stick to it.  Either
a) Failure to load a plugin just disables the plugin
b) Failure to load a plugin aborts with a nice-ish error message

My patch is the former, partially because it's the easier thing to
implement but also because getting out of the latter case is still not
obvious or simple for end-users.


More information about the Yum-devel mailing list