diff --git a/nexus/db-model/src/schema.rs b/nexus/db-model/src/schema.rs index 02bdd2c349..ed819cba80 100644 --- a/nexus/db-model/src/schema.rs +++ b/nexus/db-model/src/schema.rs @@ -13,7 +13,7 @@ use omicron_common::api::external::SemverVersion; /// /// This should be updated whenever the schema is changed. For more details, /// refer to: schema/crdb/README.adoc -pub const SCHEMA_VERSION: SemverVersion = SemverVersion::new(23, 0, 1); +pub const SCHEMA_VERSION: SemverVersion = SemverVersion::new(24, 0, 0); table! { disk (id) { diff --git a/nexus/db-model/src/sled.rs b/nexus/db-model/src/sled.rs index afd1b890d8..f209a37b82 100644 --- a/nexus/db-model/src/sled.rs +++ b/nexus/db-model/src/sled.rs @@ -184,7 +184,6 @@ impl SledUpdate { let last_used_address = { let mut segments = self.ip().segments(); // We allocate the entire last segment to control plane services - // segments segments[7] = omicron_common::address::CP_SERVICES_RESERVED_ADDRESSES; ipv6::Ipv6Addr::from(Ipv6Addr::from(segments)) diff --git a/schema/crdb/24.0.0/up.sql b/schema/crdb/24.0.0/up.sql new file mode 100644 index 0000000000..753b260294 --- /dev/null +++ b/schema/crdb/24.0.0/up.sql @@ -0,0 +1,3 @@ +UPDATE omicron.public.sled + SET last_used_address = (netmask(setmasklen(ip, 64)) & ip) + 0xFFFF + WHERE time_deleted is null; diff --git a/schema/crdb/dbinit.sql b/schema/crdb/dbinit.sql index e40c97972f..9ef8d148fd 100644 --- a/schema/crdb/dbinit.sql +++ b/schema/crdb/dbinit.sql @@ -3258,7 +3258,7 @@ INSERT INTO omicron.public.db_metadata ( version, target_version ) VALUES - ( TRUE, NOW(), NOW(), '23.0.1', NULL) + ( TRUE, NOW(), NOW(), '24.0.0', NULL) ON CONFLICT DO NOTHING; COMMIT;