fix(ui): validate OOBM is enabled before allowing HA on KVM hosts (#13605) - #13647
fix(ui): validate OOBM is enabled before allowing HA on KVM hosts (#13605)#13647Chinmay048 wants to merge 5 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 4.20 #13647 +/- ##
============================================
+ Coverage 16.26% 17.20% +0.94%
- Complexity 13434 13574 +140
============================================
Files 5667 5264 -403
Lines 500731 468353 -32378
Branches 60803 55012 -5791
============================================
- Hits 81455 80596 -859
+ Misses 410172 378748 -31424
+ Partials 9104 9009 -95
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
cc @weizhouapache @winterhazel Consider this UI improvement for the 4.23 release |
kiranchavala
left a comment
There was a problem hiding this comment.
|
@Chinmay048 when admin clicks on Disable OOBM ,cloudstack should thrown a pop-up saying that to Disable HA First Only if the HA is disabled we should allow to disable the OOBM
|
|
Thanks for the review and feedback @kiranchavala! That makes complete sense to guard the teardown flow as well. I am working on updating the Disable OOBM action right now so that if a host currently has High Availability (HA) enabled, the UI will intercept the action and display a warning pop-up instructing the admin to disable HA first before allowing OOBM to be turned off. Will push the commit to this PR shortly! |
586999a to
068213b
Compare
|
@blueorangutan package |
@kiranchavala I intend to cut a RC2 tomorrow around 2026-07-22 16:00 GMT. I will include this patch if it is ready by then. This issue is not major to block 4.23 RC2, as it does not prevent any operations via the UI or result in any bugs. The patch needs some adjustments as well (I'll send some reviews later). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
ui/src/components/view/ActionButton.vue:181
execActionreferencesthis.item, butActionButtondoesn't define anitemprop/data/computed. This meansrecordwill never fall back to the clicked row item and will also trigger Vue warnings about accessing undefined instance properties. Prefer derivingrecordfromresourceand assigningaction.resourcefrom the same value to keep downstream action handling consistent.
execAction (action) {
action.resource = this.resource
const record = this.resource || this.item
if (action?.api === 'disableOutOfBandManagementForHost' && (record?.hostha?.haenable === true || record?.hastate === 'Enabled')) {
ui/src/components/view/ListView.vue:658
- The
<template v-if="column.key === 'clustername'">line lost its indentation, which makes this block inconsistent with the surrounding template and may violate Vue/ESLint formatting rules.
<template v-if="column.key === 'clustername'">
ui/src/components/view/ListView.vue:696
- The updated account-column rendering has two functional regressions: (1) for
PrjAcct-*values outside/quotasummary, nothing is rendered (nov-elsefallback), leaving the cell blank; (2) the/quotasummarylink is created even whenrecord.accountidis missing and without the previous 404-route guard, which can produce links to invalid routes.
<template v-if="text">
<template v-if="!text.startsWith('PrjAcct-')">
<router-link
v-if="$route.path.startsWith('/quotasummary')"
:to="{ path: `${$route.path}/${record.accountid}` }">{{ text }}</router-link>
winterhazel
left a comment
There was a problem hiding this comment.
@Chinmay048 I left a few comments. I think this can go into 4.20.4 too, could you check and rebase into branch 4.20 if that is indeed the case?
Also, it would be nice to add the same checks to the enableHAForHost, configureHAForHost and disableOutOfBandManagementForHost APIs.
068213b to
4c78cd7
Compare
|
I have pushed a new update to enforce the backend API validation. The DisableOutOfBandManagementForHostCmd now correctly checks haConfigManager.listHAResources to prevent disabling OOBM if HA is active on a KVM host. All local Checkstyle and compilation errors have been resolved. Waiting on the CI simulator tests to complete! |
|
@blueorangutan package |
|
@blueorangutan test |
|
can you take a look at the smoke test failures related to host ha |
|
@kiranchavala I have updated the setUp method in test_hostha_kvm.py to globally enable OOBM before the HA tests run. Could you please kick off the Trillian smoke tests again to verify? |
|
@blueorangutan shutup |
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19032 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-16858)
|
|
@Chinmay048 I would think that the hostha errors are related to the change. can you check
|
|
The new backend validation was blocking the tests because the legacy test fixtures were calling configureHAForHost without first provisioning an OOBM interface. I have injected a dummy OOBM setup method into the execution flow for both the KVM and Simulator test suites. |
5577e75 to
9cdb779
Compare
|
@winterhazel , can you check if your requests for change are addressed to satisfaction? |




Description
Closes #13605
This PR updates the Vue UI infrastructure configuration (
hosts.js) to validate that Out-of-Band Management (OOBM) is active and enabled before allowing administrators to configure or enable High Availability (HA) on KVM hosts. If OOBM is not enabled on a KVM host, the HA action buttons are cleanly hidden to prevent invalid configurations.Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
How Has This Been Tested?
record.outofbandmanagement.enabledis false or undefined, the "Configure HA" and "Enable HA" action buttons are properly hidden.