-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
621a7a3
commit 8a6db09
Showing
3 changed files
with
99 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
-- Table of all sled subnets allocated for sleds added to an already initialized | ||
-- rack. The sleds in this table and their allocated subnets are created before | ||
-- a sled is added to the `sled` table. Addition to the `sled` table occurs | ||
-- after the sled is initialized and notifies Nexus about itself. | ||
-- | ||
-- For simplicity and space savings, this table doesn't actually contain the | ||
-- full subnets for a given sled, but only the octet that extends a /56 rack | ||
-- subnet to a /64 sled subnet. The rack subnet is maintained in the `rack` | ||
-- table. | ||
-- | ||
-- This table does not include subnet octets allocated during RSS and therefore | ||
-- all of the octets start at 33. This makes the data in this table purely additive | ||
-- post-RSS, which also implies that we cannot re-use subnet octets if an original | ||
-- sled that was part of RSS was removed from the cluster. | ||
-- | ||
-- All modifications to this table should be guarded by the | ||
-- `reconfiguration_epoch` row in the `rack` table. | ||
CREATE TABLE IF NOT EXISTS omicron.public.sled_underlay_subnet_allocations { | ||
-- The rack to which a sled is being added | ||
-- (foreign key into `rack` table) | ||
-- | ||
-- We require this because the sled is not yet part of the sled table when | ||
-- we first allocate a subnet for it. | ||
rack_id UUID NOT NULL | ||
|
||
-- The sled to which a subnet is being allocated | ||
-- | ||
-- Eventually will be a foreign key into the `sled` table when the sled notifies nexus | ||
-- about itself after initialization. | ||
sled_id UUID NOT NULL, | ||
|
||
-- The octet that extends a /56 rack subnet to a /64 sled subnet | ||
-- | ||
-- Always between 33 and 255 inclusive | ||
subnet_octet INT2 NOT NULL UNIQUE, | ||
|
||
-- The physical identity of the sled | ||
-- (foreign key into `hw_baseboard_id` table) | ||
hw_baseboard_id UUID NOT NULL UNIQUE, | ||
|
||
-- Each update will grab all allocations for a rack to figure out what | ||
-- subnet octets are free | ||
PRIMARY KEY (rack_id, sled_id) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE omicron.public.rack ADD COLUMN IF NOT EXISTS reconfiguration_epoch INT8 NOT NULL DEFAULT 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters