mirror of
https://github.com/saltstack/salt.git
synced 2025-04-10 06:41:40 +00:00
Updated debugging
This commit is contained in:
parent
0b7da42cd7
commit
61392d0459
2 changed files with 36 additions and 0 deletions
|
@ -465,9 +465,17 @@ class ReactWrap:
|
|||
Wrap RunnerClient for executing :ref:`runner modules <all-salt.runners>`
|
||||
"""
|
||||
# pylint: disable=unsupported-membership-test,unsupported-assignment-operation
|
||||
print(
|
||||
f"DGM class ReactWrap runner, client_cache '{self.client_cache}', fun '{fun}', kwargs '{kwargs}'",
|
||||
flush=True,
|
||||
)
|
||||
if "runner" not in self.client_cache:
|
||||
log.debug("reactor edge case: re-populating client_cache for runner")
|
||||
low = {"state": "runner"}
|
||||
print(
|
||||
f"DGM class ReactWrap runner not in client_cache, low '{low}'",
|
||||
flush=True,
|
||||
)
|
||||
self.populate_client_cache(low)
|
||||
return self.pool.fire_async(self.client_cache["runner"].low, args=(fun, kwargs))
|
||||
|
||||
|
@ -476,9 +484,17 @@ class ReactWrap:
|
|||
Wrap Wheel to enable executing :ref:`wheel modules <all-salt.wheel>`
|
||||
"""
|
||||
# pylint: disable=unsupported-membership-test,unsupported-assignment-operation
|
||||
print(
|
||||
f"DGM class ReactWrap wheel, client_cache '{self.client_cache}', fun '{fun}', kwargs '{kwargs}'",
|
||||
flush=True,
|
||||
)
|
||||
if "wheel" not in self.client_cache:
|
||||
log.debug("reactor edge case: re-populating client_cache for wheel")
|
||||
low = {"state": "wheel"}
|
||||
print(
|
||||
f"DGM class ReactWrap wheel not in client_cache, low '{low}'",
|
||||
flush=True,
|
||||
)
|
||||
self.populate_client_cache(low)
|
||||
return self.pool.fire_async(self.client_cache["wheel"].low, args=(fun, kwargs))
|
||||
|
||||
|
@ -487,9 +503,17 @@ class ReactWrap:
|
|||
Wrap LocalClient for running :ref:`execution modules <all-salt.modules>`
|
||||
"""
|
||||
# pylint: disable=unsupported-membership-test,unsupported-assignment-operation
|
||||
print(
|
||||
f"DGM class ReactWrap local, client_cache '{self.client_cache}', fun '{fun}', kwargs '{kwargs}'",
|
||||
flush=True,
|
||||
)
|
||||
if "local" not in self.client_cache:
|
||||
log.debug("reactor edge case: re-populating client_cache for local")
|
||||
low = {"state": "local"}
|
||||
print(
|
||||
f"DGM class ReactWrap local not in client_cache, low '{low}'",
|
||||
flush=True,
|
||||
)
|
||||
self.populate_client_cache(low)
|
||||
self.client_cache["local"].cmd_async(tgt, fun, **kwargs)
|
||||
|
||||
|
@ -498,8 +522,16 @@ class ReactWrap:
|
|||
Wrap LocalCaller to execute remote exec functions locally on the Minion
|
||||
"""
|
||||
# pylint: disable=unsupported-membership-test,unsupported-assignment-operation
|
||||
print(
|
||||
f"DGM class ReactWrap caller, client_cache '{self.client_cache}', fun '{fun}', kwargs '{kwargs}'",
|
||||
flush=True,
|
||||
)
|
||||
if "caller" not in self.client_cache:
|
||||
log.debug("reactor edge case: re-populating client_cache for caller")
|
||||
low = {"state": "caller"}
|
||||
print(
|
||||
f"DGM class ReactWrap caller not in client_cache, low '{low}'",
|
||||
flush=True,
|
||||
)
|
||||
self.populate_client_cache(low)
|
||||
self.client_cache["caller"].cmd(fun, *kwargs["arg"], **kwargs["kwarg"])
|
||||
|
|
|
@ -568,6 +568,10 @@ def test_client_cache_missing_key(file_client, react_wrap):
|
|||
client_cache = {}
|
||||
tag = f"new_{file_client}"
|
||||
chunk = LOW_CHUNKS[tag][0]
|
||||
print(
|
||||
f"DGM test_client_cache_missing_key, file_client '{file_client}', tag '{tag}', chunk '{chunk}'",
|
||||
flush=True,
|
||||
)
|
||||
thread_pool = Mock()
|
||||
thread_pool.fire_async = Mock()
|
||||
with patch.object(react_wrap, "client_cache", client_cache):
|
||||
|
|
Loading…
Add table
Reference in a new issue