<fix>[capacity]: non-KVM host capacity without KVM role#4324
<fix>[capacity]: non-KVM host capacity without KVM role#4324ZStack-Robot wants to merge 6 commits into
Conversation
unified-hardware feature follow-ups, squashed: - Backfill PhysicalServerVO serialNumber/manufacturer/model from KVM SystemTag via afterAddHost chain-tail hook (PRD 2.5.1); null-only update preserves path-1 user values. - Drop unmaintained count fields (cpuSockets/cpuCores/ memoryModuleCount/diskCount/nicCount/gpuCount) on PhysicalServerHardwareInfoVO + SPI carrier + DTO + Flyway. - Narrow ipmi test bypass to data-plane leaf: static overrides return ShellResult so prod PowerStatusParser and isAuthFailure run on mocked output. - Drop redundant try-catch in backfill (rely on @ExceptionSafe uniform handling). - Adapt merge tests to dropped fields. Resolves: ZSTAC-84191 Change-Id: If38d8ffb786266f3e1c96a99e94715476df364ff
Annotate PhysicalServerAO.oobPassword with @convert(PasswordConverter.class) so Hibernate encrypts on write and decrypts on read transparently — same mechanism KVMHostVO.password uses. PasswordConverter + EncryptFacade are relocated from core to header.core.convert so header-resident PhysicalServerAO can apply the converter directly; EncryptFacade gains isEncryptionDisabled() so the converter no longer imports EncryptGlobalConfig. Mechanical FQN updates across existing import sites (KVMHostVO, CephMonAO, SftpBackupStorageVO, SpecialDataConverter, encrypt.xml). No application-layer crypto helper: read/write sites use the plain getter/setter, on par with the rest of the platform. IT PhysicalServerOobPasswordEncryptCase mirrors HostPasswordEncryptCase: asserts the field registers in EncryptEntityMetadataVO, the toggle flips to Encrypted, and the converter is a pass-through when encryption is disabled. Resolves: ZSTAC-85182 Change-Id: I8d9ec342c5e70a5f940227c1c8d70906ab2ac2d2
PhysicalServerApiInterceptor surfaces named errors instead of bubbling SYS.1000 constraint violations or SYS.1006 with just a uuid. All via 3-arg argerr so globalErrorCode + formatted details land in the response payload. - CreatePhysicalServer: pre-check zone+serialNumber uniqueness; names the offending serialNumber and Zone. - AttachPhysicalServerRole: pre-check (serverUuid, roleType); names the conflicting role, suggests detach. - CreateProvisionNetwork GATEWAY_PXE: reject when DHCP wiring (dhcpInterface + dhcpRangeStartIp/EndIp/Netmask) is missing; lists the missing fields. IT PhysicalServerInterceptorErrorsCase exercises all three error paths and asserts the offending field appears. Resolves: ZSTAC-85184 Resolves: ZSTAC-85190 Resolves: ZSTAC-85350 Change-Id: I1bf5d9bb386570b8d434cecf923f1bee35422221
|
Warning Review limit reached
More reviews will be available in 52 minutes and 27 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (31)
Warning
|
Unified-hardware capacity rework routed every host through PhysicalServerCapacityVO via resolveServerUuidOrThrow, which required a KVM_HOST PhysicalServerRoleVO. ESX/non-KVM hosts have no such role, so the capacity update threw and ESX host connect failed at sync-esx-host-capacity. resolveServerUuidOrThrow now returns hostUuid for non-KVM hosts (their PhysicalServerCapacityVO is keyed by hostUuid via the COALESCE(serverUuid, hostUuid) view); a KVM host missing its role still fails loud. The ReportHostCapacityMessage handler reports non-unified hosts inline since recalculate needs a PhysicalServerVO. Resolves: ZSTAC-85170 Change-Id: I1396c45f9b4b412032ed6649b48f9b706d6b03a6
Re-add the model-mount testlib ApiHelper DSL methods (mountModelToVmInstance / unmountModelFromVmInstance / queryVmModelMount), lost in an earlier apihelper regen, so VmModelMountCase resolves the API again. Resolves: ZSTAC-85170 Change-Id: I47c6725ee4359ee8476144fb0aa48eead2baab6e
8ff495c to
541a6ae
Compare
EnvSpec.delete() left PhysicalServerProvisionNetwork cluster/pool refs in place, so a cluster-attached provision network blocked deletion and leaked across stability iterations; a later deleteServerPool then failed with "cluster(s) still attached". Hard-delete the refs before cleanupEO so provision networks are detached then deleted, in order — no per-case manual cleanup needed. Resolves: ZSTAC-85170 Change-Id: Ic7b0d504f468d6396610606dee49a74e08aca9af
6be71e5 to
71f8153
Compare
根因: unified-hardware 容量改造让每个 host 的容量更新走 PhysicalServerCapacityVO(resolveServerUuidOrThrow),强制要 KVM_HOST PhysicalServerRoleVO。ESX/非-KVM host 无此 role → 容量更新抛错 → ESX host connect 在 sync-esx-host-capacity 失败(HOST.1003 / ORG_ZSTACK_VMWARE_10049),打挂所有非-KVM host。
修复:
验证(本地 woven build): VmwareCreateVm/UpdateVm/AttachDetachVolume/StartVmWithoutEnoughCapacity 4 case + VmwareTest 全套 7 case 全绿;PhysicalServerOpsCase(KVM 回归)绿。
跨仓库 @@2 配对: premium fix/ZSTAC-85170-it-host-fixes@@2 (!14423)。Jira 暂填 feature epic ZSTAC-85170。
(重提: 替换错误命名的 !10275,分支统一为 @@2)
sync from gitlab !10284