* status.uptime - avoid nawks srand, causes problems on smartos
* status.uptime - remove docs comment that no longer applies
* status.uptime - optimize a tiny it and get rid of the need for a shell
* status.uptime - actually remove the now redudent line too
* status.uptime - readded fallback to uptime binary, atleast we get something on the BSDs too now
* status.uptime - support python pre 2.7 as per damon-atkins
* status.uptime - want OpenBSD support
* status.uptime - want freebsd support, removed fallback once again so we are consistant
* status.uptime - want NetBSD support
* status.uptime - fold @jfindlay work for OSX into mine, tweak mine based on his work
* status.uptime - push tests from @jfindlay with updates SunOS test
* status.uptime - remove cmd.run_all as it was replaced by sysctl.get
* status.uptime - attempt to fix sunos test
* Figured out why there was a cmd.run mock was there.
* add note for SunOS, so we do not forget
* Update version added tag
This fixes a number of annoyances with the archive.extracted state.
Rather than re-state the changes again here, they can be observed in the
carbon release notes, where they have been documented.
Fixes#34841
When calling user.chgroups on a windows system, we were not checking
for the retcode of the `cmd.run_all` call when the localgroup call
failed.
This adds a check to make sure the retcode is 0. If it isn't 0, then
we should be returning False, not True.
`__context__` was not properly sandboxing between calls. This caused
problems such as getting stale data from `pkg.list_pkgs()` between
jobs when `multiprocessing` is False.
`salt/utils/context.py`:
- `ChildContextDict.__init__()` was assigning values in the `global_data`
to the thread local data. But since it wasn't deep copying, it would
assign the same object representing `global_data['__context__']` to
`self._data['__context__']`. Due to this, a change to
`self._data['__context__'] would automatically change
`global_data['__context__']. This would cause the thread local data
to leak to the `global_data`. Fix this by using a deep copy.
- In `minion.py`, `Minion._target()` uses
`tornado.stack_context.StackContext(minion_instance.ctx)`. This would
sometimes result in nested calls to `Minion.ctx()` in the same thread.
When such a nested call would occur, the first invocation of
`ChildContextDict.__exit__()` would destroy the thread local data. At
which point, the other `ChildContextDict` that is still in use would
be modifying `global_data`. Add support for nested calls to
`ContextDict.clone()` by saving the old thread local data object (if it
exists) during `ClientContextDict.__enter__()` and restoring it during
`ClientContextDict.__exit__()`.
Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>