feat(server-create): boot from image by default, opt into BFV - #3
Merged
Conversation
`orca server create` unconditionally built a block_device_mapping_v2 that asked Nova to create a Cinder volume from the image, even on flavors with a usable local root disk. Every instance therefore consumed Cinder quota, took longer to spawn, and left a matching volume behind on delete — visible in `project cleanup` as a wave of idempotent 404s on volumes auto-removed by the server cascade. Change the default: when the chosen flavor has `disk > 0` the server boots from the image directly on the compute's local disk (Nova body uses `imageRef`). Flavors with `disk == 0` still fall back to boot-from-volume since Nova cannot boot them otherwise. Two new flags override the auto-detection: --ephemeral force boot-from-image (errors on disk=0 flavors) --boot-from-volume force boot-from-volume regardless of flavor The flags are mutually exclusive. When the flavor lookup itself fails (transient Nova error, auth gap), the helper respects the explicit flag; without one it falls back to BFV, which is safe on every deployment. `--disk-size` keeps its meaning in BFV mode and is ignored in the ephemeral path (Nova sizes the root disk from the flavor).
--ephemeral and --boot-from-volume mixed two registers: a storage-type term and an action term. Both flags now share the action wording used by Horizon and the OpenStack docs, which is the vocabulary an operator actually sees when picking between the two. Renames flag, parameter, helper signature, docstring, help text, and the user-facing confirmation message. Behaviour is unchanged; tests follow the new names.
This was referenced Apr 23, 2026
Vinetos
pushed a commit
to Vinetos/orca-cli
that referenced
this pull request
May 30, 2026
`orca server clone` kept emitting an unconditional block_device_mapping_v2 while `orca server create` had already switched to boot-from-image by default. Clone therefore silently recreated BFV servers even when the source's flavor carried a local root disk — defeating the whole point of the PR stackopshq#3 migration. Wire the same --boot-from-image / --boot-from-volume flags on clone, reuse _resolve_boot_mode, and branch the Nova body the same way: * use_bfv=True → block_device_mapping_v2 (unchanged, honours --disk-size) * use_bfv=False → imageRef, Nova sizes the root disk from the flavor Error messages and mutual exclusion are identical to the create path.
Vinetos
pushed a commit
to Vinetos/orca-cli
that referenced
this pull request
May 30, 2026
Documents the non-obvious default shift introduced by PR stackopshq#3 and PR stackopshq#4: `orca server create` and `orca server clone` now boot from image on the compute's local disk by default, falling back to boot-from-volume only when the flavor has `disk == 0`. Records the alternatives considered (unconditional ephemeral, the `--ephemeral / --boot-from-volume` pairing that was tried first) so a future contributor reading the diff does not silently undo the choice.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
orca server createalways sent Nova a boot-from-volume request, even when the flavor had a perfectly usable local root disk. For every instance this forced Cinder to materialise a volume from the image, consumed tenant Cinder quota, and added visible latency to server creation. The cleanup output from a recent test run showed exactly this footprint — 30 test instances leaving 30 boot volumes behind, auto-removed by the server cascade and showing up as idempotent 404s inproject cleanup.The behaviour was not documented as a design choice anywhere outside a parenthetical in the
createdocstring.Changes
disk > 0.disk == 0still fall back to boot-from-volume automatically — Nova cannot boot them any other way.--ephemeral— force boot from image. Errors out with a clear message if the flavor hasdisk == 0.--boot-from-volume— force the previous behaviour (BDMv2,--disk-sizehonoured).--disk-sizekeeps its meaning in the BFV path and is ignored in ephemeral mode (Nova sizes the root disk from the flavor).Disk: <N> GB (boot volume)(unchanged)Boot: ephemeral (from image, flavor root disk)Scope
orca server createis changed.orca server clonestill emits BDMv2 like before — cloning a BFV source into a BFV target is still the coherent behaviour there, and mixing modes in clone deserves its own discussion._resolve_boot_modelives in the command module rather than the service layer: it's pure policy (CLI-level UX), not a Nova operation.Tests
tests/test_server_create_boot_mode.py:disk=20→imageRefbody, no BDMv2disk=0→ BDMv2,--disk-sizehonoured--boot-from-volumeoverrides a flavor-with-disk--ephemeralon flavor-with-disk--ephemeralon flavordisk=0→ non-zero exit, POST never fires--ephemeral --boot-from-volume→ non-zero exit, POST never fires--ephemeral→ honouredruff check .mypypytest— 2286 passedBackwards compatibility
orca server create. Pipelines that rely on a root Cinder volume being created silently should now pass--boot-from-volumeexplicitly, or be adjusted to work with ephemeral storage.Follow-ups (out of scope)
orca server clone(currently still unconditional BFV).