Flavors: end-to-end scenarios — Nova — branch stable/2026.2
Branch
stable/2026.2@8df1922926dd— repository https://opendev.org/openstack/nova — analysed on 2026-10-28
1. An administrator publishes a private flavor with extra specs
sequenceDiagram
participant A as Admin (openstack CLI)
participant API as nova-api
participant DB as API database
participant K as Keystone
participant Bus as Notification bus
A->>API: POST /flavors {name, ram, vcpus, disk, os-flavor-access:is_public: false}
API->>DB: INSERT flavors
alt name or id already used
DB-->>API: duplicate entry
API-->>A: 409 Flavor with name … already exists.
end
API->>Bus: flavor.create
API-->>A: 200 {flavor}
A->>API: POST /flavors/{id}/os-extra_specs {hw:cpu_policy: dedicated} (2.86+)
API->>API: validate against the registry
alt invalid value or unknown key in a Nova namespace
API-->>A: 400 Validation failed; …
end
API->>DB: INSERT flavor_extra_specs (retry on races)
API->>Bus: flavor.update
A->>API: POST /flavors/{id}/action {addTenantAccess: {tenant: P}}
API->>K: check that project P exists
API->>DB: INSERT flavor_projects
API->>Bus: flavor.update
API-->>A: 200 {flavor_access: [{flavor_id, tenant_id: P}]}2. A user boots a server with that flavor
sequenceDiagram
participant U as User of project P
participant API as nova-api
participant DB as API database
participant S as nova-scheduler
participant PL as Placement
participant C as nova-compute (libvirt)
U->>API: GET /flavors (sees public + flavors shared with P)
U->>API: POST /servers {flavorRef, imageRef}
API->>DB: SELECT flavor (visible to P, not disabled)
alt not visible or disabled
API-->>U: 400 Flavor … could not be found.
end
API->>API: check image min_ram / min_disk / size, flavor vs image hw:* conflicts
API->>API: copy the flavor into the server (instance_extra.flavor cur)
API-->>U: 202 {server}
S->>PL: GET /allocation_candidates?resources=PCPU:n,MEMORY_MB:m,DISK_GB:d&required=…
S->>PL: PUT /allocations/{server}
C->>C: build the guest from the copy: pinning, huge pages, devices, cgroups (quota:*)3. Resize
sequenceDiagram
participant U as User
participant API as nova-api
participant Cond as nova-conductor / scheduler
participant C as nova-compute
U->>API: POST /servers/{id}/action {resize: {flavorRef: new}}
alt same flavor
API-->>U: 400 When resizing, instances must change flavor!
else new flavor disabled or not visible
API-->>U: 400 Flavor … could not be found.
else disk = 0 and image-backed
API-->>U: 400 … Resize to zero disk flavor is not allowed.
end
API->>API: quota check for the increase, image constraints against the new flavor
API->>Cond: resize (new_flavor); server keeps old_flavor and new_flavor
Cond->>C: prep / resize / finish, Placement holds old and new allocations
U->>API: confirmResize (cur = new) or revertResize (cur = old) [inferred]4. The flavor is deleted while servers use it
sequenceDiagram
participant A as Admin
participant API as nova-api
participant DB as API database
participant U as User
A->>API: DELETE /flavors/{id}
API->>DB: DELETE flavor_projects, flavor_extra_specs, flavors
API-->>A: 202
U->>API: GET /servers/{sid} (2.47+)
API-->>U: 200 server.flavor = {original_name, vcpus, ram, disk, ephemeral, swap, extra_specs} from the server's copy
U->>API: POST /servers/{sid}/action {resize: {flavorRef: <deleted id>}}
API-->>U: 400 Flavor … could not be found.Source: reverse-spec-nova/04-flavors-scenarios_stable-2026.2.md. The _rewrite/ and _inventory/ files are not published on the site.