Two issues causing this:
- On Windows, `stats.st_mode` is `0o100444` instead of what is checked
for which is `0o100400`. This is because basic Windows permissions
don't distinguish between user/group/all like Linux does. Note that
Windows Access Control Lists (ACLs) are not part of `stat` functionality.
- On Windows, `os.remove` will fail if a file is marked read-only. In
this case, need to mark it writable before deleting.
Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
This doesn't fix any issues but is an optimization and is the recommended
use in the Tornado docs. `LOOP_CLASS.current()` should be used unless
we want to use a different IOLoop than the main thread's IOLoop.
Not using `current()` makes sense in places such as SyncWrapper and MWorker.
However, for use in places such as `SMinion.__init__()`, what essentially
happens is that one IOLoop is used for the `run_sync()`. The `run_sync()`
invokes `start()`. `start() will make this IOLoop current, but it will put
the original current IOLoop back when it is finished, even if it is None.
So what essentially happens is that one IOLoop is used within the ZeroMQ
and TCP transports during the `run_sync` and another is used during
subsequent operations.
Using `current()` will either use the current IOLoop or create a new one
and call it current if none exists. This plays well with both the
ZeroMQ and TCP transports since they use current() internally and so the
same IOLoop will be used throughout execution, both before and after
the run_sync.
Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
After making the version check numerical in 9975508 it no longer matched
SLES 11 properly to use the rh_service module as '11.4 > 11' evaluates
to true. Without using the rh_service module, not all methods are
implemented to use the service state on sle11.
Some platforms, such as Darwin, do not postitively identify the platform
name in any of the other system fields currently in the versions report.
Improves #21906.
Gluster has a bug in versions prior to 3.6 in that they will replace the
cli output mode if isatty() returns false. This patch uses the script
utility to trick the cli into thinking it's being called from a tty to
allow xml output.
Upstream bug: https://bugzilla.redhat.com:443/show_bug.cgi?id=1047378Fixes#31596
When validate_tgt() was written, we did not have a CkMinions class nor
did we have a method of pre-matching minions. Therefore, only certain
match types were permitted.
This commit removes that limitation, allowing eauth targets to be
pillar, ipcidr, etc.
Fixes#30761.
Currently every keyword for _pull_image is considered a bad keyword.
```
% salt node nspawn.pull_tar url bar
ERROR executing 'nspawn.pull_tar': The following invalid keyword arguments were passed: verify=False.
```