Repository navigation
Description
Description of Issue/Question
configuring a state to manage the hostname using network.system on Debian is not idempotent
Setup
networking_system_config:
network.system:
- enabled: true
- hostname: testing.local
- apply_hostname: true
- require_reboot: true
every run:
----------
ID: networking_system_config
Function: network.system
Result: True
Comment: Global network settings are up to date.
Started: 14:41:50.802055
Duration: 25.588 ms
Changes:
----------
network_settings:
---
+++
@@ -1,3 +1,3 @@
NETWORKING=yes
-HOSTNAME=testing.local
+HOSTNAME=testing
DOMAIN=local
separate issues but related:
- require_reboot: true seems to have no effect, I believe there is an open ticket for that.
- /etc/hosts doesn't get updated with the new hostname pointing to 127.0.0.1 or 127.0.1.1.
Steps to Reproduce Issue
kitchen converge
Versions Report
root@testing:~# salt-call --local --versions-report
Salt Version:
Salt: 2015.8.8.2
Dependency Versions:
Jinja2: 2.7.3
M2Crypto: Not Installed
Mako: Not Installed
PyYAML: 3.11
PyZMQ: 14.4.0
Python: 2.7.9 (default, Mar 1 2015, 12:57:24)
RAET: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
cffi: 0.8.6
cherrypy: Not Installed
dateutil: 2.2
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
libgit2: Not Installed
libnacl: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.2
mysql-python: 1.2.3
pycparser: 2.10
pycrypto: 2.6.1
pygit2: Not Installed
python-gnupg: Not Installed
smmap: Not Installed
timelib: Not Installed
System Versions:
dist: debian 8.3
machine: x86_64
release: 3.16.0-4-amd64
system: debian 8.3
Activity
jfindlay commentedon May 2, 2016
@ssplatt, thanks for reporting.
eliasp commentedon Oct 19, 2017
How to reproduce this AKA what happens a few layers deeper down in the network code:
ip.get_network_settings:HOSTNAME=somehost.domain.tldip.build_network_settings:HOSTNAME=somehostWithout any warranty for not breaking something else, this simple change fixed that for me:
ip.build_network_settingsreports now the full FQDN instead of the truncated hostname.eliasp commentedon Sep 26, 2018
Still applies to
2018.3.2on Ubuntu 18.04stale commentedon Jan 9, 2020
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
CodingMinds commentedon Dec 1, 2022
Still applies to
salt-ssh 3005onmacOS 12.6via brew.Managed host is a
Ubuntu 20.04.5 LTS