Commit e44bc27
committed
[multicast] implicit group lifecycle with IP pool integration
This PR also addresses permission models, object deletion, and error handling questions related to
reserved addresses presented in @askfongjojo's testing Google Doc (default IP Pools are covered
in a follow-up, stacked PR).
In thinking through the *Groups* API, permission scopes, and flexibility, @rcgoodfellow mentioned this consideration:
> Do we need an explicit notion of a group object at all? Or can
> instances simply allocate/deallocate group IPs from pools, and there is
> no explicit management of group objects.
With Fleet admins having access control to create pools and link silos to a pool, we arrived at the idea
of replacing the current explicit multicast group CRUD with an implicit lifecycle, where groups are created
upon the first member join and deleted when the last member leaves.
**Note**: Most of the PR's changes are test-related due to moving away from the explicit multicast group(s) lifecycle.
Auth Model:
- Discovery (fleet-scoped):
- Read/list groups and list members: any authenticated user in the same fleet.
- Membership (project-scoped):
- Join/leave requires Instance::Modify on the specific instance.
- Creation control:
- Implicit group creation only when the s silo is linked to a suitable multicast pool (by name or by explicit IP in that pool).
Behavior:
- Implicit lifecycle:
- Create on first join (idempotent); delete when last member leaves (atomic mark-for-removal, reconciler schedules cleanup).
- Addressing and validation:
- Implicit allocation from the s linked multicast pools.
- SSM/ASM semantics enforced:
- IPv4 SSM 232/8 and IPv6 ff3x::/32
- Error handling: - Reserved/invalid multicast ranges rejected at pool/range add time.
API:
- Primary flows:
- Group-centric member management: POST/DELETE /v1/multicast-groups/{group}/members
- Instance-centric join/leave: PUT/DELETE /v1/instances/{instance}/multicast-groups/{group}
- Discovery endpoints remain for list/view; there is no explicit group create/update/delete.
- This is a *breaking* change, but multicast is not yet enabled or available in production
Key changes:
- Implicit group model; groups exist while they have members.
- IP pool integration for multicast allocation with silo link gating.
- Simplified API centered on join/leave flows.
- Add multicast_ip to the member table for responses.
- For consistency, move to `Instant` type over `SystemTime` for mcast-related caches
Follow-ups (stacked PRs)
- [ ] Remove MVLAN from group data model.
- [ ] Default IP pool support (IPv4/IPv6 Followrequire unicast/multicast).
- [ ] Dendrite: use omicron-common constants for validation.1 parent 64b40cb commit e44bc27
File tree
53 files changed
+7614
-6459
lines changed- common/src
- dev-tools/omdb/tests
- illumos-utils/src/opte
- nexus
- auth/src/authz
- db-model/src
- db-queries
- src/db
- datastore
- multicast
- ops
- pub_test_utils
- queries
- tests/output
- db-schema/src
- external-api
- output
- src
- src
- app
- background/tasks/multicast
- multicast
- sagas
- external_api
- test-utils/src
- tests/integration_tests
- multicast
- types/src
- external_api
- internal_api
- openapi
- schema/crdb
- multicast-member-ip-and-indexes
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
53 files changed
+7614
-6459
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
30 | 29 | | |
31 | | - | |
| 30 | + | |
32 | 31 | | |
33 | | - | |
34 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | | - | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | | - | |
40 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
| 46 | + | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
48 | 49 | | |
49 | | - | |
| 50 | + | |
50 | 51 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
55 | 64 | | |
56 | 65 | | |
57 | | - | |
58 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
59 | 70 | | |
60 | 71 | | |
61 | 72 | | |
62 | 73 | | |
| 74 | + | |
63 | 75 | | |
64 | 76 | | |
65 | 77 | | |
66 | | - | |
67 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
68 | 84 | | |
69 | 85 | | |
70 | 86 | | |
71 | 87 | | |
72 | | - | |
73 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
74 | 92 | | |
75 | 93 | | |
76 | 94 | | |
| |||
82 | 100 | | |
83 | 101 | | |
84 | 102 | | |
| 103 | + | |
85 | 104 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
93 | 116 | | |
94 | 117 | | |
| 118 | + | |
95 | 119 | | |
96 | 120 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
104 | 195 | | |
105 | 196 | | |
106 | 197 | | |
| |||
254 | 345 | | |
255 | 346 | | |
256 | 347 | | |
257 | | - | |
258 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
259 | 351 | | |
260 | 352 | | |
261 | 353 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
713 | 713 | | |
714 | 714 | | |
715 | 715 | | |
716 | | - | |
| 716 | + | |
717 | 717 | | |
718 | 718 | | |
719 | 719 | | |
| |||
1281 | 1281 | | |
1282 | 1282 | | |
1283 | 1283 | | |
1284 | | - | |
| 1284 | + | |
1285 | 1285 | | |
1286 | 1286 | | |
1287 | 1287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
836 | 836 | | |
837 | 837 | | |
838 | 838 | | |
839 | | - | |
| 839 | + | |
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
483 | 482 | | |
484 | 483 | | |
485 | | - | |
486 | | - | |
| 484 | + | |
| 485 | + | |
487 | 486 | | |
488 | | - | |
489 | | - | |
| 487 | + | |
490 | 488 | | |
491 | 489 | | |
492 | 490 | | |
| |||
1393 | 1391 | | |
1394 | 1392 | | |
1395 | 1393 | | |
1396 | | - | |
1397 | | - | |
1398 | | - | |
| 1394 | + | |
| 1395 | + | |
1399 | 1396 | | |
1400 | 1397 | | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | | - | |
1405 | | - | |
1406 | | - | |
| 1398 | + | |
| 1399 | + | |
1407 | 1400 | | |
1408 | | - | |
1409 | | - | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
1414 | | - | |
1415 | | - | |
1416 | | - | |
1417 | | - | |
1418 | | - | |
| 1401 | + | |
| 1402 | + | |
1419 | 1403 | | |
1420 | 1404 | | |
1421 | 1405 | | |
1422 | 1406 | | |
1423 | 1407 | | |
1424 | | - | |
| 1408 | + | |
1425 | 1409 | | |
1426 | 1410 | | |
1427 | 1411 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
| 496 | + | |
496 | 497 | | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
| 498 | + | |
501 | 499 | | |
502 | 500 | | |
503 | | - | |
504 | | - | |
505 | 501 | | |
506 | 502 | | |
507 | 503 | | |
508 | 504 | | |
509 | 505 | | |
510 | 506 | | |
511 | 507 | | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | 508 | | |
519 | | - | |
520 | | - | |
521 | | - | |
| 509 | + | |
| 510 | + | |
522 | 511 | | |
523 | | - | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
524 | 522 | | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
| 523 | + | |
530 | 524 | | |
531 | | - | |
| 525 | + | |
532 | 526 | | |
533 | | - | |
534 | | - | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
535 | 530 | | |
536 | 531 | | |
537 | 532 | | |
| |||
0 commit comments