The network state fails to configure the loopback interface.
state:
/etc/network/interfaces.d:
file:
- source: salt://network/files/interfaces.d
- clean: true
- recurse
network_lo:
network:
- managed
- name: lo
- enabled: true
- type: eth
- proto: loopback
network_eth0_192.168.158.22:
network:
- managed
- name: eth0
- enabled: true
- type: eth
- proto: static
- ipaddr: 192.168.158.22
- gateway: 192.168.158.1
- netmask: 255.255.255.0
- noifupdown: true
- dns-nameservers:
- fd57:c87d:f1ee:2::19
- 10.128.2.19
- dns-search:
- lxch.lan
- noifupdown: true
network_eth1_10.128.2.22:
network:
- managed
- name: eth1
- enabled: true
- type: eth
- proto: static
- ipaddr: 10.128.2.22
- netmask: 255.255.255.0
- up_cmds:
- /sbin/ip -4 route add 10.0.0.0/8 via 10.128.2.1 dev $IFACE
- /sbin/ip -6 route add fd57:c87d:f1ee::/48 via fe80::1 dev $IFACE
- noifupdown: true
- dns-nameservers:
- fd57:c87d:f1ee:2::19
- 10.128.2.19
- dns-search:
- lxch.lan
- enable_ipv6: true
- ipv6proto: static
- ipv6ipaddr: fd57:c87d:f1ee:2::22
- ipv6netmask: 64
- noifupdown: true
1.) Install Ubuntu Xenial with salt 2016.11.0 somewhere
2.) Run the above state
3.) You will get:
root@checkmk1:~# salt-call state.sls network.interfaces
[ERROR ] Interface file malformed for interface: lo.
[ERROR ] Interface file malformed for interface: lo.
Define ipaddr: 127.0.0.1 for the interface lo.
root@checkmk1:~# salt-minion --versions-report
Salt Version:
Salt: 2016.11.0
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.4.2
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 1.0.3
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.12 (default, Nov 19 2016, 06:48:10)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.2.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: Ubuntu 16.04 xenial
machine: x86_64
release: 4.4.0-47-generic
system: Linux
version: Ubuntu 16.04 xenial
I'm able to replicate this. git bisect shows this commit: d63cd6b7470499419dd25be4b72857c03c64e127 as the first bad commit.
Here is a docker container for anyone to quickly replicate:
docker run -it -v /home/ch3ll/git/salt/:/testing ch3ll/issues:37942 salt-call --local state.sls test (where /home/ch3ll/git/salt is a local cloned git repo)We will need to get this fixed up thanks!
@garethgreenaway do you have any ideas here? I know you've worked with the debian_ip module.
This should be resolved by #38043 (once it is merged)
If anyone watching this is interested in helping test, I believe the patch is ready for review!
PR https://github.com/saltstack/salt/pull/38043 is now merged