Repository navigation
Closed
Labels
pending-discussionThe issue or pull request needs more discussion before it can be closed or merged
Milestone
Description
Description of Issue/Question
I'm trying to deploy IPv6 Addresses to my minions, but following documentation, it doesn't work.
I have looked at states/modules in develop branch about networking and debian.IP but can't be able to find some usefull thinks for v6.
Setup
networking.sls :
lo:
network.managed:
- name: lo
- type: eth
- onboot: yes
- userctl: no
- ipv6_autoconf: no
- enable_ipv6: true
- ipv6addrs:
- fc00::1/128
The output in /etc/networking/interfaces :
auto lo
iface lo inet6 static
netmask 64
Steps to Reproduce Issue
(Include debug logs if possible and relevant.)
Versions Report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
Salt: 2016.11.1
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.4.2
gitdb: 0.6.4
gitpython: 1.0.1
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: 0.9.0
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-57-generic
system: Linux
version: Ubuntu 16.04 xenial
Metadata
Metadata
Assignees
Labels
pending-discussionThe issue or pull request needs more discussion before it can be closed or merged
Activity
Ch3LL commentedon Jan 11, 2017
Does it work if you change it to
- ipv6ipaddr: fc00::1/128?valentin2105 commentedon Jan 11, 2017
Hi, Same result here :
heinlein-support commentedon Feb 16, 2018
We have exactly the same issue here with Salt 2017.7.3.
Is it really not possible to configure IPv6 with Salts? Any known workarounds?
And, no, even adding the netmask doesn`t help!
Our example:
Ch3LL commentedon Feb 20, 2018
ping @MTecknology or @garethgreenaway looks like you have done some work here mind taking a look here? Do you have an example for configuring ipv6 on debian/ubuntu? Is this just a documentation bug?
Also to note I found this issue related to debian networking that has a state included if you want to give that a go: #37942
MTecknology commentedon Mar 8, 2018
@valentin2105 You said it "doesn't work" but I'm not sure you clearly indicated what that means. Is the problem simply that the netmask isn't making it's way to the configuration file when written, or are there other things that do not behave as expected?
If it's just the netmask, that probably shouldn't be too terrible to track down.
valentin2105 commentedon Mar 8, 2018
@MTecknology
By it doesn't work, as I writed, the generated file of this SLS is
/etc/network/interfaces:There is no IP in the generated output unlike in the yaml file.
I will see if I can solve in Salt's code, but nothing sure :)
MTecknology commentedon Mar 8, 2018
If you said so, I still don't see it. However, I also had a very hard time trying to comprehend what I read so it's possible I'm still missing it.
Anyway... it's not just the IP address that is not being included. The netmask is also missed. This is happening because the debian_ip module and templates have no logic for how to handle the data you're trying to throw at it.
If you look at the sample I provided in the bug @Ch3LL mentioned, you'll see that ipaddrs/ipv6addrs (should be ipv6ipaddrs*) was never considered during testing. However, many configurations /were/ considered, and a few included IPv6. If you're only trying to assign one IPv6 address to the interface, then that bit of information has you covered.
If you actually need multiple addresses per interface, then that is something the debian_ip module does not support. You will need to add this support.
To add support for multiple addresses per interface, you'll want to look around _parse_settings_eth() _write_file_ifaces(), and build_interface() of debian_ip. Ultimately, the data structure you build will be parsed by templates/debian_ip/debian_eth.jinja.
I also noticed another snafu...
for opt in opts:has some poor logic for deciding v6only. There's also likely to be some issues with "ipv6_$opt" instead of "ipv6$opt".cmusser commentedon Aug 10, 2018
I'm having a similar issue with trying to configure a single IPv6 address on an interface. In this case, the interface is a "dummy" interface and already has an IPv4 address. The managed system is Ubuntu 18.04 and the salt version is salt 2018.3.2 (Oxygen).
The state I tried was:
That seemed to not put anything into the /etc/network/interfaces for the IPv6 stuff
I'm not sure if this is supported or if I'm just doing it wrong.
MTecknology commentedon Aug 27, 2018
After digging into the source a bit, I'm realizing that there's no way to configure a loopback device via salt. I'm working on a PR that fixes this mistake and updates documentation.
When the PR is complete, a loopback interface will be configurable with:
Added support for loopback devices to modules.debian_ip(). (Fixes: sa…