-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix(ui): validate OOBM is enabled before allowing HA on KVM hosts (#13605) #13647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
5f29065
4de326a
9e98d68
ba1f5a5
068213b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -177,6 +177,15 @@ export default { | |
| methods: { | ||
| execAction (action) { | ||
| action.resource = this.resource | ||
| const record = this.resource || this.item | ||
| if (action?.api === 'disableOutOfBandManagementForHost' && (record?.hostha?.haenable === true || record?.hastate === 'Enabled')) { | ||
|
Comment on lines
179
to
+181
|
||
| this.$notification.error({ | ||
| message: this.$t('label.error'), | ||
| description: 'Please disable High Availability (HA) on this host before disabling Out-of-Band Management (OOBM).', | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: hardcoded English string here instead of |
||
| duration: 0 | ||
| }) | ||
| return | ||
| } | ||
| if (action.docHelp) { | ||
| action.docHelp = this.$applyDocHelpMappings(action.docHelp) | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -655,8 +655,7 @@ | |
| <template v-if="column.key === 'usageType'"> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Chinmay048 please remove the unrelated changes from this file. |
||
| {{ usageTypeMap[record.usagetype] }} | ||
| </template> | ||
|
|
||
| <template v-if="column.key === 'clustername'"> | ||
| <template v-if="column.key === 'clustername'"> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: this line lost its indentation, looks like an accidental de-indent (surrounding |
||
| <router-link :to="{ path: '/cluster/' + record.clusterid }">{{ text }}</router-link> | ||
| </template> | ||
| <template v-if="column.key === 'objectstore'"> | ||
|
|
@@ -693,16 +692,21 @@ | |
| <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> | ||
|
Comment on lines
694
to
696
|
||
| <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> | ||
|
Comment on lines
692
to
703
|
||
| </template> | ||
| <template v-else-if="$route.path.startsWith('/quotasummary')"> | ||
| <router-link :to="{ path: `${$route.path}/${record.accountid}` }"> | ||
| {{ (record.projectname || record.account).concat(' (').concat($t('label.project')).concat(')') }} | ||
| </router-link> | ||
| </template> | ||
| </template> | ||
| </template> | ||
| <template v-if="column.key === 'resource'"> | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -255,7 +255,12 @@ export default { | |||||||||||||||||
| message: 'label.ha.configure', | ||||||||||||||||||
| docHelp: 'adminguide/reliability.html#ha-for-hosts', | ||||||||||||||||||
| dataView: true, | ||||||||||||||||||
| show: (record) => { return ['KVM', 'Simulator'].includes(record.hypervisor) }, | ||||||||||||||||||
| show: (record) => { | ||||||||||||||||||
| if (record.hypervisor === 'KVM') { | ||||||||||||||||||
| return Boolean(record?.outofbandmanagement?.enabled) | ||||||||||||||||||
| } | ||||||||||||||||||
| return record.hypervisor === 'Simulator' | ||||||||||||||||||
| }, | ||||||||||||||||||
|
Comment on lines
+258
to
+263
Comment on lines
+258
to
+263
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
| args: ['hostid', 'provider'], | ||||||||||||||||||
| mapping: { | ||||||||||||||||||
| hostid: { | ||||||||||||||||||
|
|
@@ -274,7 +279,13 @@ export default { | |||||||||||||||||
| docHelp: 'adminguide/reliability.html#ha-for-hosts', | ||||||||||||||||||
| dataView: true, | ||||||||||||||||||
| show: (record) => { | ||||||||||||||||||
| return record.hypervisor !== 'External' && !(record?.hostha?.haenable === true) | ||||||||||||||||||
| if (record.hypervisor === 'External' || record?.hostha?.haenable === true) { | ||||||||||||||||||
| return false | ||||||||||||||||||
| } | ||||||||||||||||||
| if (record.hypervisor === 'KVM') { | ||||||||||||||||||
| return Boolean(record?.outofbandmanagement?.enabled) | ||||||||||||||||||
| } | ||||||||||||||||||
|
Comment on lines
+285
to
+287
|
||||||||||||||||||
| return true | ||||||||||||||||||
|
Comment on lines
+282
to
+288
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
| }, | ||||||||||||||||||
| args: ['hostid'], | ||||||||||||||||||
| mapping: { | ||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of changing this file, can we just hide the
disableOutOfBandManagementForHostbutton inhosts.jswhen host HA is enabled?