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>
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