saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14k stars 5.47k forks source link

BUG, ENH, PERF: Debian/Ubuntu network configuration #12216

Closed westurner closed 6 years ago

westurner commented 10 years ago

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:

PERF:

TST:

ENH:

RLS:

westurner commented 10 years ago

... @garethgreenaway et al: is this a unique issue?

garethgreenaway commented 10 years ago

Sorry, not sure what the issue is.

basepi commented 10 years ago

@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 commented 10 years ago

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 .

westurner commented 10 years ago

[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 .

westurner commented 10 years ago

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

westurner commented 10 years ago

https://github.com/westurner/salt/compare/debian_network_config

This:

About the validations:

garethgreenaway commented 10 years ago

@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 commented 10 years ago

@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
garethgreenaway commented 10 years ago

Yup. both master and minion running as root, installer has to run as root because of file permissions.

westurner commented 10 years ago

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 .

westurner commented 10 years ago

@garethgreenaway :

(With Ubuntu 12.04)

westurner commented 10 years ago

... [why] does salt.modules.debian_ip.get_network_settings return a single template (when the file doesn't exist on disk)? [1]

[1] https://github.com/saltstack/salt/blob/eade92145e32084379019b039644df7f7cf1064e/salt/modules/debian_ip.py#L1387

westurner commented 10 years ago

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)):

Debian & Ubuntu DNS configuration docs references:

bbinet commented 10 years ago

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 commented 10 years ago

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.

garethgreenaway commented 10 years ago

Going to take a look at getting these changes merged in.

bbinet commented 9 years ago

@garethgreenaway do you think the additions described in https://github.com/saltstack/salt/issues/12216#issuecomment-41358915 will be available in Helium release?

garethgreenaway commented 9 years ago

@bbinet these changes are in 2014.7 (Helium) now.

bbinet commented 9 years ago

Cool! Thanks @garethgreenaway.

westurner commented 9 years ago

@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:

stale[bot] commented 6 years ago

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.