Navigation Menu

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

[oxygen] Merge forward from oxygen.rc1 to oxygen #45861

Merged
merged 93 commits into from Feb 8, 2018

Conversation

rallytime
Copy link
Contributor

No conflicts.

terminalmage and others added 30 commits January 29, 2018 17:22
Published functions are serialized when they go over the wire and
deserialized on the far end. This causes unicode CLI args to be lost on
Python 2. Similarly, fileclient requests made from the minion to a
master using the RemoteClient will have the same issue. This commit does
the following things to ensure we don't lose unicode from CLI args, and
also to ensure that fileclient requests involving unicode are
successful:

1. Decodes the return from the various "list" functions in the
   RemoteClient.

2. Decodes the payload received from by the fileserver from a minion.
   Also removes the decoding done in these same functions, because A)
   the backends already support unicode, and B) unicode characters will
   be re-encoded as part of the serialization process anyway.

3. Decodes the payload received by the minion so that the arguments
   passed to the function being called are unicode.
terminalmage and others added 26 commits February 1, 2018 10:30
This prevents a traceback when one of the paths is already unicode
- `salt/modules/rbenv.py`: Forces use of str types in the custom env dict
  passed to `cmd.run_all`.
- `salt/modules/syslog_ng.py`: Ditches janky PATH munging in favor of
  the stable and long-existing support built into cmdmod.py
- `salt/modules/win_path.py`: Forces use of str types in path
  modification functions.
- `salt/states/win_path.py`: Completely rewritten. Duplicated code from
  the execution module removed in favor of calls to the execution
  module. Tests junked and 14 new tests written.
- `salt/utils/path.py`: The `which()` function was mistakenly modified
  in 20033ee to inject the directories in the POSIX default path into
  the PATH environment variable (even for Windows!). We never used the
  PATH to find the executables, we simply cycled through the dirs one by
  one and looked for an executable file matching the named path. The
  code that modifies the path is now removed. In addition, `which()` now
  uses `salt.utils.path.join()`, which gracefully handles mismatched
  str and unicode directory components to prevent decode errors.
  `join()` has also been simplified to use `salt.utils.data.decode()` to
  normalize directory components to unicode.
Also use salt.utils.path.join()
This removes the lowercase normalization and handles case-insensitive
path matches. It also combines local path and system path inspection
into a single helper function in both add() and remove(), for simplicity.

Additionally, the add/remove unit tests have been rewritten to test
a wider array of use cases.
This prevents a traceback when salt is run in a container where
/sys/block is not present.
…hings

Decode payloads on Python 2 to preserve unicode in jobs and fileclient reqs
Improve/remove PATH environment modifications
…when the multiprocessing queue is full. This situation is happening when running the full testing suite on MacOS where the queue limit is 32767 vs on Linux where the queue limit is unlimited.
…ceback

Fix traceback in disks grains when /sys/block not available
decode file list for setup.py on python2
This clears up some warnings when we build the docs, and improves the
syntax highlighting in the docs.
locale.getpreferredencoding() may not be equal to it, and we don't use
locale.getpreferredencoding() anyway when we perform unicode conversions
in salt, we use __salt_system_encoding__.
Fix invalid Sphinx lexers in docs
Change "locale" value in versions-report to use __salt_system_encoding__
…ng_queue_full

 [oxygen] Catch exception when logging queue is full
@rallytime rallytime requested a review from a team as a code owner February 5, 2018 18:13
@rallytime rallytime merged commit 048c18e into saltstack:oxygen Feb 8, 2018
@rallytime rallytime deleted the merge-oxygen branch February 8, 2018 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants