Closed westurner closed 6 years ago
... @garethgreenaway et al: is this a unique issue?
Sorry, not sure what the issue is.
@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?
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" notifications@github.com wrote:
@westurner https://github.com/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?
— Reply to this email directly or view it on GitHubhttps://github.com/saltstack/salt/issues/12216#issuecomment-41321445 .
[EDIT] BUG
Also, there are unclosed file handles
Wes Turner On Apr 24, 2014 2:26 PM, "Colton Myers" notifications@github.com wrote:
@westurner https://github.com/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?
— Reply to this email directly or view it on GitHubhttps://github.com/saltstack/salt/issues/12216#issuecomment-41321445 .
From [1], I understand that I can test this by copying my modified debian_ip.py module into /srv/salt/_modules
and then calling saltutil.sync_modules
with a master/minion setup.
[1] http://docs.saltstack.com/en/latest/ref/modules/#modules-are-easy-to-write
https://github.com/westurner/salt/compare/debian_network_config
This:
with
context manager to ensure that files are closed even in the event of an exception (try/except/finally file.close)/etc/network/interfaces
parser logic (I haven't looked at the ifupdown code, just the man interfaces
docs)context
-> method
(as in the docs)inet_type
to addrfam
(as in the docs)About the validations:
salt.utils.validate.net
where possible(valid: True/False, value: casted/transformed value, errmsg)
__ipv4_quad
pending a proper placementsalt.utils.validate.???
@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 Some good additions :)
Thx!
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.
- As root?
- I will look into automating these crucial tests
Yup. both master and minion running as root, installer has to run as root because of file permissions.
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" notifications@github.com wrote:
Yup. both master and minion running as root, installer has to run as root because of file permissions.
— Reply to this email directly or view it on GitHubhttps://github.com/saltstack/salt/issues/12216#issuecomment-41359613 .
@garethgreenaway :
/etc/default/networking
) every time?(With Ubuntu 12.04)
... [why] does salt.modules.debian_ip.get_network_settings return a single template (when the file doesn't exist on disk)? [1]
resolvconf may or may not be installed on Debian systems.
If resolvconf is not installed, writes to /etc/resolv.conf
will persist.
If resolvconf is installed (as it is by default w/ Ubuntu 12.04 (and earlier, IIRC)):
/etc/resolv.conf
are overwritten/etc/resolv.conf
is generated from:
/etc/resolvconf
dns-nameservers
and dns-search
settings in /etc/network/interfaces
(and /etc/network/interfaces.d
)dhclient
(cached in /var/lib/dhcp/dhclient.${IFNAME}.leases
)Debian & Ubuntu DNS configuration docs references:
what is the status of this work? these are useful additions: any chance it can be turned into a pull request to be merged?
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" notifications@github.com wrote:
what is the status of this work? these are useful additions: any chance it can be turned into a pull request to be merged?
— Reply to this email directly or view it on GitHub https://github.com/saltstack/salt/issues/12216#issuecomment-45066306.
Going to take a look at getting these changes merged in.
@garethgreenaway do you think the additions described in https://github.com/saltstack/salt/issues/12216#issuecomment-41358915 will be available in Helium release?
@bbinet these changes are in 2014.7 (Helium) now.
Cool! Thanks @garethgreenaway.
@garethgreenaway Any suggestions on how to test the changes in https://github.com/westurner/salt/commit/f98ef01b876377328316d36ef54d7ed5a70ec1b7 ?
(There's an RFC at https://github.com/westurner/salt/commit/f98ef01b876377328316d36ef54d7ed5a70ec1b7#commitcomment-6131081 )
[EDIT]: I see: https://github.com/garethgreenaway/salt/commit/d7884d5faa1ba2e85a78dacbf1857607dc959768
and https://github.com/saltstack/salt/blob/2014.7/salt/modules/debian_ip.py
Thanks again!
TODO:
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.
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
).Salt Docs
Sources
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:
file.open
->with salt.utils.flopen
)PERF:
TST:
ENH:
RLS: