Repository navigation
Closed
Description
Initially: "debian_ip ifupdown /etc/network/interfaces options for tunnels, ipv6, and dns-search"
[EDIT]
Documentation
Ubuntu ifupdown Docs
Here are the (ubuntu) docs for /etc/network/interfaces (pkg: ifupdown).
- http://manpages.ubuntu.com/manpages/trusty/en/man5/interfaces.5.html
- http://manpages.ubuntu.com/manpages/precise/en/man5/interfaces.5.html
- http://manpages.ubuntu.com/manpages/lucid/en/man5/interfaces.5.html
Salt Docs
- http://docs.saltstack.com/en/latest/topics/releases/2014.1.0.html#network-management-for-debian-ubuntu
- http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.debian_ip.html#module-salt.modules.debian_ip
- Adding IPv6 support into the iptables module and state. #9662 (iptables ipv6)
Sources
- https://github.com/saltstack/salt/blob/develop/salt/modules/debian_ip.py
- https://github.com/saltstack/salt/blob/develop/salt/templates/debian_ip/debian_eth.jinja
- https://github.com/westurner/salt/compare/debian_network_config
Tickets
I don't see any other tickets for e.g. tunnels, ipv6, or dns-search (as utilized by resolvconf) in debian_ip:
[EDIT]
BUG:
- Unclosed file handles (->
file.open->with salt.utils.flopen) - Don't write /etc/default/networking on Ubuntu >= 12.04
- get_network_settings returns templated output to compare with templated output with difflib.unified_diff (in https://github.com/saltstack/salt/blob/develop/salt/states/network.py) and thus runs on every salt invocation w/ Ubuntu <= 12.04
- c70c205
- * /etc/resolv.conf is overwritten when resolvconf is installed (this may be a documentation issue)
PERF:
- Simplify /etc/network/interfaces parser logic
TST:
- Handle 'TODOs'
- Write tests
- Further (manual) testing on other platforms
- I've run this manually on one platform a bunch of times.
ENH:
- Add (rework/complete) debian ipv6 options
- Add Adds dns-search option
- Add wireless-* options
- Add wpa-* options
- Add basic seting validations
RLS:
Activity
westurner commentedon Apr 23, 2014
... @garethgreenaway et al: is this a unique issue?
garethgreenaway commentedon Apr 23, 2014
Sorry, not sure what the issue is.
basepi commentedon Apr 24, 2014
@westurner I'm unsure of what the purpose of this issue is. You linked some docs. What's the feature/bug you're looking to get fixed?
westurner commentedon Apr 25, 2014
It is not possible to:
https://github.com/westurner/salt/tree/debian_network_config
Wes Turner
On Apr 24, 2014 2:26 PM, "Colton Myers" [email protected] wrote:
westurner commentedon Apr 25, 2014
[EDIT] BUG
Also, there are unclosed file handles
Wes Turner
On Apr 24, 2014 2:26 PM, "Colton Myers" [email protected] wrote:
Close file handles, add validation, add wireless options, re-work int…
westurner commentedon Apr 25, 2014
From [1], I understand that I can test this by copying my modified debian_ip.py module into
/srv/salt/_modulesand then callingsaltutil.sync_moduleswith a master/minion setup.[1] http://docs.saltstack.com/en/latest/ref/modules/#modules-are-easy-to-write
westurner commentedon Apr 25, 2014
https://github.com/westurner/salt/compare/debian_network_config
This:
withcontext manager to ensure that files are closed even in the event of an exception (try/except/finally file.close)/etc/network/interfacesparser logic (I haven't looked at the ifupdown code, just theman interfacesdocs)context->method(as in the docs)inet_typetoaddrfam(as in the docs)About the validations:
salt.utils.validate.netwhere possible(valid: True/False, value: casted/transformed value, errmsg)__ipv4_quadpending a proper placementsalt.utils.validate.???garethgreenaway commentedon Apr 25, 2014
@westurner Some good additions :) I find it easier to run the installer from where ever you're code is, then run a master and a minion on the same host for testing. As you're testing, etc. run the installer and restart the minion.
westurner commentedon Apr 25, 2014
Thx!
garethgreenaway commentedon Apr 25, 2014
Yup. both master and minion running as root, installer has to run as root because of file permissions.
westurner commentedon Apr 25, 2014
Got it. I have a packer/vagrant/virtualbox setup that will help with this.
I see the Jenkins setup and tests; is there an easier way with something
like salt-cloud and lxc?
Wes Turner
On Apr 25, 2014 12:16 AM, "garethgreenaway" [email protected]
wrote:
4 remaining items
westurner commentedon Apr 26, 2014
... [why] does salt.modules.debian_ip.get_network_settings return a single template (when the file doesn't exist on disk)? [1]
[1]
salt/salt/modules/debian_ip.py
Line 1387 in eade921
westurner commentedon Apr 26, 2014
resolvconf may or may not be installed on Debian systems.
If resolvconf is not installed, writes to
/etc/resolv.confwill persist.If resolvconf is installed (as it is by default w/ Ubuntu 12.04 (and earlier, IIRC)):
/etc/resolv.confare overwritten/etc/resolv.confis generated from:/etc/resolvconfdns-nameserversanddns-searchsettings in/etc/network/interfaces(and/etc/network/interfaces.d)dhclient(cached in/var/lib/dhcp/dhclient.${IFNAME}.leases)Debian & Ubuntu DNS configuration docs references:
[-]debian_ip ifupdown /etc/network/interfaces options for tunnels, ipv6, and dns-search[/-][+]Debian/Ubuntu network configuration: BUG, ENH, PERF[/+]Close file handles, add validation, add wireless options, re-work int…
bbinet commentedon Jun 4, 2014
what is the status of this work?
these are useful additions: any chance it can be turned into a pull request to be merged?
westurner commentedon Jun 4, 2014
Unfortunately I've been sidetracked and haven't yet learned/written tests
for this sensitive functionality.
If someone has the time and/or resources to get this merged, by all means,
please do.
I've only recently learned about the _modules folder.
Wes Turner
On Jun 4, 2014 3:47 AM, "Bruno Binet" [email protected] wrote:
garethgreenaway commentedon Jun 17, 2014
Going to take a look at getting these changes merged in.
bbinet commentedon Jul 29, 2014
@garethgreenaway do you think the additions described in #12216 (comment) will be available in Helium release?
garethgreenaway commentedon Jul 29, 2014
@bbinet these changes are in 2014.7 (Helium) now.
bbinet commentedon Jul 29, 2014
Cool! Thanks @garethgreenaway.
westurner commentedon Jul 30, 2014
@garethgreenaway
Any suggestions on how to test the changes in westurner@f98ef01 ?
(There's an RFC at westurner@f98ef01#commitcomment-6131081 )
[EDIT]: I see: garethgreenaway@d7884d5
and https://github.com/saltstack/salt/blob/2014.7/salt/modules/debian_ip.py
Thanks again!
TODO:
[-]Debian/Ubuntu network configuration: BUG, ENH, PERF[/-][+]BUG, ENH, PERF: Debian/Ubuntu network configuration[/+]stale commentedon Aug 24, 2017
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.