SUSE Support

Here When You Need Us

SALT AttributeError: 'module' object has no attribute 'dockermod'

This document (000020509) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12 SP5

python2-salt-3000-46.148.2.x86_64
salt-3000-46.148.2.x86_64
salt-minion-3000-46.148.2.x86_64


Situation

The following errors can be observed:

$ sudo salt-call state.apply | head
[ERROR ] Failed to import states docker_container, this is due most likely to a syntax error:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/salt/loader.py", line 1658, in _load_module
mod = imp.load_module(mod_namespace, fn_, fpath, desc)
File "/usr/lib/python2.7/site-packages/salt/states/docker_container.py", line 2108, in <module>
client_timeout=salt.utils.dockermod.CLIENT_TIMEOUT,
AttributeError: 'module' object has no attribute 'dockermod'

Resolution

The fix is in the following SALT Security Update:
SUSE-SLE-Manager-Tools-12-2021-3550
containing:
python2-salt-3000-46.151.2.x86_64



A manual work-around would be to edit:

/usr/lib/python2.7/site-packages/salt/states/docker_container.py

- client_timeout=salt.utils.dockermod.CLIENT_TIMEOUT,
+ client_timeout=salt.utils.docker.CLIENT_TIMEOUT,

Cause

The error is due to AttributeError: 'module' object that has no attribute 'dockermod'. This is due to a known and fixed regression in salt:
https://github.com/openSUSE/salt/pull/421/commits/62bf0f4a8383f10c3521cd8acc93b19aa7176447

Additional Information


 

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020509
  • Creation Date: 18-Nov-2021
  • Modified Date:18-Nov-2021
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.