[Bug]: nm_ip (new in 3008.3) cannot load: salt.utils.network.nm_managed() does not exist
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 44/100
Línea de trabajo
Start with salt/modules/nm_ip.py and its __virtual__() check, then inspect salt/utils/network.py and salt/modules/rh_ip.py to understand the missing shared condition and provider ownership. Check the module loading behavior on a RedHat-family minion and look for related tests. Done means nm_ip loads under its stated conditions, the other provider defers consistently, and module loading no longer emits the reported errors.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 15.8k
- Forks
- 5.6k
- Merge medio
- 5 d 9 h
- PR fusionados (30 d)
- 99
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de saltstack/salt
-
[Bug]: Scheduled returns scan all accepted minion keys causing extreme loadPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
saltstack/salt#70789 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
[Bug]: pip.installed with upgrade=True upgrades a package but returns an empty changes dictionaryPosiblemente ocupada @ITJamie la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 3 días
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 3 días
-
[Bug]: Minion with file_client: local crashes on connect: 'AsyncPillar' object has no attribute 'aclose'Posiblemente ocupada @shawnrruss la tomó hace 9 días. Abiertobug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 3 días
-
[Bug]: mine.update clear=True raises UnboundLocalError on the master and stores nothingPosiblemente ocupada @cestercian la tomó hace 11 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
saltstack/salt#70622 · 1 comentario ·
Los mantenedores suelen responder en 3 días
Todos los issues de saltstack/salt
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
btclib-org/btclib-wallet#872 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
btclib-org/btclib#3093 ·
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
patrickballard/wheelgap#269 ·
-
priority: low python
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
LearningCircuit/local-deep-research#8635 ·
Los mantenedores suelen responder en 1 día
-
README says the land/sea mask must match the XS grid; the demo mask does not, and Step 4 worksAbiertodocumentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
buckai-observatory/Automated-Cloud-Removal-and-Seamless-Satellite-Image-Mosaicking-Pipeline#52 ·
Los mantenedores suelen responder en 1 día