Closed arizvisa closed 5 years ago
@arizvisa overriding utils modules via the extension_modules
setting can be hit or miss depending on how the utils module is imported where it is being used.
gotcha, in that case the salt.utils.template is not using the loader, and so it's hard to hotpatch #51718.
but i have a workaround. if this isn't something you guys plan on changing, we can close this issue.
Closing this issue as it appears that it's not something you guys plan on changing.
Description of Issue/Question
I wrote a PR (#51718) to fix the support of the Cheetah engine in
salt.utils.templates
, and I'm trying to synchronize my fix to each minion viasaltutil.sync_all
orsaltutil.sync_utils
(until you guys merge it or whatever). However, for some reason salt-minion is still picking up the path viasalt.utils.templates
(in site-packages/salt) instead of honoring the module in theextmods
cache. Is this unsupported for certain modules, or is it just a version issue on my end?Setup
Write
templates.py
to_utils
under your salt base environment so that when you callsaltutil.sync_utils
, it'll cache it under extmods. Just to be sure, you canrm
thesalt/utils/templates.py
file from yoursite-packages
on the target minion. This should normally be okay because salt-minion should pick up thetemplates.py
module that is cached in extmods.Steps to Reproduce Issue
Run
salt $target saltutil.sync_utils
to confirm the templates.py module gets synchronized. However, note that salt-minion will still use the oldsalt.utils.templates
module, or complain that it is unable to locate the module via anImportError
.Versions Report