Global network settings always report changes when test=True
Open
Nobody has claimed this yet.
bug
severity-low
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description of Issue
When a state containing network.system is applied in test mode, Salt always return changes to apply even if the current configuration is up-to-date.
Setup
system:
network.system:
- enabled: True
- hostname: myhostname
- apply_hostname: True
Steps to Reproduce Issue
Execute the state file bellow in test mode:
$ salt 'myhostname' state.highstate test=True
jid: 20200312054102028991
myhostname:
----------
ID: system
Function: network.system
Result: None
Comment: Global network settings are set to be updated:
---
+++
@@ -1,2 +1,11 @@
-NETWORKING=yes
-HOSTNAME=myhostname
+# Configuration for networking init script being run during
+# the boot sequence
+
+# Set to 'no' to skip interfaces configuration on boot
+CONFIGURE_INTERFACES=yes
+
+# Don't configure these interfaces. Shell wildcards supported/
+#EXCLUDE_INTERFACES=
+
+# Set to 'yes' to enable additional verbosity
+#VERBOSE=no
Started: 05:41:04.898364
Duration: 2.225 ms
Changes:
Summary for myhostname
-------------
Succeeded: 56 (unchanged=1)
Failed: 0
-------------
Total states run: 56
Total run time: 474.120 ms
Salt return changes to be made.
Then run the same state without test mode enabled:
$ salt 'myhostname' state.highstate
jid: 20200312055319027869
myhostname:
Summary for myhostname
-------------
Succeeded: 56
Failed: 0
-------------
Total states run: 56
Total run time: 808.170 ms
Versions Report
Salt Version:
Salt: 2019.2.3
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.7.3
docker-py: Not Installed
gitdb: 2.0.5
gitpython: 2.1.11
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.5.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.7.3 (default, Dec 20 2019, 18:57:59)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 17.1.2
RAET: Not Installed
smmap: 2.0.5
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.1
System Versions:
dist: debian 10.3
locale: UTF-8
machine: x86_64
release: 4.19.0-8-cloud-amd64
system: Linux
version: debian 10.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the network.system state with state.highstate test=True from the issue, then compare its result with the same state without test mode. The issue is done when an up-to-date configuration reports no changes in test mode while still identifying real changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- infrastructure, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100