Comment 2 for bug 1216051

Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

Took a little time looking at this. Every consumer I looked at sets this to putils, so I think it is safe to change the init to not accept a different executor.

There are unit tests though that use the set_executor to a fake just for testing purposes. Removing that method would also introduce a backward incompatibility.

So I think maybe the safest thing to do here is update nova and cinder consumers to not pass in an executor on init, but leave set_executor for testing purposes. To help ensure nothing bad gets introduced, it would probably also be good to update the docstring for set_executor to include a warning that it is only there as a test hook, and add a LOG.warning statement in that method call with a similar type of warning.

That should hopefully ensure users only ever are using processutils executors for "real" usage.