TRITON-2552 CreateMachineDisk fails to add a disk to an existing instance - #158
Open
danmcd wants to merge 16 commits into
Open
TRITON-2552 CreateMachineDisk fails to add a disk to an existing instance#158danmcd wants to merge 16 commits into
danmcd wants to merge 16 commits into
Conversation
…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.
Contributor
Author
|
I may split these into two commits (2552, 2553) prior to push. |
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.
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