[Starcluster] plugin __init__

Dan Yamins dyamins at gmail.com
Thu Apr 15 19:23:50 EDT 2010


Hi:

It seems that in implementing a plugin, you have to define the __init__
method, even if your plugin class subclases ClusterSetup.  That is, this
code:


   from starcluster import clustersetup as sc

   class govloveSetup(sc.ClusterSetup):

      def run(self, nodes, master, user, user_shell, volumes):
          pass


generates an error when starting starcluster, because at some point in the
code you're doing:

     inspect.getargspec(klass.__init__)

If klass.__init__ is not defined, this generates an error since
klass.__init__ will not be a function (e.g. it will fail the
inspect.isfunction() test) , instead it is a "slot wrapper."


Adding a dummy __init__ solves the problem.


Perhaps the base class ClsuterSetup should define a dummy init itself?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/starcluster/attachments/20100415/a045516a/attachment.htm


More information about the StarCluster mailing list