You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pe...@apache.org on 2023/12/12 15:58:59 UTC
(cloudstack) 01/01: NSX: Attempt to fix NSX Zone creation bug for public networks
This is an automated email from the ASF dual-hosted git repository.
pearl11594 pushed a commit to branch nsx-ui-zone-bug
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 608dba84529e6c8fa50baa43f6ffe114ad69a938
Author: Pearl Dsilva <pe...@gmail.com>
AuthorDate: Tue Dec 12 10:58:46 2023 -0500
NSX: Attempt to fix NSX Zone creation bug for public networks
---
ui/public/locales/en.json | 1 +
ui/src/config/section/compute.js | 1 +
ui/src/views/infra/zone/ZoneWizard.vue | 2 +-
ui/src/views/infra/zone/ZoneWizardLaunchZone.vue | 34 ++++++++++++++++++++----
4 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json
index 996429cce5f..e5971ab28d0 100644
--- a/ui/public/locales/en.json
+++ b/ui/public/locales/en.json
@@ -2561,6 +2561,7 @@
"message.configuring.guest.traffic": "Configuring guest traffic",
"message.configuring.physical.networks": "Configuring physical Networks",
"message.configuring.public.traffic": "Configuring public traffic",
+"message.configuring.nsx.public.traffic": "Configuring NSX public traffic",
"message.configuring.storage.traffic": "Configuring storage traffic",
"message.confirm.action.force.reconnect": "Please confirm that you want to force reconnect this host.",
"message.confirm.add.router.table.to.instance": "Please confirm that you want to add Route Table to this NIC",
diff --git a/ui/src/config/section/compute.js b/ui/src/config/section/compute.js
index 16349668650..b9c8964e0f4 100644
--- a/ui/src/config/section/compute.js
+++ b/ui/src/config/section/compute.js
@@ -532,6 +532,7 @@ export default {
docHelp: 'plugins/cloudstack-kubernetes-service.html',
permission: ['listKubernetesClusters'],
columns: (store) => {
+ console.log(store)
var fields = ['name', 'state', 'clustertype', 'size', 'cpunumber', 'memory', 'kubernetesversionname']
if (['Admin', 'DomainAdmin'].includes(store.userInfo.roletype)) {
fields.push('account')
diff --git a/ui/src/views/infra/zone/ZoneWizard.vue b/ui/src/views/infra/zone/ZoneWizard.vue
index bdd12f71e33..0f4c7f7ad31 100644
--- a/ui/src/views/infra/zone/ZoneWizard.vue
+++ b/ui/src/views/infra/zone/ZoneWizard.vue
@@ -139,7 +139,7 @@ export default {
{
name: 'network',
title: 'label.network',
- step: ['physicalNetwork', 'tungsten', 'netscaler', 'pod', 'guestTraffic', 'storageTraffic', 'publicTraffic'],
+ step: ['physicalNetwork', 'nsx', 'tungsten', 'netscaler', 'pod', 'guestTraffic', 'storageTraffic', 'publicTraffic', 'nsxPublicTraffic'],
description: this.$t('message.network.description'),
hint: this.$t('message.network.hint')
},
diff --git a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
index f866d6e83ca..7d34bd3975a 100644
--- a/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
+++ b/ui/src/views/infra/zone/ZoneWizardLaunchZone.vue
@@ -124,6 +124,7 @@ export default {
waiting: 'message.launch.zone',
launching: 'message.please.wait.while.zone.is.being.created'
},
+ nsx: false,
isLaunchZone: false,
processStatus: null,
messageError: '',
@@ -212,10 +213,13 @@ export default {
status: STATUS_PROCESS
})
this.setStepStatus(STATUS_PROCESS)
+ console.log('steps:')
+ console.log(this.steps)
},
setStepStatus (status) {
const index = this.steps.findIndex(step => step.index === this.currentStep)
this.steps[index].status = status
+ this.nsx = false
},
handleBack (e) {
this.$emit('backPressed')
@@ -231,6 +235,8 @@ export default {
},
handleFixesError () {
const stepError = this.steps.filter(step => step.index === this.currentStep)
+ console.log(this.currentStep)
+ console.log(stepError)
if (stepError && stepError.length > 0) {
const step = stepError[0].step
this.$emit('stepError', step, this.stepData)
@@ -855,8 +861,13 @@ export default {
if (!this.stepData.stepMove.includes('createPod')) {
this.stepData.podReturned = await this.createPod(params)
this.stepData.stepMove.push('createPod')
+ // await this.stepConfigurePublicTraffic('message.configuring.public.traffic', 'publicTraffic', 0)
+ // if (this.stepData.isNsxZone) {
+ // console.log('continue')
+ // await this.stepConfigurePublicTraffic('message.configuring.nsx.public.traffic', 'nsxPublicTraffic', 1)
+ // }
}
- await this.stepConfigurePublicTraffic()
+ await this.stepConfigurePublicTraffic('message.configuring.public.traffic', 'publicTraffic', 0)
} catch (e) {
this.messageError = e
this.processStatus = STATUS_FAILED
@@ -894,14 +905,18 @@ export default {
this.setStepStatus(STATUS_FAILED)
}
},
- async stepConfigurePublicTraffic () {
+ async stepConfigurePublicTraffic (message, trafficType, idx) {
+ console.log(trafficType)
if (
(this.isBasicZone &&
(this.havingSG && this.havingEIP && this.havingELB)) ||
(this.isAdvancedZone && !this.sgEnabled && !this.isEdgeZone)) {
this.setStepStatus(STATUS_FINISH)
this.currentStep++
- this.addStep('message.configuring.public.traffic', 'publicTraffic')
+ this.addStep(message, trafficType)
+ if (trafficType === 'nsxPublicTraffic') {
+ this.nsx = false
+ }
let stopNow = false
this.stepData.returnedPublicTraffic = this.stepData?.returnedPublicTraffic || []
@@ -950,12 +965,16 @@ export default {
}
try {
- if (!this.stepData.stepMove.includes('createPublicVlanIpRange' + index)) {
+ if (!this.stepData.stepMove.includes('createPublicVlanIpRange' + idx + index)) {
const vlanIpRangeItem = await this.createVlanIpRange(params)
+ console.log(vlanIpRangeItem)
this.stepData.returnedPublicTraffic.push(vlanIpRangeItem)
- this.stepData.stepMove.push('createPublicVlanIpRange' + index)
+ this.stepData.stepMove.push('createPublicVlanIpRange' + idx + index)
+ console.log(this.stepData)
}
} catch (e) {
+ console.log('error')
+ console.log(this.stepData)
this.messageError = e
this.processStatus = STATUS_FAILED
this.setStepStatus(STATUS_FAILED)
@@ -977,6 +996,10 @@ export default {
} else {
await this.stepConfigureStorageTraffic()
}
+ if (this.stepData.isNsxZone && this.nsx) {
+ console.log(this.nsx)
+ await this.stepConfigurePublicTraffic('message.configuring.nsx.public.traffic', 'nsxPublicTraffic', 1)
+ }
} else if (this.isAdvancedZone && this.sgEnabled) {
if (this.stepData.isTungstenZone) {
await this.stepCreateTungstenFabricPublicNetwork()
@@ -993,6 +1016,7 @@ export default {
}
}
}
+ console.log(this.nsx)
},
async stepCreateTungstenFabricPublicNetwork () {
this.setStepStatus(STATUS_FINISH)