[BUG] Jinja variable 'salt.utils.templates.AliasedLoader object' has no attribute 'boto_ssm'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
I would like to get params from AWS ssm instead of pillar. During state.highstate I'm getting the following error:
salt.exceptions.SaltRenderError: Jinja variable 'salt.utils.templates.AliasedLoader object' has no attribute 'boto_ssm'
c:\salt\var\cache\salt\minion\files\base\tag-dm-worker-common-win-py3/files/worker.conf(1):
---
{%- set rmq_hosts = salt['boto_ssm'].get_parameter('/tag/rabbitmq/'+ grains['env_name'] +'/amqp_url_list').split('\n') -%} <======================
Setup
WIndows 2012 R2 Standard.
Jinja template looks like this:
{%- set rmq_hosts = salt['boto_ssm'].get_parameter('/tag/rabbitmq/'+ grains['env_name'] +'/amqp_url_list').split('\n') -%}
Steps to Reproduce the behavior
Install salt-minion on Windows, execute state.highstate for this salt-minion.
Expected behavior
Jinja template rendered without errors
Versions Report
salt --versions-report
Salt Version:
Salt: 3002.2
Dependency Versions:
cffi: 1.12.2
cherrypy: 17.4.1
dateutil: 2.8.0
docker-py: Not Installed
gitdb: 2.0.5
gitpython: Not Installed
Jinja2: 2.10.1
libgit2: Not Installed
M2Crypto: Not Installed
Mako: 1.0.7
msgpack: 1.0.0
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: 2.19
pycrypto: Not Installed
pycryptodome: 3.9.8
pygit2: Not Installed
Python: 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]
python-gnupg: 0.4.4
PyYAML: 5.3.1
PyZMQ: 18.0.1
smmap: 2.0.5
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.1
System Versions:
dist: cygwin_nt-6.3 3.1.7
locale: cp1252
machine: AMD64
release: 2012ServerR2
system: Windows
version: 2012ServerR2 6.3.9600 SP0
Additional context
On Linux I was able to solve it with installing both boto3 and boto, but on Windows installing boto3 breaks salt-minion as it replaces urllib3 with version 1.26.x, however salt-minion wants urllib3==1.24.3 and refuses to start.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Jinja call to salt['boto_ssm'].get_parameter and the Salt minion dependency setup on Windows. Reproduce state.highstate with the reported Salt 3002.2 environment, then trace why boto_ssm is unavailable and how boto3's urllib3 conflict affects startup. Done means the template renders successfully on Windows with supported dependencies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- cloud, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100