You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When applying a new hostname, execution of the network.system state messes up the DNS search domain in /etc/resolv.conf by putting it in like search ['my.domain.com']. And the new hostname doesn't even get applied.
Very annoying but not functionally disrupting the minion is that salt sometimes inserts an empty line after every line in the existing /etc/resolv.conf. It looks like this happens only for larger /etc/resolv.conf files, but I haven't found the trigger for when it happens with the whole file and when it happens only with the comments.
Please be as specific as possible and give set-up details.
on-prem machine (on-prem hypervisor and naked Raspberrypi)
VM (VMware ESXi guest, both master and minion)
VM running on a cloud service, please be explicit and add details
container (Kubernetes, Docker, containerd, etc. please specify)
or a combination, please be explicit
jails if it is FreeBSD
Issue is reproducible on minions running Debian 11 as VMware guest, Ubunut 20.04 as VMware guest, and Ubuntu 20.04 on a Raspberrypi. Haven't tested on other variations.
Master and all minions are on salt v3004.1.
Steps to Reproduce the behavior
Before applying the state (handcrafted/manually fixed /etc/resolv.conf file on the minion):
# /etc/resolv.conf
# There will be an empty line below this comment once salt has processed network.system state
search test.my.domain.com
nameserver 10.x.y.z
The resulting file on the minion looks like this. Note the invalid search domain specification.
# /etc/resolv.conf
# There will be an empty line below this comment once salt has processed network.system state
search ['test.my.domain.com']
nameserver 10.x.y.z
Sometimes I even end up with:
search ["['test.my.domain.com']"]
But I've given up trying to reproduce this even faultier outcome.
Calling the following on the minion directly produces the same wrong outcome:
The icing on the top is that with all the DNS search domain mess, the changed hostname doesn't even get applied (in case there is a hostname change).
Expected behavior
Generate/modify search domain setting in /etc/resolv.conf without any braces and/or single/double quotation marks.
# ...
search test.my.domain.com
# ...
Versions Report
salt-call --versions-report
Salt Version:
Salt: 3004.1Dependency Versions:
cffi: Not Installedcherrypy: Not Installeddateutil: 2.8.1docker-py: Not Installedgitdb: Not Installedgitpython: Not InstalledJinja2: 2.11.3libgit2: Not InstalledM2Crypto: Not InstalledMako: Not Installedmsgpack: 1.0.0msgpack-pure: Not Installedmysql-python: Not Installedpycparser: Not Installedpycrypto: Not Installedpycryptodome: 3.9.7pygit2: Not InstalledPython: 3.9.2 (default, Feb 28 2021, 17:03:44)python-gnupg: Not InstalledPyYAML: 5.3.1PyZMQ: 20.0.0smmap: Not Installedtimelib: Not InstalledTornado: 4.5.3ZMQ: 4.3.4System Versions:
dist: debian 11 bullseyelocale: utf-8machine: x86_64release: 5.10.0-13-amd64system: Linuxversion: Debian GNU/Linux 11 bullseye
Additional context
This might be related to other bugs in network.system: #32983 and #6922
The text was updated successfully, but these errors were encountered:
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!
Description
When applying a new hostname, execution of the
network.system
state messes up the DNS search domain in /etc/resolv.conf by putting it in likesearch ['my.domain.com']
. And the new hostname doesn't even get applied.Very annoying but not functionally disrupting the minion is that salt sometimes inserts an empty line after every line in the existing /etc/resolv.conf. It looks like this happens only for larger /etc/resolv.conf files, but I haven't found the trigger for when it happens with the whole file and when it happens only with the comments.
Setup
Here is a minimal test state to trigger this bug:
Please be as specific as possible and give set-up details.
Issue is reproducible on minions running Debian 11 as VMware guest, Ubunut 20.04 as VMware guest, and Ubuntu 20.04 on a Raspberrypi. Haven't tested on other variations.
Master and all minions are on salt v3004.1.
Steps to Reproduce the behavior
Before applying the state (handcrafted/manually fixed /etc/resolv.conf file on the minion):
Next, apply a minimal state like this:
The resulting file on the minion looks like this. Note the invalid search domain specification.
Sometimes I even end up with:
But I've given up trying to reproduce this even faultier outcome.
Calling the following on the minion directly produces the same wrong outcome:
The icing on the top is that with all the DNS search domain mess, the changed hostname doesn't even get applied (in case there is a hostname change).
Expected behavior
Generate/modify search domain setting in /etc/resolv.conf without any braces and/or single/double quotation marks.
Versions Report
salt-call --versions-report
Additional context
This might be related to other bugs in network.system: #32983 and #6922
The text was updated successfully, but these errors were encountered: