MORPH-12933: Eliminate AbstractMarshaller warnings on SCVMM plugin load#177
Open
NimbleMike wants to merge 2 commits into
Open
MORPH-12933: Eliminate AbstractMarshaller warnings on SCVMM plugin load#177NimbleMike wants to merge 2 commits into
NimbleMike wants to merge 2 commits into
Conversation
If this entity is owned by platform, we should take a bug to get the
|
Contributor
Author
Thanks for the feedback, Yea, that seems to be the case. Remove the |
Contributor
Author
|
Have successfully created Docker clusters and individual instances using this plugin's changes. Opening up for review. |
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.
Root cause was determined by having Copilot instrument Morpheus Core and then loading the SCVMM plugin. Its analysis, and resolution, are detailed below.
Fix: Remove invalid
portsfield usage and stalevirtualImagereferenceBackground
When loading the SCVMM plugin, the Morpheus marshaller (
AbstractMarshaller.bindMapDomainCollection) logs a warning whenever it encounters a collection field on a domain class that has no associated GORM entity. The root cause is thatContainerTypedeclaresportsas a basic element collection of raw integers:Because
Integeris not a GORM domain class,domainField.getAssociatedEntity()returnsnullforports. The marshaller cannot bind it and emits:The correct field for exposing port definitions is
containerPorts, which maps toContainerTypePort— a proper domain entity association that the marshaller can process. All affected workload types already hadcontainerPortsentries;portswas redundant and never being persisted.Changes
1. Removed
ports = [22]/ports = [3389]from all workload type definitionsEvery workload type that declared
ports = [...]also had an equivalentcontainerPorts = [...]entry. Theportsfield was dead weight generating one warning per workload type processed per plugin load.Files changed:
scvmm-workload-type-and-set.scribe— AlmaLinux 9, openSUSE 15.1, CentOS 9-stream, Debian 11/12, Rocky 8/9, Ubuntu 18.04/24.04scvmm-ubuntu-16.scribe— Ubuntu 16.04scvmm-ubuntu-20.scribe— Ubuntu 20.04scvmm-ubuntu-22.scribe— Ubuntu 22.04scvmm-windows-12.scribe— Windows 2012 R2 (ports = [3389])scvmm-ubuntu-16-docker.scribe— Docker Ubuntu 16.04 (also hadports = ["22"]— a string instead of an integer)scvmm-compute-types.scribe— Docker Ubuntu 22.042. Removed
ports = []from the genericscvmm-1_0workload typeThe base SCVMM workload type (
scvmm-instance-type.scribe) declaredports = []. The empty list still causes the marshaller to enter the collection-binding code path and emit the warning. This workload type has nocontainerPortseither, which is intentional — it is a generic, OS-agnostic "bring your own VM" type with no assumed port. Removing the empty declaration is safe and matches the intent.3. Fixed stale
virtualImagecode reference ondocker-scvmm-ubuntu-22_04The Docker Ubuntu 22.04 workload type in
scvmm-compute-types.scribereferenced its virtual image via a hardcoded code map:That code string became stale when the Ubuntu 22.04 virtual image was updated (the current code is
hyperv.image.morpheus.ubuntu.22.04.20260115.amd64). The marshaller could not resolve it in either the resource map or the database, leavingvirtualImageunset on every plugin load:The fix replaces the hardcoded map with a Scribe resource reference, consistent with every other workload type in the plugin:
A resource reference binds by Scribe resource identifier at import time, so it remains correct regardless of future code renames.
Safety
portswas never successfully persisted — the marshaller silently skipped it on every run. Removing it produces identical runtime state.containerPortsis unaffected. All port exposure for SSH (22) and RDP (3389) continues to work through the existingcontainerPortsentries, which referenceContainerTypePortdomain objects correctly.virtualImagefix is additive. It restores an association that was silently missing. The Docker Ubuntu 22.04 compute type will now correctly have its virtual image set on plugin load.