Commit d2ddaf6
committed
Direct Routed networks: drop the gateways entirely
The gateways on an L3 network were pure ballast: the Instance's gateway
is always the shared link-local address (169.254.0.1 / fe80::1), the
design doc already recorded the stored values as never used, and for
IPv6 the declared gateway burnt an address in the subnet the operator
then had to keep free. Stop requiring them: gateway and ip6gateway are
accepted for API compatibility but ignored and stored as NULL. A
complete IPv4 family is now netmask + startip (endip defaults to
startip, the subnet derives from startip + netmask), a complete IPv6
family is ip6cidr alone; start/end IPs are validated against the subnet
itself.
The gateways were load-bearing in the plumbing though, in four places
this rewires:
- The orchestrator only copied cidr/ip6cidr onto the network when the
matching gateway was present; L3 keeps its cidrs without one.
- The two allocation gates keyed on gateway presence -
IpAddressManagerImpl.allocateDirectIp() for IPv4 and
Ipv6AddressManagerImpl.setNicIp6Address() for IPv6 - gate on the L3
network's cidr instead.
- createVlanAndPublicIpRange() derived the range's subnet from the
gateway and validated it; a gateway-less L3 range derives it from the
start IP, and checkPublicIpRangeErrors()/checkZoneVlanIpOverlap()
are null-gateway tolerant (the latter also stops keying its IPv6
overlap loop on ip6_gateway, using ip6_cidr - which is what it
actually compares).
- DirectRoutedNetworkGuru.design() no longer demands cidr and gateway
as a pair.
The UI form loses both gateway fields. Existing L3 networks with stored
gateways keep working: every changed gate checks the gateway first.
Tests: validator and checkL3Ip6Parameters unit tests reworked for the
new groups, integration tests create gateway-less networks and assert
given gateways are ignored, and the l3_network test data drops its
gateway.
Claude-Session: https://claude.ai/code/session_01LkswKyuC2a58YCHFTEPnay1 parent 4546822 commit d2ddaf6
12 files changed
Lines changed: 180 additions & 105 deletions
File tree
- docs/design
- engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration
- server/src
- main/java/com/cloud
- configuration
- network
- guru
- test/java/com/cloud/network
- test/integration/smoke
- tools/marvin/marvin/config
- ui
- public/locales
- src/views/network
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
278 | 285 | | |
279 | 286 | | |
280 | 287 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3119 | 3119 | | |
3120 | 3120 | | |
3121 | 3121 | | |
3122 | | - | |
| 3122 | + | |
| 3123 | + | |
| 3124 | + | |
3123 | 3125 | | |
3124 | 3126 | | |
3125 | 3127 | | |
3126 | 3128 | | |
3127 | | - | |
| 3129 | + | |
3128 | 3130 | | |
3129 | 3131 | | |
3130 | 3132 | | |
| |||
Lines changed: 25 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5841 | 5841 | | |
5842 | 5842 | | |
5843 | 5843 | | |
| 5844 | + | |
| 5845 | + | |
| 5846 | + | |
5844 | 5847 | | |
5845 | 5848 | | |
5846 | | - | |
| 5849 | + | |
5847 | 5850 | | |
5848 | 5851 | | |
5849 | 5852 | | |
| |||
5854 | 5857 | | |
5855 | 5858 | | |
5856 | 5859 | | |
5857 | | - | |
| 5860 | + | |
5858 | 5861 | | |
5859 | 5862 | | |
5860 | 5863 | | |
| |||
5866 | 5869 | | |
5867 | 5870 | | |
5868 | 5871 | | |
5869 | | - | |
| 5872 | + | |
5870 | 5873 | | |
5871 | 5874 | | |
5872 | | - | |
| 5875 | + | |
5873 | 5876 | | |
5874 | 5877 | | |
5875 | 5878 | | |
| |||
5903 | 5906 | | |
5904 | 5907 | | |
5905 | 5908 | | |
5906 | | - | |
| 5909 | + | |
5907 | 5910 | | |
5908 | 5911 | | |
5909 | 5912 | | |
| |||
6049 | 6052 | | |
6050 | 6053 | | |
6051 | 6054 | | |
6052 | | - | |
| 6055 | + | |
6053 | 6056 | | |
6054 | 6057 | | |
6055 | 6058 | | |
| |||
6853 | 6856 | | |
6854 | 6857 | | |
6855 | 6858 | | |
6856 | | - | |
6857 | | - | |
6858 | | - | |
| 6859 | + | |
| 6860 | + | |
| 6861 | + | |
| 6862 | + | |
| 6863 | + | |
| 6864 | + | |
6859 | 6865 | | |
6860 | | - | |
6861 | | - | |
| 6866 | + | |
| 6867 | + | |
| 6868 | + | |
6862 | 6869 | | |
6863 | 6870 | | |
6864 | 6871 | | |
6865 | 6872 | | |
6866 | 6873 | | |
6867 | 6874 | | |
6868 | 6875 | | |
6869 | | - | |
6870 | | - | |
6871 | | - | |
6872 | | - | |
6873 | | - | |
| 6876 | + | |
| 6877 | + | |
| 6878 | + | |
| 6879 | + | |
| 6880 | + | |
| 6881 | + | |
| 6882 | + | |
6874 | 6883 | | |
6875 | 6884 | | |
6876 | 6885 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2436 | 2436 | | |
2437 | 2437 | | |
2438 | 2438 | | |
2439 | | - | |
2440 | | - | |
2441 | | - | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
2442 | 2442 | | |
2443 | 2443 | | |
2444 | 2444 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
| 208 | + | |
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| |||
Lines changed: 69 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
875 | 875 | | |
876 | 876 | | |
877 | 877 | | |
878 | | - | |
879 | | - | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
880 | 882 | | |
881 | 883 | | |
882 | 884 | | |
883 | | - | |
884 | | - | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
889 | 891 | | |
890 | 892 | | |
891 | | - | |
| 893 | + | |
892 | 894 | | |
893 | 895 | | |
894 | 896 | | |
895 | | - | |
| 897 | + | |
896 | 898 | | |
897 | 899 | | |
898 | 900 | | |
899 | | - | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
900 | 923 | | |
901 | 924 | | |
902 | 925 | | |
| |||
1634 | 1657 | | |
1635 | 1658 | | |
1636 | 1659 | | |
1637 | | - | |
1638 | | - | |
1639 | | - | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
1640 | 1670 | | |
1641 | | - | |
1642 | | - | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
1643 | 1683 | | |
1644 | 1684 | | |
1645 | 1685 | | |
| |||
1666 | 1706 | | |
1667 | 1707 | | |
1668 | 1708 | | |
1669 | | - | |
1670 | | - | |
1671 | | - | |
1672 | 1709 | | |
1673 | 1710 | | |
1674 | 1711 | | |
| |||
1682 | 1719 | | |
1683 | 1720 | | |
1684 | 1721 | | |
1685 | | - | |
| 1722 | + | |
1686 | 1723 | | |
1687 | 1724 | | |
1688 | 1725 | | |
1689 | | - | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
1690 | 1733 | | |
1691 | 1734 | | |
1692 | 1735 | | |
| |||
1710 | 1753 | | |
1711 | 1754 | | |
1712 | 1755 | | |
1713 | | - | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
1714 | 1761 | | |
1715 | 1762 | | |
1716 | 1763 | | |
| |||
0 commit comments