Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loader nomerge: Don't allow modules to "merge" #20540

Closed
wants to merge 4 commits into from

Commits on Mar 3, 2015

  1. Cleanup of virtual_err

    Since now logging this, we've noticed its a bit noisy. To cut down on that I've changed the log level to debug. In addition, I changed the loader to keep a dict of mod -> error so that the caller (if so interested) can look up the error later. I switched caller and minion to use this new API. Now if you send a job to a minion witha module that isn't loaded you get a return like:
    
    ```
    'mod_name'' __virtual__ returned False: <error message here>
    
    ```
    
    Fixes saltstack#21185
    jacksontj committed Mar 3, 2015
    Configuration menu
    Copy the full SHA
    74b21fa View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2015

  1. Keep track of what modules we *have* loaded, its useful for error mes…

    …sages-- and will be useful for stopping module merging down the road
    jacksontj committed Mar 6, 2015
    Configuration menu
    Copy the full SHA
    32b4122 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5c7d88f View commit details
    Browse the repository at this point in the history
  3. Remove "merge" of modules

    Historically we have allowed modules to rename themselves (using __virtual__) to be the same name as a module we have already loaded. What this means is you can have 2 modules which end up being "foo", and all of their functions are placed in the loader dict (__salt__, for example). This means that all functions in the loader dict with the "foo" prefix don't come from the same code and are not gauranteed to be interoperable-- which is *very* confusing. The only use-cases we've seen could easily be implemented using the depends decorator or something similar
    
    Comes with the side-effect of increasing "miss" performance on the LazyDict
    jacksontj committed Mar 6, 2015
    Configuration menu
    Copy the full SHA
    7e5e54a View commit details
    Browse the repository at this point in the history