elasticsearch libraries not found after installing elasticsearch-py and reloading modules
Open
Nobody has claimed this yet.
bug
Confirmed
Core
Loader
severity-medium
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description of Issue
The following error happens after installing elasticsearch-py with reload_modules: true
'elasticsearch' __virtual__ returned False: Cannot load module elasticsearch: elasticsearch libraries not found
Setup
formulas.installed.elastic:
pip.installed:
- name: elasticsearch>=6.0.0,<7.0.0
- reload_modules: true
formulas.elastic.pipeline:
module.run:
- name: elasticsearch.pipeline_create
- id: pipeline
- body: {...}
Steps to Reproduce Issue
- Run the above formulas
- Error running the module
Restarting the minion fixes the issue.
Versions Report
# salt --versions-report
Salt Version:
Salt: 2019.2.0
Dependency Versions:
cffi: 1.12.3
cherrypy: Not Installed
dateutil: 2.5.3
docker-py: 4.0.2
gitdb: 2.0.0
gitpython: 2.1.1
ioflo: Not Installed
Jinja2: 2.9.4
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: 2.19
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.13 (default, Sep 26 2018, 18:42:22)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 16.0.2
RAET: Not Installed
smmap: 2.0.1
timelib: Not Installed
Tornado: 4.4.3
ZMQ: 4.2.1
System Versions:
dist: debian 9.6
locale: ANSI_X3.4-1968
machine: x86_64
release: 4.9.0-8-amd64
system: Linux
version: debian 9.6
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 by reproducing the pip.installed setup with reload_modules: true, then run elasticsearch.pipeline_create and inspect the module-loading path for the Elasticsearch integration. Done means the module can find the newly installed elasticsearch-py library and create the pipeline without restarting the minion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100