Skip to content

Some Debian network (debian_ip) refactoring - #49462

Merged
rallytime merged 11 commits into
saltstack:developfrom
MTecknology:debian-networking
Sep 4, 2018
Merged

rallytime merged 11 commits into
saltstack:developfrom
MTecknology:debian-networking

Conversation

@MTecknology

@MTecknology MTecknology commented Aug 31, 2018 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Commit a058e65 refactors the logic used in debian_ip._parse_settings_eth(). It re-works the logic used to put options into dictionaries and simplifies how some options are shared.

  • Adds -enable_ipv4: which is meant for future deprecation of IPv4
  • Makes better use of -enable_ipv6:
  • Adds support for -ipv4<opt>: prefix (similar to -ipv6<opt>:)
  • Adds support for sharing options between IPv4/v6
  • Supports overriding any IPv4/v6 option
  • Makes -proto: a required field

Commit 038261c adds new unit tests and updates/fixes existing tests.

  • Unit tests have been updated for modified behavior:
    • Make sure bond options are shared between IPv4/v6
    • Added tests for reported/discovered issues
  • Added tests:
    • Check for v4/v6-only option sharing/overwriting
    • Check that netmask/gw is not added unless specified

Commit dad829e reworks the debian_eth.jinja template.

  • Removes a lot of unique if's and turns them into a loop
  • Removes extraneous newlines in interfaces file
  • Cleans up redundancies
  • Allows all options to be space-delimited list, line-delimited list, or string

What issues does this PR fix or reference?

Tests written?

Yes

Commits signed with GPG?

Yes

This patch fixes logic errors made by using `def_addrfam` in assumptions
and removes the need to have `dual_stack` logic. It fixes bugs caused by
this logic.

Issue #46388 is resolved by preventing IPv4-only options from
over-writing IPv6 options.

This patch also:

- adds `-enable_ipv4:` which is meant for future deprecation of IPv4
- makes better use of `-enable_ipv6:`
- adds support for `-ipv4<opt>:` prefix (similar to `-ipv6<opt>:`)
- adds support for sharing options between IPv4/v6
- supports overriding any IPv4/v6 option
- makes `-proto:` a required field

BREAKS TESTS - Tests have not been updated for new behavior.
- Unit tests have been updated for fixed/improved behavior:
  + Bond options are shared between IPv4/v6
  + Added now-required `-proto:`
  + Added test for issue reported in #46388 (loopback v4opt->inet6)
- Removed some redundancy
- Added tests:
  + Check for v4/v6-only option sharing/overwriting
  + Check that netmask/gw is not added unless specified
- Turns list of options into loop, from long list of static if's
- Drops the (nearly redundant) separate IPv4/v6 block
- Allows all options to be space-delimited list, line-delimited list, or string
- Removes extraneous newlines in interfaces file
@MTecknology MTecknology changed the title Some Debian Network (debian_ip) Refactoring [WIP] Some Debian Network (debian_ip) Refactoring Aug 31, 2018
@MTecknology MTecknology changed the title [WIP] Some Debian Network (debian_ip) Refactoring Some Debian Network (debian_ip) Refactoring Aug 31, 2018
@MTecknology

MTecknology commented Aug 31, 2018 •

Copy link
Copy Markdown
Contributor Author

@cachedout @rallytime Is this something that should be backported because it fixes a bug present in existing versions, or are is this too much change?

@rallytime

Copy link
Copy Markdown
Contributor

@MTecknology I think this is a pretty big change that I'd like to let sit in develop for a while.

@MTecknology MTecknology changed the title Some Debian Network (debian_ip) Refactoring Some Debian network (debian_ip) refactoring Sep 2, 2018
@rallytime
rallytime merged commit 7db1cb2 into saltstack:develop Sep 4, 2018
@dynek

dynek commented Oct 3, 2018 •

Copy link
Copy Markdown

@MTecknology I think this is a pretty big change that I'd like to let sit in develop for a while.

When will this make it into a package available from http://repo.saltstack.com/apt/debian/9/amd64/?

Thank you

@MTecknology

MTecknology commented Oct 3, 2018 •

Copy link
Copy Markdown
Contributor Author

@dynek If I understand versions correctly, it'll be in 'neon'.

@dynek

dynek commented Nov 2, 2018

Copy link
Copy Markdown

@MTecknology I missed your answer. I just checked it and I do not see any mention of neon: https://docs.saltstack.com/en/latest/topics/releases/version_numbers.html
Do you think this will make it into a version after Fluorine is released?

One more question, is this affecting server or client side? What if my server is running 2017 while clients run 2018? Just trying to grasp if I should be upgrading both or if client is sufficient.

Thank you!

@rallytime

Copy link
Copy Markdown
Contributor

@dynek Yes, Neon is the feature release after Fluorine. I have updated that document in #50354 to include a few more release codenames.

@dynek

dynek commented Nov 13, 2018

Copy link
Copy Markdown

Surprising that it takes so long to make it into a released version.

/me puzzled but will wait :-)

@MTecknology

Copy link
Copy Markdown
Contributor Author

There's two reasons for this particular change taking a long time to land. 1) It's a really massive change that includes non-minor changes in behavior. 2) The next feature release is getting ever closer and they're shooting for stability so major changes like this won't make it in.

@MTecknology

Copy link
Copy Markdown
Contributor Author

@dynek I guess I was wrong about those two reasons!

I think I missed the 3000.1 release, but it should wind up in the next one... this time.

@dynek

dynek commented Sep 1, 2020

Copy link
Copy Markdown

It's been a while :-) Just tested this and I confirm it fixes the problem I was having.

Thank you @MTecknology

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-jam has master-port port to master has been created

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants