Repository navigation
Description
What happened?
A bug happened!### Description
salt/modules/nm_ip.py, new in 3008.3, can never load. Its __virtual__() calls salt.utils.network.nm_managed(), and that function does not exist in salt/utils/network.py — not in 3008.3, and not on master. The AttributeError is caught by the loader, which then emits a second, misleading warning telling the operator to contact the module's developer.
Every module-load pass on a RedHat-family minion logs:
[ERROR ] Exception raised when processing __virtual__ function for salt.loaded.int.module.nm_ip. Module will not be loaded: module 'salt.utils.network' has no attribute 'nm_managed'
[WARNING ] salt.loaded.int.module.nm_ip.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'nm_ip', please fix this.
There appear to be three parts of one change, of which only the first was merged:
-
salt/modules/nm_ip.py— merged. New in 3008.3; absent at thev3008.2tag. At line 286:def nm_managed(): ... return salt.utils.network.nm_managed()
and
__virtual__()at line 258 gates on it:if not nm_managed(): return ( False, "nm_ip: NetworkManager is not managing this system, or the legacy " "ifup/ifdown tooling is present (rh_ip handles it)", )
-
salt.utils.network.nm_managed()— not merged. No such attribute atv3008.2,v3008.3ormaster. The module's own docstring states the intent:This is the deterministic, load-time-safe condition that decides whether
nm_iporrh_ipowns theipprovider. The check itself lives in:py:func:salt.utils.network.nm_managed`` so both providers share a single definition, exactly one claimsipand no runtime service call is needed during `virtual` resolution. -
The corresponding
rh_ipchange — not merged.nm_ip.__virtual__'s docstring says "rh_ipdefers under the same condition and precisely one provider claimsip", butsalt/modules/rh_ip.py's__virtual__is byte-identical betweenv3008.2andv3008.3and contains no reference tonm_managed.
Setup
Salt 3008.3 (Argon), onedir packages, Rocky Linux 9.8, Python 3.14.7. NetworkManager-managed host.
Not environment-specific — it reproduces on any RedHat-family minion on 3008.3, and the missing attribute can be confirmed without a minion at all.
Steps to Reproduce the behavior
On any RedHat-family 3008.3 minion:
/opt/saltstack/salt/bin/python3 -c "import salt.utils.network as n; print(hasattr(n, 'nm_managed'))"
False
The loader errors appear in the minion log on any module-load pass, e.g. salt-call --local test.ping -l debug.
Confirmable straight from the repository as well:
curl -so /dev/null -w '%{http_code}\n' https://raw.githubusercontent.com/saltstack/salt/v3008.2/salt/modules/nm_ip.py # 404
curl -so /dev/null -w '%{http_code}\n' https://raw.githubusercontent.com/saltstack/salt/v3008.3/salt/modules/nm_ip.py # 200
curl -s https://raw.githubusercontent.com/saltstack/salt/master/salt/utils/network.py | grep -c nm_managed # 0
Expected behavior
nm_ip loads on hosts matching its stated condition (RedHat family, NetworkManager active, no legacy ifup/ifdown), and defers cleanly elsewhere — without an exception and without the loader advising the operator to fix a module that ships with Salt.
Screenshots/Logs
The two log lines above, repeated on every module-load pass.
Additional context
Functionally this looks like dead code rather than a regression: rh_ip still claims the ip provider unconditionally on RedHat-family hosts, exactly as in 3008.2, so no existing behavior changed. The practical effects are that the NetworkManager provider 3008.3 appears to add is unavailable, and that affected minions log an error plus a misleading warning continuously.
Since nm_managed is also missing on master, a fix is presumably needed on both branches.
Two possible directions, depending on intent:
- Add
salt.utils.network.nm_managed()and the matchingrh_ipdeferral, completing the change. - Or, if the feature isn't ready, revert
nm_ipfrom the 3008.x branch so it isn't shipping as a module that cannot load.
disable_modules: [nm_ip] looks like the operator-side workaround, though I haven't confirmed whether the blacklist is consulted before __virtual__ is called or after.
Versions Report
salt --versions-report
(paste output here)
Type of salt install
Official rpm
Major version
3008.x
What supported OS are you seeing the problem on? Can select multiple. (If bug appears on an unsupported OS, please open a GitHub Discussion instead)
rockylinux-9
salt --versions-report output
Salt Version:
Salt: 3008.3
Python Version:
Python: 3.14.7 (main, Sep 30 2026, 03:35:11) [GCC 11.2.0]
Dependency Versions:
cffi: 2.0.0
cherrypy: 18.10.0
cryptography: 50.0.1
dateutil: 2.9.0.post0
docker-py: Not Installed
gitdb: 4.0.12
gitpython: 3.2.0
Jinja2: 3.1.6
libgit2: Not Installed
looseversion: 1.3.0
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.2.1
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 24.0
pycparser: 3.00
pycrypto: Not Installed
pycryptodome: 3.23.0
pygit2: Not Installed
python-gnupg: 0.5.6
PyYAML: 6.0.3
PyZMQ: 27.1.0
relenv: 0.22.27
smmap: 5.0.2
timelib: 0.3.0
Tornado: 6.5.10
ZMQ: 4.3.5
Salt Extensions:
saltext.mysql: 1.1.0
saltext.vault: 1.6.0
Salt Package Information:
Package Type: onedir
System Versions:
dist: rocky 9.8 Blue Onyx
locale: utf-8
machine: x86_64
release: 5.14.0-687.58.1.el9_8.0.1.x86_64
system: Linux
version: Rocky Linux 9.8 Blue Onyx
Activity
ggiesen commentedon Oct 23, 2026
Same as #70354, fix in #70380. The other fixes the same merge dropped are in #70542.