Skip to content

[ERROR] Error encountered during module reload. Modules were not reloaded #45080

@angeloudy

Description

@angeloudy

Description of Issue/Question

Every time I run state.highstate, I got this error
[ERROR] Error encountered during module reload. Modules were not reloaded
By tracking down the code, I think this was caused by the following lines

/usr/local/lib/python3.6/site-packages/salt/state.py
    908     def module_refresh(self):
    909         '''
    910         Refresh all the modules
    911         '''
    912         log.debug('Refreshing modules...')
    913         if self.opts['grains'].get('os') != 'MacOS':
    914             # In case a package has been installed into the current python
    915             # process 'site-packages', the 'site' module needs to be reloaded in
    916             # order for the newly installed package to be importable.
    917             try:
    918                 reload_module(site)
    919             except RuntimeError:
    920                 log.error('Error encountered during module reload. Modules were not reloaded.')
    921             except TypeError:
    922                 log.error('Error encountered during module reload. Modules were not reloaded.')
    923         self.load_modules()
    924         if not self.opts.get('local', False) and self.opts.get('multiprocessing', True):
    925             self.functions['saltutil.refresh_modules']()
    926

I don't think this error affects anything. Can the loglevel be changed to info or warn instead of error.

Setup

FreeBSD 11.1
Python 3.6.3

Steps to Reproduce Issue

Versions Report

Salt Version:
           Salt: 2017.7.2

Dependency Versions:
           cffi: 1.7.0
       cherrypy: Not Installed
       dateutil: 2.6.1
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.7
   mysql-python: Not Installed
      pycparser: 2.10
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.6.3 (default, Dec  8 2017, 18:14:50)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 16.0.3
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.2
            ZMQ: 4.2.2

System Versions:
           dist:
         locale: US-ASCII
        machine: amd64
        release: 11.1-RELEASE-p4
         system: FreeBSD
        version: Not Installed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Upstream-Bugis a result of an upstream issue, not in salt

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions