Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
S slapos.core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 26
    • Merge requests 26
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slapos.core
  • Merge requests
  • !455

Merged
Created Nov 24, 2022 by Xavier Thompson@xavier_thompsonOwner

Slapformat: IPv6 range for partitions and tun

  • Overview 33
  • Commits 11
  • Changes 4

Introduce two new features in slapformat:

  • IPv6 ranges for partitions (option partition_has_ipv6_range): give each partition a /N+16` IPv6 subrange
  • IPv6 ranges for tuns (option tun_ipv6): give each tun a /N+16` IPv6 subrange

Both options are true by default (but tun_ipv6only applies if create_tun is true).

It also changes the way IPv6 ranges and addresses are attributed : instead of a purely random selection with retry if the selected address or range is already taken, a deterministic mapping based on the partition index is first attempted, with a fallback to the previous random retry mechanism in case of collision (which only happens if some addresses or ranges are attributed without using the mapping, e.g. on a existing node).

The deterministic mapping works as such: The top level /N IPv6 range is first divided into 4 /N+2 subsets numbered 0..3, and each is then divided into 2^14 /N+2+14 subranges, i.e. /N+16. Then:

  • IPv6 range for partition i: subrange i of subset 1
  • Tap range for partition i: subrange i of subset 2
  • Tun range for partition i: subrange i of subset 3

Along the way make some minor improvements, fixes and refactors.

Based on @tomo's proof of concept b21e68ff

Edited Feb 27, 2023 by Xavier Thompson
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: feat/ipv6_range_and_tun
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7