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

Fix 2015.8 from incomplete back-port #30343

Merged
merged 4 commits into from Jan 13, 2016

Conversation

Projects
None yet
2 participants
@rallytime
Contributor

rallytime commented Jan 13, 2016

When back-porting #27606 with #30187, the salt-cloud -p and -d functions were broken, along with a couple of other things.

This PR fixes the 2015.8 branch by including some more fixes from the develop branch. The following PRs are included in this fix:

@cachedout Please review.

cachedout and others added some commits Oct 20, 2015

Set a fallback HWM
This mostly happens in the test suite when opts are setup by hand, but a safe default is a good idea regardless.
Always get default option settings from salt.config
It is a poor practice to duplicate settings and scatter them through multiple
files.  Configuration options have been centralize in salt.config, yet
salt.utils.event repeats many of those settings for the benefit of unit tests
that pass only partial "opts" parameters.  Rather than change all of the unit
tests (and other callers) to provide sufficient settings in the "opts"
parameters, the various classes that need opts should start with the default
options provided by salt.config as a base and then the passed-in "opts"
parameter to __init__() functions should override the base options.

  * Use the appropriate salt.config.DEFAULT_MASTER_OPTS or
    salt.config.DEFAULT_MINION_OPTS.

  * Remove all of the spurrious, redundant default settings from
    salt.utils.event.

  * Drop use of "opts.get(KEY)" in favor of "opts[KEY]" - KeyError exceptions
    are a good thing because they indicate that an appropriate default is not
    in salt.config.

TODO: Perform similar clean-ups through other files in the code base.

Conflicts:
	salt/utils/event.py
Additional corrections to use option defaults directly from salt.config
  * correct 'id' entry in salt.config
  * add 'event_match_type' in salt.config
  * ensure that hash is only calculated in minion since it isn't needed by the master

Conflicts:
	salt/config.py
Use a broader test for unset "id"
The "id" option is of type string - testing that an uninitialized "id" is
specifically None is too narrow.

Fixes #28339
References #28189

rallytime added a commit that referenced this pull request Jan 13, 2016

Merge pull request #30343 from rallytime/fix-2015.8
Fix 2015.8 from incomplete back-port

@rallytime rallytime merged commit 6079a96 into saltstack:2015.8 Jan 13, 2016

1 check was pending

default Merged build started.
Details

@rallytime rallytime deleted the rallytime:fix-2015.8 branch Jan 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment