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] states.pip.installed: AttributeError: 'NoneType' object has no attribute 'exception' #64169

Closed
2 of 9 tasks
vps-eric opened this issue Apr 26, 2023 · 0 comments
Closed
2 of 9 tasks
Labels
Bug broken, incorrect, or confusing behavior State-Module

Comments

@vps-eric
Copy link
Contributor

Description
The pip.installed state incorrectly attempts to log any exception caught from calling modules.pip.list. It appears that pip.installed's log parameter shadows the name of the global logger and calls the parameter instead, which is None by default or str (file path) if provided by the caller.

Setup & Reproduction
Install the Salt minion v3006.0. My environment is Almalinux 8.7 in Vagrant on QEMU. Install Python 3.10.11 from source. Create a pip.installed state. Then, break pip.list somehow; this issue or this one are affecting me at the moment.

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • VM running on a cloud service, please be explicit and add details
  • container (Kubernetes, Docker, containerd, etc. please specify)
  • or a combination, please be explicit
  • jails if it is FreeBSD
  • classic packaging
  • onedir packaging
  • used bootstrap to install

Expected behavior
The caught exception to be properly logged with the global logger.

Versions Report

salt --versions-report
Salt Version:
          Salt: 3006.0
 
Python Version:
        Python: 3.10.11 (main, Apr 14 2023, 05:57:16) [GCC 11.2.0]
 
Dependency Versions:
          cffi: 1.14.6
      cherrypy: Not Installed
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.2
       libgit2: Not Installed
  looseversion: 1.0.2
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 22.0
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.9.8
        pygit2: Not Installed
  python-gnupg: 0.4.8
        PyYAML: 5.4.1
         PyZMQ: 23.2.0
        relenv: 0.11.2
         smmap: Not Installed
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.4
 
System Versions:
          dist: almalinux 8.7 Stone Smilodon
        locale: utf-8
       machine: x86_64
       release: 4.18.0-425.13.1.el8_7.x86_64
        system: Linux
       version: AlmaLinux 8.7 Stone Smilodon
@vps-eric vps-eric added Bug broken, incorrect, or confusing behavior needs-triage labels Apr 26, 2023
@vps-eric vps-eric mentioned this issue Apr 26, 2023
3 tasks
vps-eric added a commit to vps-eric/salt that referenced this issue Apr 26, 2023
@dwoz dwoz removed the needs-triage label Apr 27, 2023
Ch3LL pushed a commit that referenced this issue May 10, 2023
Ch3LL pushed a commit that referenced this issue May 22, 2023
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 State-Module
Projects
None yet
Development

No branches or pull requests

3 participants