apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
1.98k stars 1.09k forks source link

Visibility of inappropriate VPC Offerings and Network Offerings #8023

Open top-secrett opened 11 months ago

top-secrett commented 11 months ago
COMPONENT NAME
UI
CLOUDSTACK VERSION
4.18.0.0
CONFIGURATION

advanced networking

SUMMARY

VPC offerings provide choice between Public LB (VpcVirtualRouter) and Internal LB image Network Offerings also provide Public or Internal LB respectively. image When you create VPC you can see both Network Offerings, but if you chose inappropriate combination (VPC ILB - Network PLB / VPC PLB - Network ILB) the error occurs image

STEPS TO REPRODUCE
1. Create VPC offering with VpcVirtualRouter in LB
2. Create two Network offerings with Public and Internal LBs
3. Create VPC with your offering
4. Try to create tier
5. You will see all Network offerings, including inappropriate
EXPECTED RESULTS
Visibility only suitable Network offerings in VPC
ACTUAL RESULTS
Visibility all Network offerings. Сhoosing the wrong offering leads to an error
DaanHoogland commented 10 months ago

I'm marking this as UI, because I don´t think we can know before calling the API, if the parameter value is valid and the error message is genuine.

charlesweng commented 3 months ago

I have a quick question, is the following issue already resolved with the following changes in the latest version?

cloudstack/ui/src/views/network/VpcTiersTab.vue

I see that InternalLbVm is not visible whenever there is an existing public LB listed.

publicLBNetworkExists () {
      api('listNetworks', {
        vpcid: this.resource.id,
        supportedservices: 'LB'
      }).then(async json => {
        var lbNetworks = json.listnetworksresponse.network || []
        if (lbNetworks.length > 0) {
          this.publicLBExists = true
          for (var idx = 0; idx < lbNetworks.length; idx++) {
            const lbNetworkOffering = await this.getNetworkOffering(lbNetworks[idx].networkofferingid)
            const index = lbNetworkOffering.service.map(svc => { return svc.name }).indexOf('Lb')
            if (index !== -1 &&
              this.lbProviderMap.publicLb.vpc.indexOf(lbNetworkOffering.service.map(svc => { return svc.provider[0].name })[index]) !== -1) {
              this.publicLBExists = true
              break
            }
          }
        }
      })
    },
DaanHoogland commented 3 months ago

@charlesweng , are you talking of the same issue? The code you mentioned is from 3 years ago and should be in 4.18.0 as well.