Skip to content

TRITON-2552 CreateMachineDisk fails to add a disk to an existing instance - #158

Open
danmcd wants to merge 16 commits into
masterfrom
TRITON-2553
Open

TRITON-2552 CreateMachineDisk fails to add a disk to an existing instance#158
danmcd wants to merge 16 commits into
masterfrom
TRITON-2553

Conversation

@danmcd

@danmcd danmcd commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

TRITON-2553 For diskCreate, plumb through block_size
Portions contributed by: Nick Wilkens nwilkens@edgecast.io
Portions contributed by: Claude Opus 5 (1M context) noreply@anthropic.com

nwilkens and others added 7 commits August 24, 2026 08:30
…156)

createDisk validated req.vm.disks (the VM's persisted disks) instead of
the requested disk. Image-backed disks always report block_size from the
zvol's volblocksize, so the check threw and cloudapi returned an
InternalError. Regression from TRITON-2459.

Also adds the missing `new` on the non-bhyve error, which passed
undefined to next() and dropped the error.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EcKUgjXDfGyg1ssRFQHmLv
TRITON-2459 added block_size to both disk translators, which broke every
t.deepEqual() on a disk object in machines.94. block_size comes from the
zvol's volblocksize and varies with pool layout, so check it for validity
and compare the rest exactly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EcKUgjXDfGyg1ssRFQHmLv
validRecordSize() only compared its argument, so anything that coerces to
NaN ("garbage", {}, 4096.5) compared false against every bound and was
reported valid. vmadm type-checks disks.*.block_size separately; cloudapi
copied only the range helper. Match vmadm and check the type here too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EcKUgjXDfGyg1ssRFQHmLv
TRITON-2459 added block_size to the disk translators and to CreateMachine
input, but only mentioned it in the changelog. Add it to the field tables
it actually applies to, and note that it cannot be set on the boot disk.
Also fixes the heading level on the 9.18.0 notes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EcKUgjXDfGyg1ssRFQHmLv
Per review: land this alongside the matching VMAPI documentation rather
than on its own. The response-side rows stay, since those fields are
already returned.
@danmcd
danmcd requested a review from a team August 28, 2026 19:08
@danmcd

danmcd commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

I may split these into two commits (2552, 2553) prior to push.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants