From dee4bf05778485f5b9fdd8621e9339d0e72fa561 Mon Sep 17 00:00:00 2001 From: David Crespo Date: Thu, 4 Jun 2026 18:46:56 -0500 Subject: [PATCH 1/2] bump omicron API version to latest on #10472 (no UI) --- OMICRON_VERSION | 2 +- app/api/__generated__/Api.ts | 56 +++++++++++++++++-- app/api/__generated__/OMICRON_VERSION | 2 +- app/api/__generated__/msw-handlers.ts | 23 ++++++++ app/api/__generated__/validate.ts | 43 +++++++++++++- .../project/instances/AutoRestartCard.tsx | 1 + app/pages/project/instances/InstancePage.tsx | 1 + app/pages/project/instances/StorageTab.tsx | 4 ++ mock-api/disk.ts | 4 +- mock-api/image.ts | 2 +- mock-api/instance.ts | 1 + mock-api/msw/handlers.ts | 6 ++ mock-api/msw/util.ts | 5 +- 13 files changed, 136 insertions(+), 14 deletions(-) diff --git a/OMICRON_VERSION b/OMICRON_VERSION index e91b1c4761..7c5c3d5499 100644 --- a/OMICRON_VERSION +++ b/OMICRON_VERSION @@ -1 +1 @@ -985304a607b16191bdc35e0ea87fa522d925b514 +ec71f785aacdc38d51e887534fc3fe0326665223 diff --git a/app/api/__generated__/Api.ts b/app/api/__generated__/Api.ts index 7e88135aa7..94cddc263a 100644 --- a/app/api/__generated__/Api.ts +++ b/app/api/__generated__/Api.ts @@ -1283,7 +1283,9 @@ export type Binuint8 = { } /** - * Disk block size in bytes + * Block size in bytes + * + * Valid values are: 512, 2048, or 4096. */ export type BlockSize = 512 | 2048 | 4096 @@ -1893,7 +1895,7 @@ export type DiskState = /** Disk is being initialized */ * View of a Disk */ export type Disk = { - blockSize: ByteCount + blockSize: BlockSize /** Human-readable free-form text about a resource */ description: string devicePath: string @@ -2394,7 +2396,7 @@ export type IdpMetadataSource = */ export type Image = { /** Size of blocks in bytes */ - blockSize: ByteCount + blockSize: BlockSize /** Human-readable free-form text about a resource */ description: string /** Hash of the image contents, if applicable */ @@ -2505,6 +2507,8 @@ This policy determines whether the instance should be automatically restarted by cpuPlatform?: InstanceCpuPlatform | null /** Human-readable free-form text about a resource */ description: string + /** When true, this instance has opted in to jumbo frames (8500 byte MTU) on its primary network interface. The effective MTU also depends on the fleet-wide jumbo-frames opt-in; if that is disabled, the primary interface uses the default MTU regardless of this value. Changes only take effect on the next instance restart. */ + enableJumboFrames: boolean /** RFC1035-compliant hostname for the instance */ hostname: string /** Unique, immutable, system-controlled identifier for each resource */ @@ -2685,6 +2689,8 @@ Disk attachments of type "create" will be created, while those of type "attach" The order of this list does not guarantee a boot order for the instance. Use the boot_disk attribute to specify a boot disk. When boot_disk is specified it will count against the disk attachment limit. */ disks?: InstanceDiskAttachment[] + /** Enable jumbo frames (8500 byte MTU) on the instance's primary OPTE interface. Requires the fleet-wide jumbo-frames opt-in to be enabled by an operator; otherwise this field must be `false`. Changes only take effect on the next instance restart. */ + enableJumboFrames?: boolean /** The external IP addresses provided to this instance. By default, all instances have outbound connectivity, but no inbound connectivity. These external addresses can be used to provide a fixed, known IP address for making inbound connections to the instance. */ @@ -2855,6 +2861,8 @@ An instance that does not have a boot disk set will use the boot options specifi bootDisk: NameOrId | null /** The CPU platform to be used for this instance. If this is `null`, the instance requires no particular CPU platform; when it is started the instance will have the most general CPU platform supported by the sled it is initially placed on. */ cpuPlatform: InstanceCpuPlatform | null + /** Update the per-instance jumbo-frames opt-in. Setting this to `true` requires the fleet-wide jumbo-frames opt-in to be enabled. Changes only take effect on the next instance restart. */ + enableJumboFrames: boolean /** The amount of RAM (in bytes) to be allocated to the instance */ memory: ByteCount /** Multicast groups this instance should join. @@ -5012,6 +5020,22 @@ export type SwitchResultsPage = { nextPage?: string | null } +/** + * Fleet-wide networking settings. Only fleet viewers may view these settings. Only fleet admins can modify them. + */ +export type SystemNetworkingSettings = { + /** When true, end users may opt in to jumbo frames (8500 byte MTU) on the primary interface of an instance. When false, instance-level opt-in is ignored and OPTE ports are created with the default MTU. */ + externalJumboFramesOptInEnabled: boolean +} + +/** + * Parameters for updating the fleet-wide networking settings. + */ +export type SystemNetworkingSettingsUpdate = { + /** Toggle the fleet-wide external jumbo-frames opt-in. */ + externalJumboFramesOptInEnabled?: boolean +} + /** * View of a system software target release */ @@ -7513,7 +7537,7 @@ export class Api { * Pulled from info.version in the OpenAPI schema. Sent in the * `api-version` header on all requests. */ - apiVersion = '2026052000.0.0' + apiVersion = '2026060500.0.0' constructor({ host = '', baseParams = {}, token }: ApiConfig = {}) { this.host = host @@ -11092,6 +11116,30 @@ export class Api { ...params, }) }, + /** + * Fetch fleet-wide networking settings + */ + systemNetworkingSettingsView: (_: EmptyObj, params: FetchParams = {}) => { + return this.request({ + path: `/v1/system/networking/settings`, + method: 'GET', + ...params, + }) + }, + /** + * Update fleet-wide networking settings + */ + systemNetworkingSettingsUpdate: ( + { body }: { body: SystemNetworkingSettingsUpdate }, + params: FetchParams = {} + ) => { + return this.request({ + path: `/v1/system/networking/settings`, + method: 'PUT', + body, + ...params, + }) + }, /** * List switch port settings */ diff --git a/app/api/__generated__/OMICRON_VERSION b/app/api/__generated__/OMICRON_VERSION index 3648028c01..f043864c97 100644 --- a/app/api/__generated__/OMICRON_VERSION +++ b/app/api/__generated__/OMICRON_VERSION @@ -1,2 +1,2 @@ # generated file. do not update manually. see docs/update-pinned-api.md -985304a607b16191bdc35e0ea87fa522d925b514 +ec71f785aacdc38d51e887534fc3fe0326665223 diff --git a/app/api/__generated__/msw-handlers.ts b/app/api/__generated__/msw-handlers.ts index d888fea05e..cae57d8e40 100644 --- a/app/api/__generated__/msw-handlers.ts +++ b/app/api/__generated__/msw-handlers.ts @@ -1531,6 +1531,17 @@ export interface MSWHandlers { req: Request cookies: Record }) => Promisable + /** `GET /v1/system/networking/settings` */ + systemNetworkingSettingsView: (params: { + req: Request + cookies: Record + }) => Promisable> + /** `PUT /v1/system/networking/settings` */ + systemNetworkingSettingsUpdate: (params: { + body: Json + req: Request + cookies: Record + }) => Promisable> /** `GET /v1/system/networking/switch-port-settings` */ networkingSwitchPortSettingsList: (params: { query: Api.NetworkingSwitchPortSettingsListQueryParams @@ -3464,6 +3475,18 @@ export function makeHandlers(handlers: MSWHandlers): HttpHandler[] { null ) ), + http.get( + '/v1/system/networking/settings', + handler(handlers['systemNetworkingSettingsView'], null, null) + ), + http.put( + '/v1/system/networking/settings', + handler( + handlers['systemNetworkingSettingsUpdate'], + null, + schema.SystemNetworkingSettingsUpdate + ) + ), http.get( '/v1/system/networking/switch-port-settings', handler( diff --git a/app/api/__generated__/validate.ts b/app/api/__generated__/validate.ts index 1985c8d2a3..a977fb097b 100644 --- a/app/api/__generated__/validate.ts +++ b/app/api/__generated__/validate.ts @@ -1220,7 +1220,9 @@ export const Binuint8 = z.preprocess( ) /** - * Disk block size in bytes + * Block size in bytes + * + * Valid values are: 512, 2048, or 4096. */ export const BlockSize = z.preprocess( processResponseBody, @@ -1745,7 +1747,7 @@ export const DiskState = z.preprocess( export const Disk = z.preprocess( processResponseBody, z.object({ - blockSize: ByteCount, + blockSize: BlockSize, description: z.string(), devicePath: z.string(), diskType: DiskType, @@ -2251,7 +2253,7 @@ export const IdpMetadataSource = z.preprocess( export const Image = z.preprocess( processResponseBody, z.object({ - blockSize: ByteCount, + blockSize: BlockSize, description: z.string(), digest: Digest.nullable().optional(), id: z.uuid(), @@ -2349,6 +2351,7 @@ export const Instance = z.preprocess( bootDiskId: z.uuid().nullable().optional(), cpuPlatform: InstanceCpuPlatform.nullable().optional(), description: z.string(), + enableJumboFrames: SafeBoolean, hostname: z.string(), id: z.uuid(), memory: ByteCount, @@ -2500,6 +2503,7 @@ export const InstanceCreate = z.preprocess( cpuPlatform: InstanceCpuPlatform.nullable().default(null), description: z.string(), disks: InstanceDiskAttachment.array().default([]), + enableJumboFrames: SafeBoolean.default(false), externalIps: ExternalIpCreate.array().default([]), hostname: Hostname, memory: ByteCount, @@ -2644,6 +2648,7 @@ export const InstanceUpdate = z.preprocess( autoRestartPolicy: InstanceAutoRestartPolicy.nullable(), bootDisk: NameOrId.nullable(), cpuPlatform: InstanceCpuPlatform.nullable(), + enableJumboFrames: SafeBoolean, memory: ByteCount, multicastGroups: MulticastGroupJoinSpec.array().nullable().default(null), ncpus: InstanceCpuCount, @@ -4546,6 +4551,22 @@ export const SwitchResultsPage = z.preprocess( z.object({ items: Switch.array(), nextPage: z.string().nullable().optional() }) ) +/** + * Fleet-wide networking settings. Only fleet viewers may view these settings. Only fleet admins can modify them. + */ +export const SystemNetworkingSettings = z.preprocess( + processResponseBody, + z.object({ externalJumboFramesOptInEnabled: SafeBoolean }) +) + +/** + * Parameters for updating the fleet-wide networking settings. + */ +export const SystemNetworkingSettingsUpdate = z.preprocess( + processResponseBody, + z.object({ externalJumboFramesOptInEnabled: SafeBoolean.default(false) }) +) + /** * View of a system software target release */ @@ -7817,6 +7838,22 @@ export const NetworkingLoopbackAddressDeleteParams = z.preprocess( }) ) +export const SystemNetworkingSettingsViewParams = z.preprocess( + processResponseBody, + z.object({ + path: z.object({}), + query: z.object({}), + }) +) + +export const SystemNetworkingSettingsUpdateParams = z.preprocess( + processResponseBody, + z.object({ + path: z.object({}), + query: z.object({}), + }) +) + export const NetworkingSwitchPortSettingsListParams = z.preprocess( processResponseBody, z.object({ diff --git a/app/pages/project/instances/AutoRestartCard.tsx b/app/pages/project/instances/AutoRestartCard.tsx index bf00ae8b39..be2a382cbb 100644 --- a/app/pages/project/instances/AutoRestartCard.tsx +++ b/app/pages/project/instances/AutoRestartCard.tsx @@ -89,6 +89,7 @@ export function AutoRestartCard() { memory: instance.memory, cpuPlatform: instance.cpuPlatform || null, bootDisk: instance.bootDiskId || null, + enableJumboFrames: instance.enableJumboFrames, }, }) }) diff --git a/app/pages/project/instances/InstancePage.tsx b/app/pages/project/instances/InstancePage.tsx index 0a02ccc6ca..c8146cc865 100644 --- a/app/pages/project/instances/InstancePage.tsx +++ b/app/pages/project/instances/InstancePage.tsx @@ -325,6 +325,7 @@ export function ResizeInstanceModal({ bootDisk: instance.bootDiskId || null, cpuPlatform: instance.cpuPlatform || null, autoRestartPolicy: instance.autoRestartPolicy || null, + enableJumboFrames: instance.enableJumboFrames, }, }) }) diff --git a/app/pages/project/instances/StorageTab.tsx b/app/pages/project/instances/StorageTab.tsx index 86bb123e2a..f846a1d60d 100644 --- a/app/pages/project/instances/StorageTab.tsx +++ b/app/pages/project/instances/StorageTab.tsx @@ -187,6 +187,7 @@ export default function StorageTab() { memory: instance.memory, autoRestartPolicy: instance.autoRestartPolicy || null, cpuPlatform: instance.cpuPlatform || null, + enableJumboFrames: instance.enableJumboFrames, }, }), errorTitle: 'Could not unset boot disk', @@ -224,6 +225,7 @@ export default function StorageTab() { instance.ncpus, instance.memory, instance.cpuPlatform, + instance.enableJumboFrames, getSnapshotAction, ] ) @@ -252,6 +254,7 @@ export default function StorageTab() { memory: instance.memory, autoRestartPolicy: instance.autoRestartPolicy || null, cpuPlatform: instance.cpuPlatform || null, + enableJumboFrames: instance.enableJumboFrames, }, }), errorTitle: `Could not ${verb} boot disk`, @@ -304,6 +307,7 @@ export default function StorageTab() { instance.ncpus, instance.memory, instance.cpuPlatform, + instance.enableJumboFrames, getSnapshotAction, bootDisks, ] diff --git a/mock-api/disk.ts b/mock-api/disk.ts index e496474b43..76f3cb3dbe 100644 --- a/mock-api/disk.ts +++ b/mock-api/disk.ts @@ -288,8 +288,8 @@ export const disks: Json[] = [ device_path: '/jkl', size: 12 * GiB, block_size: 2048, - disk_type: 'distributed' as const, + disk_type: 'distributed', read_only: false, - } + } satisfies Json }), ] diff --git a/mock-api/image.ts b/mock-api/image.ts index 9050a6a44c..e7e429a1ef 100644 --- a/mock-api/image.ts +++ b/mock-api/image.ts @@ -15,7 +15,7 @@ import { project } from './project' const base = { time_created: new Date().toISOString(), time_modified: new Date().toISOString(), - block_size: 512, + block_size: 512 as const, } export const images: Json[] = [ diff --git a/mock-api/instance.ts b/mock-api/instance.ts index db71028452..7fb5aa029a 100644 --- a/mock-api/instance.ts +++ b/mock-api/instance.ts @@ -21,6 +21,7 @@ const base = { auto_restart_enabled: true, ncpus: 2, memory: 4 * GiB, + enable_jumbo_frames: false, } export const instance: Json = { diff --git a/mock-api/msw/handlers.ts b/mock-api/msw/handlers.ts index 170d96b3b6..66afc5d913 100644 --- a/mock-api/msw/handlers.ts +++ b/mock-api/msw/handlers.ts @@ -813,6 +813,7 @@ export const handlers = makeHandlers({ time_run_state_updated: new Date().toISOString(), boot_disk_id: bootDiskId, auto_restart_enabled: true, + enable_jumbo_frames: body.enable_jumbo_frames ?? false, } if (body.start) { @@ -892,6 +893,9 @@ export const handlers = makeHandlers({ instance.auto_restart_policy = body.auto_restart_policy instance.cpu_platform = body.cpu_platform + // required on the body, so always set it (effective on next restart in nexus) + instance.enable_jumbo_frames = body.enable_jumbo_frames + // We depart here from nexus in that nexus does both of the following // calculations at view time (when converting model to view). We can't // do that/don't need because our mock DB stores and returns the view @@ -2681,6 +2685,8 @@ export const handlers = makeHandlers({ supportBundleUpdate: NotImplemented, supportBundleView: NotImplemented, switchView: NotImplemented, + systemNetworkingSettingsUpdate: NotImplemented, + systemNetworkingSettingsView: NotImplemented, systemQuotasList: NotImplemented, systemTimeseriesSchemaList: NotImplemented, systemUpdateRecoveryFinish: NotImplemented, diff --git a/mock-api/msw/util.ts b/mock-api/msw/util.ts index cca972ede1..daa055f442 100644 --- a/mock-api/msw/util.ts +++ b/mock-api/msw/util.ts @@ -17,6 +17,7 @@ import { MAX_DISK_SIZE_GiB, MIN_DISK_SIZE_GiB, totalCapacity, + type BlockSize, type DiskBackend, type DiskCreate, type IpRange, @@ -156,9 +157,9 @@ export const errIfExists = >( * https://github.com/oxidecomputer/omicron/blob/dd74446/nexus/src/app/sagas/disk_create.rs#L292-L304 * https://github.com/oxidecomputer/omicron/blob/dd74446/nexus/src/app/disk.rs#L159-L174 */ -export function getBlockSize(backend: Json): number { +export function getBlockSize(backend: Json): BlockSize { return match(backend) - .with({ type: 'local' }, () => 4096) // All local disks use 4k block size (AdvancedFormat) + .with({ type: 'local' }, () => 4096 as const) // All local disks use 4k block size (AdvancedFormat) .with({ type: 'distributed' }, ({ disk_source: source }) => match(source) .with({ type: 'blank' }, (s) => s.block_size) From 27f1ec80b0671a20e08368da6206b01ee10c44b6 Mon Sep 17 00:00:00 2001 From: David Crespo Date: Fri, 5 Jun 2026 14:24:09 -0500 Subject: [PATCH 2/2] use commit on omicron main --- OMICRON_VERSION | 2 +- app/api/__generated__/OMICRON_VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OMICRON_VERSION b/OMICRON_VERSION index 7c5c3d5499..06ccb0f132 100644 --- a/OMICRON_VERSION +++ b/OMICRON_VERSION @@ -1 +1 @@ -ec71f785aacdc38d51e887534fc3fe0326665223 +c007af2f407ddbee44a9c37a690e3208a0f848cc diff --git a/app/api/__generated__/OMICRON_VERSION b/app/api/__generated__/OMICRON_VERSION index f043864c97..81bc04f7c0 100644 --- a/app/api/__generated__/OMICRON_VERSION +++ b/app/api/__generated__/OMICRON_VERSION @@ -1,2 +1,2 @@ # generated file. do not update manually. see docs/update-pinned-api.md -ec71f785aacdc38d51e887534fc3fe0326665223 +c007af2f407ddbee44a9c37a690e3208a0f848cc