Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] ldap.managed state KeyError: 'ldap3.connect' #66461

Open
SimBou opened this issue May 2, 2024 · 1 comment
Open

[BUG] ldap.managed state KeyError: 'ldap3.connect' #66461

SimBou opened this issue May 2, 2024 · 1 comment
Labels
Bug broken, incorrect, or confusing behavior needs-triage

Comments

@SimBou
Copy link

SimBou commented May 2, 2024

Description
After upgrade of salt-minion from 3005.5-1 to 3005.5-2, state ldap.managed fails with KeyError: 'ldap3.connect'

Setup
salt-master 3005.5
salt-minion 3005.5
salt-minion-3005.5-2.el7.x86_64

Steps to Reproduce the behavior
salt <my_minion> state.highstate

      ID: state-dirsrv-tls
Function: ldap.managed
  Result: False
 Comment: An exception occurred in this state: Traceback (most recent call last):
            File "salt/state.py", line 2276, in call
              ret = self.states[cdata["full"]](
            File "salt/loader/lazy.py", line 149, in __call__
              return self.loader.run(run_func, *args, **kwargs)
            File "salt/loader/lazy.py", line 1228, in run
              return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
            File "salt/loader/lazy.py", line 1243, in _run_as
              return _func_or_method(*args, **kwargs)
            File "salt/loader/lazy.py", line 1276, in wrapper
              return f(*args, **kwargs)
            File "/opt/saltstack/salt/run/salt/states/ldap.py", line 249, in managed
              connect = __salt__["ldap3.connect"]
            File "salt/loader/context.py", line 78, in __getitem__
              return self.value()[item]
            File "salt/loader/lazy.py", line 336, in __getitem__
              super().__getitem__(item)  # try to get the item from the dictionary
            File "salt/utils/lazy.py", line 100, in __getitem__
              return self._dict[key]
          KeyError: 'ldap3.connect'
 Started: 17:22:40.210579
Duration: 11.396 ms

Versions Report

salt --versions-report Salt Version: Salt: 3005.5

Dependency Versions:
cffi: 1.14.3
cherrypy: unknown
dateutil: 2.7.5
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 2.10.1
libgit2: Not Installed
M2Crypto: 0.35.2
Mako: Not Installed
msgpack: 0.6.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: 2.14
pycrypto: Not Installed
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.6.8 (default, Jan 16 2024, 02:08:59)
python-gnupg: 0.4.6
PyYAML: 5.4.1
PyZMQ: 20.0.0
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.4

System Versions:
dist: oracle 8.9
locale: UTF-8
machine: x86_64
release: 4.18.0-513.11.0.1.el8_9.x86_64
system: Linux
version: Oracle Linux Server 8.9

state-dirsrv-tls:
  ldap.managed:
    - connect_spec:
        url: ldap://127.0.0.1:389/
        bind:
          method: simple
          dn: cn=Directory Manager
          password: xxxxxxxx
    - entries:
      # TLS settings
      - cn=encryption,cn=config:
        - replace:
            sslVersionMin: TLS1.2
@SimBou SimBou added Bug broken, incorrect, or confusing behavior needs-triage labels May 2, 2024
Copy link

welcome bot commented May 2, 2024

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior needs-triage
Projects
None yet
Development

No branches or pull requests

1 participant