saltstack/salt — pull request #15848 by cachedout (2014-09-16 21:23:43+00:00)
Title: Re-inject opts into modules under multi-master mode.

I discovered a problem wherein opts were not correctly being set in ```__opts__``` in loaded modules when running under multi-master mode. Effectively, modules would use the ```__opts__``` dictionary last encountered during minion initialization. This creates subtle bugs, but most noticeable a case wherein a state run would send pubs and receive returns through one master but perform file transfers through another master!

This fix ensures that loaded modules will contain the correct copy of ```__opts__``` when running in multi-master mode. It also adds a new options flag called ```multimaster``` which is set to True when multiple masters are detected on start up.

I'm not sure if this particular bug affects any open issues, but it could potentially have an effect on issues such as #13944.