Comments (6)
Thanks for the detailed report, @thomas-thorburn-connect. This is a known problem encountered with salt-ssh
. The solution is to avoid importing directly in templates and to pass data via. context
instead (from the file.managed
state). A couple of recent formulas that were fixed are shown under the subtasks of this user story:
So follow through to either of the PRs that are mentioned will show how this needs to be tackled here. This is probably the easier of the two to adapt for this formula:
The problem in this formula is that there are quite a few templates that will need to be adapted. @thomas-thorburn-connect May I suggest trying to adapt the template you're using locally, to confirm this fix works for you? We can then discuss how to proceed with the rest of the templates.
from redis-formula.
Hi. So with up to at least 2019.2 I was able to get around this with the --extra-filerefs arg, but I guess this doesn't work anymore with 3002.1 (version I am on now)? I get the TemplateNotFound errors now. This has halted my ability to manage some remote systems with salt-ssh. The nginx and sudoers formulas are having the same problem. It seems that any affected formula will need to be updated to work similar to what had to be done with the postfix one?
from redis-formula.
I checked and it seems that I have fixed it locally. I apologise for not making a pull request, it's not something I've ever actually done on github. But I will paste my changes here in the interest of speed.
This is for redis/server.sls
. You may or may not need the gid_from_name
-> usergroup
fix. Otherwise, you need to add two lines to the redis_config
block, pushing the redis_settings
as context to the settings files it's going to render.
diff --git a/redis/server.sls b/redis/server.sls
index 34e67b9..1de77c3 100644
--- a/redis/server.sls
+++ b/redis/server.sls
@@ -30,7 +30,7 @@ redis_group:
redis_user:
user.present:
- name: {{ user }}
- - gid_from_name: True
+ - usergroup: True
- home: {{ home }}
- require:
- group: redis_group
@@ -84,6 +84,9 @@ redis_config:
{% else %}
- source: {{ redis_settings.source_path }}
{% endif %}
+ - context:
+ redis_settings: {{ redis_settings|tojson }}
+
{% if install_from == 'source' %}
redis-initd:
I'm not going to paste the diff for the following part, because it there are many files it touches and it's all the same change. In redis/files/*.jinja
you will find lines such as
{% from "redis/map.jinja" import redis_settings with context %}
Remove all instances of that line in all the files you find it in redis/files/
, as it's the one causing the trouble.
I needed to make no more changes for it to work
from redis-formula.
No worries. After posting I realized this isn't the appropriate place since it's the redis formula (same problems though). It's late, I should sleep. I looked at some of the other affected formulas but they are quite large and complex for me to work on fixing.
from redis-formula.
Sorry, it seems my reading comprehension went out the door, you did mention you had the issue with postfix and not redis. The postfix fix is nearly identical in terms of adding context in the .sls file that has the block that renders the config files themselves and removing some imports from files it renders, but as you've said this isn't the appropriate place
from redis-formula.
Remove all instances of that line in all the files you find it in redis/files/, as it's the one causing the trouble.
The solution is to not use map.jinja
anymore?
from redis-formula.
Related Issues (20)
- redis-stable.tar.gz is a moving target HOT 1
- Rewrite needed HOT 4
- Link to "Salt Formulas installation and usage instructions" in readme is busted HOT 1
- Ability to specify an interface in 'bind' HOT 3
- Running redis.server I have enabled svc_state to 'running' but doesnt work HOT 3
- Having trouble running tests HOT 1
- Typo in redis/map.jinja HOT 2
- Multiple Instances HOT 2
- update-rc.d not support on rhel in server.sls HOT 1
- Problem getting this working on CentOS HOT 1
- overcommit_memory HOT 1
- db.conf configuration file
- Support for sentinel setup with redis for HA HOT 7
- Installation of not needed init file
- `vm.overcommit_memory` is in incorrect block in pillar HOT 35
- [BUG] service fails on archlinux HOT 1
- [BUG] redis_disable_transparent_huge_pages runs on every highstate and reports a change HOT 1
- [BUG] Cannot extend ID 'redis-server-clean' in 'base:redis.server.clean'. It is not part of the high state.
- Support later versions of Redis
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis-formula.