Commit f47aefc
authored
[nexus] Remove project_id, rack_id from IP pools (#2056)
## Before this PR
- IP Pools could exist in at most one project. IP allocation during
instance creation occurred by [either by requesting an IP pool belonging
to a project, or by "just looking for any unreserved IP
Pool"](https://github.com/oxidecomputer/omicron/blob/79765a4e3b39a29bc9940c0e4a49c4364fbcc9e3/nexus/src/db/queries/external_ip.rs#L186-L212).
As discussed in #2055 ,
our intention is for IP pools to be used across multiple projects, and
for projects to be able to use multiple IP pools.
- "Service" IP pools were indexed by rack ID, though (as documented in
#1276 ), they should
probably be accessed by AZ instead.
## This PR
- Adds a default IP pool named `default`, which is used for address
allocation unless a more specific IP pool is provided
- Removes "project ID" from IP pools (and external IP addresses)
- Removes "rack ID" from IP pool API and DB representation
## In the future
- This PR doesn't provide the many-to-many connection between projects
and IP pools that we eventually want, where projects can be configured
to use different IP pools for different purposes. However, by removing
the not-quite-accurate relationship that an IP pool must belong to a
*single* project, the API moves closer towards this direction.
- We probably should access the `service_ip_pool` API with the AZ UUID
used for the query, but since AZs don't exist in the API yet, this has
been omitted.
Part of #20551 parent 3593342 commit f47aefc
File tree
32 files changed
+330
-913
lines changed- common/src/sql
- end-to-end-tests/src/bin
- nexus
- db-model/src
- src
- app
- sagas
- db
- datastore
- queries
- external_api
- test-utils/src
- tests
- integration_tests
- output
- types/src/external_api
- openapi
32 files changed
+330
-913
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1112 | 1112 | | |
1113 | 1113 | | |
1114 | 1114 | | |
1115 | | - | |
1116 | | - | |
1117 | 1115 | | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
1121 | | - | |
1122 | | - | |
1123 | | - | |
1124 | | - | |
| 1116 | + | |
| 1117 | + | |
1125 | 1118 | | |
1126 | 1119 | | |
1127 | 1120 | | |
| |||
1135 | 1128 | | |
1136 | 1129 | | |
1137 | 1130 | | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
1147 | 1131 | | |
1148 | 1132 | | |
1149 | 1133 | | |
| |||
1158 | 1142 | | |
1159 | 1143 | | |
1160 | 1144 | | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
1164 | | - | |
1165 | | - | |
1166 | | - | |
1167 | | - | |
1168 | | - | |
1169 | | - | |
1170 | 1145 | | |
1171 | 1146 | | |
1172 | 1147 | | |
1173 | 1148 | | |
1174 | | - | |
| 1149 | + | |
1175 | 1150 | | |
1176 | 1151 | | |
1177 | 1152 | | |
| |||
1187 | 1162 | | |
1188 | 1163 | | |
1189 | 1164 | | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
1196 | | - | |
1197 | | - | |
1198 | 1165 | | |
1199 | 1166 | | |
1200 | 1167 | | |
| |||
1245 | 1212 | | |
1246 | 1213 | | |
1247 | 1214 | | |
1248 | | - | |
1249 | | - | |
1250 | | - | |
1251 | 1215 | | |
1252 | 1216 | | |
1253 | 1217 | | |
| |||
1263 | 1227 | | |
1264 | 1228 | | |
1265 | 1229 | | |
1266 | | - | |
1267 | | - | |
1268 | | - | |
1269 | | - | |
1270 | | - | |
1271 | | - | |
1272 | | - | |
1273 | | - | |
1274 | | - | |
1275 | 1230 | | |
1276 | 1231 | | |
1277 | 1232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | 33 | | |
46 | 34 | | |
47 | | - | |
| 35 | + | |
48 | 36 | | |
49 | 37 | | |
50 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
| |||
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | 82 | | |
96 | 83 | | |
97 | 84 | | |
| |||
102 | 89 | | |
103 | 90 | | |
104 | 91 | | |
105 | | - | |
| 92 | + | |
106 | 93 | | |
107 | 94 | | |
108 | 95 | | |
109 | 96 | | |
110 | 97 | | |
111 | | - | |
112 | 98 | | |
113 | | - | |
| 99 | + | |
114 | 100 | | |
115 | 101 | | |
116 | 102 | | |
| |||
119 | 105 | | |
120 | 106 | | |
121 | 107 | | |
122 | | - | |
| 108 | + | |
123 | 109 | | |
124 | 110 | | |
125 | 111 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 112 | + | |
132 | 113 | | |
133 | 114 | | |
134 | 115 | | |
135 | 116 | | |
136 | 117 | | |
137 | 118 | | |
138 | 119 | | |
139 | | - | |
| 120 | + | |
140 | 121 | | |
141 | 122 | | |
142 | 123 | | |
143 | 124 | | |
144 | 125 | | |
145 | 126 | | |
146 | 127 | | |
147 | | - | |
148 | | - | |
| 128 | + | |
149 | 129 | | |
150 | 130 | | |
151 | 131 | | |
| |||
154 | 134 | | |
155 | 135 | | |
156 | 136 | | |
157 | | - | |
| 137 | + | |
158 | 138 | | |
159 | 139 | | |
160 | 140 | | |
| |||
166 | 146 | | |
167 | 147 | | |
168 | 148 | | |
169 | | - | |
| 149 | + | |
170 | 150 | | |
171 | 151 | | |
172 | 152 | | |
| |||
194 | 174 | | |
195 | 175 | | |
196 | 176 | | |
197 | | - | |
198 | | - | |
| 177 | + | |
| 178 | + | |
199 | 179 | | |
200 | 180 | | |
201 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
| |||
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
47 | | - | |
48 | | - | |
| 45 | + | |
49 | 46 | | |
50 | 47 | | |
51 | 48 | | |
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
55 | | - | |
56 | | - | |
| 52 | + | |
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
61 | 57 | | |
62 | 58 | | |
63 | 59 | | |
64 | | - | |
| 60 | + | |
65 | 61 | | |
66 | 62 | | |
67 | 63 | | |
| |||
98 | 94 | | |
99 | 95 | | |
100 | 96 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 97 | | |
105 | 98 | | |
106 | 99 | | |
107 | 100 | | |
108 | 101 | | |
109 | 102 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| 103 | + | |
115 | 104 | | |
116 | 105 | | |
117 | 106 | | |
| |||
129 | 118 | | |
130 | 119 | | |
131 | 120 | | |
132 | | - | |
133 | 121 | | |
134 | 122 | | |
135 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
8 | 6 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 7 | + | |
12 | 8 | | |
13 | 9 | | |
14 | 10 | | |
| |||
83 | 79 | | |
84 | 80 | | |
85 | 81 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | 82 | | |
107 | 83 | | |
108 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
| 152 | + | |
154 | 153 | | |
155 | 154 | | |
156 | 155 | | |
| |||
164 | 163 | | |
165 | 164 | | |
166 | 165 | | |
167 | | - | |
168 | 166 | | |
169 | 167 | | |
170 | 168 | | |
| |||
179 | 177 | | |
180 | 178 | | |
181 | 179 | | |
182 | | - | |
183 | 180 | | |
184 | 181 | | |
185 | 182 | | |
| |||
0 commit comments