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
|
@kiranchavala a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13647 +/- ##
============================================
- Coverage 19.65% 19.64% -0.01%
+ Complexity 19792 19789 -3
============================================
Files 6368 6368
Lines 575107 575119 +12
Branches 70370 70373 +3
============================================
- Hits 113016 112987 -29
- Misses 449808 449849 +41
Partials 12283 12283
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:
|
|
UI build: ✔️ |
|
@blueorangutan package |
|
@kiranchavala a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18620 |
|
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 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
| action.resource = this.resource | ||
| const record = this.resource || this.item | ||
| if (action?.api === 'disableOutOfBandManagementForHost' && (record?.hostha?.haenable === true || record?.hastate === 'Enabled')) { |
| show: (record) => { | ||
| if (record.hypervisor === 'KVM') { | ||
| return Boolean(record?.outofbandmanagement?.enabled) | ||
| } | ||
| return record.hypervisor === 'Simulator' | ||
| }, |
| if (record.hypervisor === 'KVM') { | ||
| return Boolean(record?.outofbandmanagement?.enabled) | ||
| } |
| </template> | ||
|
|
||
| <template v-if="column.key === 'clustername'"> | ||
| <template v-if="column.key === 'clustername'"> |
| <router-link | ||
| v-if="$route.path.startsWith('/quotasummary') && $router.resolve(`${$route.path}/${record.accountid}`).matched[0].redirect !== '/exception/404'" | ||
| v-if="$route.path.startsWith('/quotasummary')" | ||
| :to="{ path: `${$route.path}/${record.accountid}` }">{{ text }}</router-link> |
| <template v-if="text"> | ||
| <template v-if="!text.startsWith('PrjAcct-')"> | ||
| <router-link | ||
| v-if="$route.path.startsWith('/quotasummary') && $router.resolve(`${$route.path}/${record.accountid}`).matched[0].redirect !== '/exception/404'" | ||
| v-if="$route.path.startsWith('/quotasummary')" | ||
| :to="{ path: `${$route.path}/${record.accountid}` }">{{ text }}</router-link> | ||
| <span v-else>{{ text }}</span> | ||
| </template> | ||
| <template v-else> | ||
| <router-link v-else-if="record.accountid" :to="{ path: '/account/' + record.accountid }">{{ text }}</router-link> | ||
| <router-link | ||
| v-if="$route.path.startsWith('/quotasummary') && $router.resolve(`${$route.path}/${record.accountid}`).matched[0].redirect !== '/exception/404'" | ||
| :to="{ path: `${$route.path}/${record.accountid}` }">{{ (record.projectname || record.account).concat(' (').concat($t('label.project')).concat(')') }}</router-link> | ||
| v-else-if="$store.getters.userInfo.roletype !== 'User'" | ||
| :to="{ path: '/account', query: { name: record.account, domainid: record.domainid, dataView: true } }"> | ||
| {{ text }} | ||
| </router-link> | ||
| <span v-else>{{ text }}</span> |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18634 |
@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). |




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.