mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
more debugging tests
This commit is contained in:
parent
cccbe9eb5e
commit
b2994a1538
2 changed files with 10 additions and 1 deletions
|
@ -6,6 +6,7 @@ import fnmatch
|
||||||
import glob
|
import glob
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import traceback
|
||||||
|
|
||||||
import salt.client
|
import salt.client
|
||||||
import salt.defaults.exitcodes
|
import salt.defaults.exitcodes
|
||||||
|
@ -341,7 +342,12 @@ class ReactWrap:
|
||||||
"""
|
"""
|
||||||
Execute a reaction by invoking the proper wrapper func
|
Execute a reaction by invoking the proper wrapper func
|
||||||
"""
|
"""
|
||||||
|
print(f"DGM class ReactWrap entry run, low '{low}'", flush=True)
|
||||||
self.populate_client_cache(low)
|
self.populate_client_cache(low)
|
||||||
|
print(
|
||||||
|
f"DGM class ReactWrap run, self.client_cache '{self.client_cache}'",
|
||||||
|
flush=True,
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
l_fun = getattr(self, low["state"])
|
l_fun = getattr(self, low["state"])
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
@ -464,11 +470,14 @@ class ReactWrap:
|
||||||
"""
|
"""
|
||||||
Wrap RunnerClient for executing :ref:`runner modules <all-salt.runners>`
|
Wrap RunnerClient for executing :ref:`runner modules <all-salt.runners>`
|
||||||
"""
|
"""
|
||||||
|
stk_summary = traceback.format_stack()
|
||||||
|
print(f"DGM class ReactWrap runner entry, backtrace '{stk_summary}'")
|
||||||
# pylint: disable=unsupported-membership-test,unsupported-assignment-operation
|
# pylint: disable=unsupported-membership-test,unsupported-assignment-operation
|
||||||
print(
|
print(
|
||||||
f"DGM class ReactWrap runner, client_cache '{self.client_cache}', fun '{fun}', kwargs '{kwargs}'",
|
f"DGM class ReactWrap runner, client_cache '{self.client_cache}', fun '{fun}', kwargs '{kwargs}'",
|
||||||
flush=True,
|
flush=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
if "runner" not in self.client_cache:
|
if "runner" not in self.client_cache:
|
||||||
log.debug("reactor edge case: re-populating client_cache for runner")
|
log.debug("reactor edge case: re-populating client_cache for runner")
|
||||||
low = {"state": "runner"}
|
low = {"state": "runner"}
|
||||||
|
|
|
@ -585,7 +585,7 @@ def test_client_cache_missing_key(file_client, react_wrap):
|
||||||
f"DGM test_client_cache_missing_key patch pool, file_client '{file_client}', react_wrap.client_cache '{react_wrap.client_cache}'",
|
f"DGM test_client_cache_missing_key patch pool, file_client '{file_client}', react_wrap.client_cache '{react_wrap.client_cache}'",
|
||||||
flush=True,
|
flush=True,
|
||||||
)
|
)
|
||||||
del react_wrap.client_cache[f"{file_client}"]
|
## DGM del react_wrap.client_cache[f"{file_client}"]
|
||||||
print(
|
print(
|
||||||
f"DGM test_client_cache_missing_key post del key, file_client '{file_client}', react_wrap.client_cache '{react_wrap.client_cache}'",
|
f"DGM test_client_cache_missing_key post del key, file_client '{file_client}', react_wrap.client_cache '{react_wrap.client_cache}'",
|
||||||
flush=True,
|
flush=True,
|
||||||
|
|
Loading…
Add table
Reference in a new issue