Skip to content

[VMware] Update vlans with proper range before creating port group for dvSwitch #10708

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

Merged

Conversation

sureshanaparti
Copy link
Contributor

@sureshanaparti sureshanaparti commented Apr 14, 2025

Description

This PR updates the vlans with proper range (instead of numbers) before creating port group for dvSwitch in VMware (max 80 chars allowed for the port group name), addresses #9507.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Created shared network using multiple vlans with dvSwitch (in VMware 70u3), and verified the port group created with range instead of vlans.

(cmk) 🐱 > create network displaytext=testshared name=testshared networkofferingid=96504bd7-6781-429f-80fe-e3e9f80c4b99 domainid=36f47570-19e4-11f0-abf3-1e00a400040f zoneid=40e239ec-892e-46a4-a347-3c89ec82c57c vlan=vlan://1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760 gateway=1.1.1.1 netmask=255.255.255.0 startip=1.1.1.2 endip=1.1.1.10 bypassvlanoverlapcheck=true
{
  "network": {
    "acltype": "Domain",
    "broadcastdomaintype": "Vlan",
    "broadcasturi": "vlan://1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760",
    "canusefordeploy": true,
    "cidr": "1.1.1.0/24",
    "created": "2025-04-16T16:43:59+0000",
    "details": {},
    "displaynetwork": true,
    "displaytext": "testshared",
    "dns1": "10.0.32.1",
    "dns2": "8.8.8.8",
    "domain": "ROOT",
    "domainid": "36f47570-19e4-11f0-abf3-1e00a400040f",
    "domainpath": "/",
    "gateway": "1.1.1.1",
    "hasannotations": false,
    "id": "f0f04a3c-9d92-409f-bb40-8e64bd123536",
    "ispersistent": false,
    "issystem": false,
    "name": "testshared",
    "netmask": "255.255.255.0",
    "networkdomain": "cs1cloud.internal",
    "networkofferingavailability": "Optional",
    "networkofferingconservemode": true,
    "networkofferingdisplaytext": "Offering for Shared networks",
    "networkofferingid": "96504bd7-6781-429f-80fe-e3e9f80c4b99",
    "networkofferingname": "DefaultSharedNetworkOffering",
    "physicalnetworkid": "f73f20f1-09ef-4bb7-af57-0bec9d86677b",
    "privatemtu": 1500,
    "publicmtu": 1500,
    "receivedbytes": 0,
    "redundantrouter": false,
    "related": "f0f04a3c-9d92-409f-bb40-8e64bd123536",
    "restartrequired": false,
    "sentbytes": 0,
    "service": [
      {
        "capability": [
          {
            "canchooseservicecapability": false,
            "name": "AllowDnsSuffixModification",
            "value": "true"
          }
        ],
        "name": "Dns",
        "provider": [
          {
            "name": "VirtualRouter"
          }
        ]
      },
      {
        "capability": [
          {
            "canchooseservicecapability": false,
            "name": "DhcpAccrossMultipleSubnets",
            "value": "true"
          }
        ],
        "name": "Dhcp",
        "provider": [
          {
            "name": "VirtualRouter"
          }
        ]
      },
      {
        "capability": [],
        "name": "UserData",
        "provider": [
          {
            "name": "VirtualRouter"
          }
        ]
      }
    ],
    "specifyipranges": true,
    "specifyvlan": true,
    "state": "Setup",
    "strechedl2subnet": false,
    "subdomainaccess": true,
    "supportsvmautoscaling": false,
    "tags": [],
    "traffictype": "Guest",
    "type": "Shared",
    "vlan": "1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760",
    "zoneid": "40e239ec-892e-46a4-a347-3c89ec82c57c",
    "zonename": "ref-trl-8349-v-Mol8-suresh-anaparti"
  }
}

Logs =>

2025-04-16 16:49:19,300 DEBUG [c.c.a.m.DirectAgentAttache] (DirectAgent-397:ctx-42dc9c3f) (logid:c201566b) Seq 1-3287064778027046475: Executing request
2025-04-16 16:49:19,300 DEBUG [c.c.h.v.r.VmwareResource] (DirectAgent-397:ctx-42dc9c3f) (logid:a33444b5) Executing resource command StartCommand: [{"vm":{"id":7,"name":"i-2-7-VM","bootloader":"HVM","state":"Starting","type":"User","cpus":1,"minSpeed":250,"maxSpeed":500,"minRam":536870912,"maxRam":536870912,"hostName":"testsharedvm01","arch":"x86_64","os":"CentOS 5.3 (64-bit)","platformEmulator":"centos64Guest","bootArgs":"","enableHA":false,"limitCpuUse":false,"enableDynamicallyScaleVm":false,"params":{"deployvm":"true","dataDiskController":"osdefault","nestedVirtualizationFlag":"false","cpuOvercommitRatio":"2.0","vmware.reserve.mem":"false","vmware.reserve.cpu":"false","nicAdapter":"E1000","rootDiskController":"ide"},"uuid":"7abd3369-476c-405e-9856-ef228514f480","enterHardwareSetup":false,"disks":[{"data":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"60be12b6-140a-4afe-866e-3b2e1a95a8bc","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"4f1fbfc7-3e51-3e87-a427-0507003c990f","name":"ref-trl-8349-v-Mol8-suresh-anaparti-esxi-pri1","id":1,"poolType":"NetworkFilesystem","host":"10.0.32.4","path":"/acs/primary/ref-trl-8349-v-Mol8-suresh-anaparti/ref-trl-8349-v-Mol8-suresh-anaparti-esxi-pri1","port":2049,"url":"NetworkFilesystem://10.0.32.4/acs/primary/ref-trl-8349-v-Mol8-suresh-anaparti/ref-trl-8349-v-Mol8-suresh-anaparti-esxi-pri1/?ROLE=Primary&STOREUUID=4f1fbfc7-3e51-3e87-a427-0507003c990f","isManaged":false}},"name":"ROOT-7","size":2147483648,"path":"ROOT-7","volumeId":7,"vmName":"i-2-7-VM","accountId":2,"format":"OVA","provisioningType":"THIN","poolId":1,"id":7,"deviceId":0,"bytesReadRate":0,"bytesWriteRate":0,"iopsReadRate":0,"iopsWriteRate":0,"hypervisorType":"VMware","directDownload":false,"deployAsIs":false,"followRedirects":false}},"diskSeq":0,"path":"ROOT-7","type":"ROOT","_details":{"storageHost":"10.0.32.4","managed":"false","storagePort":"2049","storage.pool.disk.wait":"60","volumeSize":"2147483648"}},{"data":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"id":0,"format":"ISO","accountId":0,"hvm":false,"bootable":false,"directDownload":false,"deployAsIs":false,"followRedirects":false}},"diskSeq":3,"type":"ISO"}],"nics":[{"deviceId":0,"networkRateMbps":200,"defaultNic":true,"pxeDisable":false,"nicUuid":"50d83dd3-bd22-4367-a26f-b8c260085a04","details":{"PromiscuousMode":"false","ForgedTransmits":"true","MacAddressChanges":"true","MacLearning":"false"},"dpdkEnabled":false,"uuid":"f0f04a3c-9d92-409f-bb40-8e64bd123536","ip":"1.1.1.9","netmask":"255.255.255.0","gateway":"1.1.1.1","mac":"1e:00:b0:00:00:30","dns1":"10.0.32.1","dns2":"8.8.8.8","broadcastType":"Vlan","type":"Guest","broadcastUri":"vlan://1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760","isolationUri":"vlan://1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,
...
2025-04-16 16:49:22,363 DEBUG [c.c.h.v.r.VmwareResource] (DirectAgent-397:ctx-42dc9c3f 10.0.32.203, job-43/job-44, cmd: StartCommand) (logid:a33444b5) The following definitions will be used to start the VM: virtual device [{"capacityInKB":0,"key":-2,"backing":{"diskMode":"persistent","fileName":"[4f1fbfc73e513e87a4270507003c990f] i-2-7-VM/ROOT-7.vmdk","datastore":{"value":"datastore-1015","type":"Datastore"}},"connectable":{"startConnected":true,"allowGuestControl":false,"connected":true},"controllerKey":200,"unitNumber":1}], volume [{"uuid":"60be12b6-140a-4afe-866e-3b2e1a95a8bc","volumeType":"ROOT","dataStore":{"uuid":"4f1fbfc7-3e51-3e87-a427-0507003c990f","name":"ref-trl-8349-v-Mol8-suresh-anaparti-esxi-pri1","id":1,"poolType":"NetworkFilesystem","host":"10.0.32.4","path":"/acs/primary/ref-trl-8349-v-Mol8-suresh-anaparti/ref-trl-8349-v-Mol8-suresh-anaparti-esxi-pri1","port":2049,"url":"NetworkFilesystem://10.0.32.4/acs/primary/ref-trl-8349-v-Mol8-suresh-anaparti/ref-trl-8349-v-Mol8-suresh-anaparti-esxi-pri1/?ROLE\u003dPrimary\u0026STOREUUID\u003d4f1fbfc7-3e51-3e87-a427-0507003c990f","isManaged":false},"name":"ROOT-7","size":2147483648,"path":"ROOT-7","volumeId":7,"vmName":"i-2-7-VM","accountId":2,"format":"OVA","provisioningType":"THIN","poolId":1,"id":7,"deviceId":0,"bytesReadRate":0,"bytesWriteRate":0,"iopsReadRate":0,"iopsWriteRate":0,"hypervisorType":"VMware","directDownload":false,"deployAsIs":false,"passphrase":[],"followRedirects":false}].
2025-04-16 16:49:22,363 DEBUG [c.c.h.v.r.VmwareResource] (DirectAgent-397:ctx-42dc9c3f 10.0.32.203, job-43/job-44, cmd: StartCommand) (logid:a33444b5) Prepare volume at new device {"capacityInKB":0,"key":-2,"backing":{"diskMode":"persistent","fileName":"[4f1fbfc73e513e87a4270507003c990f] i-2-7-VM/ROOT-7.vmdk","datastore":{"value":"datastore-1015","type":"Datastore"}},"connectable":{"startConnected":true,"allowGuestControl":false,"connected":true},"controllerKey":200,"unitNumber":1}
2025-04-16 16:49:22,363 INFO  [c.c.h.v.r.VmwareResource] (DirectAgent-397:ctx-42dc9c3f 10.0.32.203, job-43/job-44, cmd: StartCommand) (logid:a33444b5) Prepare NIC device based on NicTO: {"deviceId":0,"networkRateMbps":200,"defaultNic":true,"pxeDisable":false,"nicUuid":"50d83dd3-bd22-4367-a26f-b8c260085a04","details":{"PromiscuousMode":"false","ForgedTransmits":"true","MacAddressChanges":"true","MacLearning":"false"},"dpdkEnabled":false,"uuid":"f0f04a3c-9d92-409f-bb40-8e64bd123536","ip":"1.1.1.9","netmask":"255.255.255.0","gateway":"1.1.1.1","mac":"1e:00:b0:00:00:30","dns1":"10.0.32.1","dns2":"8.8.8.8","broadcastType":"Vlan","type":"Guest","broadcastUri":"vlan://1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760","isolationUri":"vlan://1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760","isSecurityGroupEnabled":false,"name":"dvSwitch1,,vmwaredvs"}
2025-04-16 16:49:22,363 DEBUG [c.c.h.v.r.VmwareResource] (DirectAgent-397:ctx-42dc9c3f 10.0.32.203, job-43/job-44, cmd: StartCommand) (logid:a33444b5) VM i-2-7-VM will be started with NIC device type: E1000 on NIC device 0
2025-04-16 16:49:22,393 INFO  [c.c.h.v.r.VmwareResource] (DirectAgent-397:ctx-42dc9c3f 10.0.32.203, job-43/job-44, cmd: StartCommand) (logid:a33444b5) Prepare network on vmwaredvs dvSwitch1 with name prefix: cloud.guest
2025-04-16 16:49:22,426 DEBUG [c.c.h.v.m.HypervisorHostHelper] (DirectAgent-397:ctx-42dc9c3f 10.0.32.203, job-43/job-44, cmd: StartCommand) (logid:a33444b5) Found distributed vSwitch: dvSwitch1 with product version: 7.0.3
2025-04-16 16:49:22,426 DEBUG [c.c.h.v.m.HypervisorHostHelper] (DirectAgent-397:ctx-42dc9c3f 10.0.32.203, job-43/job-44, cmd: StartCommand) (logid:a33444b5) Creating dvSwitch port vlan-trunk spec with range: 1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760
2025-04-16 16:49:22,434 INFO  [c.c.h.v.m.HypervisorHostHelper] (DirectAgent-397:ctx-42dc9c3f 10.0.32.203, job-43/job-44, cmd: StartCommand) (logid:a33444b5) Found Distributed Virtual Port group cloud.guest.1741-1760.200.1-dvSwitch1
2025-04-16 16:49:22,444 DEBUG [c.c.h.v.m.HypervisorHostHelper] (DirectAgent-397:ctx-42dc9c3f 10.0.32.203, job-43/job-44, cmd: StartCommand) (logid:a33444b5) Checking if configuration of dvPortGroup [cloud.guest.1741-1760.200.1-dvSwitch1] has changed.
2025-04-16 16:49:22,486 DEBUG [c.c.h.v.m.HypervisorHostHelper] (DirectAgent-397:ctx-42dc9c3f 10.0.32.203, job-43/job-44, cmd: StartCommand) (logid:a33444b5) Added custom field : cloud.gc.dvp
2025-04-16 16:49:22,507 INFO  [c.c.h.v.r.VmwareResource] (DirectAgent-397:ctx-42dc9c3f 10.0.32.203, job-43/job-44, cmd: StartCommand) (logid:a33444b5) Preparing NIC device on dvSwitch : 50 33 c8 c4 fc d8 32 85-cc 1d 01 86 2d 27 91 74
2025-04-16 16:49:22,507 DEBUG [c.c.h.v.r.VmwareResource] (DirectAgent-397:ctx-42dc9c3f 10.0.32.203, job-43/job-44, cmd: StartCommand) (logid:a33444b5) Prepare NIC at new device {"operation":"ADD","device":{"addressType":"Manual","macAddress":"1e:00:b0:00:00:30","key":-3,"backing":{"port":{"switchUuid":"50 33 c8 c4 fc d8 32 85-cc 1d 01 86 2d 27 91 74","portgroupKey":"dvportgroup-1044"}},"connectable":{"startConnected":true,"allowGuestControl":true,"connected":true}}}
...
2025-04-16 16:49:26,672 DEBUG [c.c.a.t.Request] (DirectAgent-397:ctx-42dc9c3f) (logid:a33444b5) Seq 1-3287064778027046475: Processing:  { Ans: , MgmtId: 32988100297743, via: 1(10.0.32.203), Ver: v1, Flags: 10, [{"com.cloud.agent.api.StartAnswer":{"vm":{"id":"7","name":"i-2-7-VM","bootloader":"HVM","state":"Starting","type":"User","cpus":"1","minSpeed":"250","maxSpeed":"500","minRam":"(512.00 MB) 536870912","maxRam":"(512.00 MB) 536870912","hostName":"testsharedvm01","arch":"x86_64","os":"CentOS 5.3 (64-bit)","platformEmulator":"centos64Guest","bootArgs":"","enableHA":"false","limitCpuUse":"false","enableDynamicallyScaleVm":"false","params":{"deployvm":"true","dataDiskController":"osdefault","nestedVirtualizationFlag":"false","cpuOvercommitRatio":"2.0","vmware.reserve.mem":"false","vmware.reserve.cpu":"false","nicAdapter":"E1000","rootDiskController":"ide"},"uuid":"7abd3369-476c-405e-9856-ef228514f480","enterHardwareSetup":"false","disks":[{"data":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"60be12b6-140a-4afe-866e-3b2e1a95a8bc","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"4f1fbfc7-3e51-3e87-a427-0507003c990f","name":"ref-trl-8349-v-Mol8-suresh-anaparti-esxi-pri1","id":"1","poolType":"NetworkFilesystem","host":"10.0.32.4","path":"/acs/primary/ref-trl-8349-v-Mol8-suresh-anaparti/ref-trl-8349-v-Mol8-suresh-anaparti-esxi-pri1","port":"2049","url":"NetworkFilesystem://10.0.32.4/acs/primary/ref-trl-8349-v-Mol8-suresh-anaparti/ref-trl-8349-v-Mol8-suresh-anaparti-esxi-pri1/?ROLE=Primary&STOREUUID=4f1fbfc7-3e51-3e87-a427-0507003c990f","isManaged":"false"}},"name":"ROOT-7","size":"(2.00 GB) 2147483648","path":"ROOT-7","volumeId":"7","vmName":"i-2-7-VM","accountId":"2","chainInfo":"{"diskDeviceBusName":"ide0:1","diskChain":["[4f1fbfc73e513e87a4270507003c990f] i-2-7-VM/ROOT-7.vmdk","[4f1fbfc73e513e87a4270507003c990f] 2bfcc1c61e9e3f7e864823956795c8f8/2bfcc1c61e9e3f7e864823956795c8f8.vmdk"]}","format":"OVA","provisioningType":"THIN","poolId":"1","id":"7","deviceId":"0","bytesReadRate":"(0 bytes) 0","bytesWriteRate":"(0 bytes) 0","iopsReadRate":"(0 bytes) 0","iopsWriteRate":"(0 bytes) 0","hypervisorType":"VMware","directDownload":"false","deployAsIs":"false","followRedirects":"false"}},"diskSeq":"0","path":"ROOT-7","type":"ROOT","_details":{"storageHost":"10.0.32.4","managed":"false","storagePort":"2049","storage.pool.disk.wait":"60","volumeSize":"(2.00 GB) 2147483648"}},{"data":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"id":"0","format":"ISO","accountId":"0","hvm":"false","bootable":"false","directDownload":"false","deployAsIs":"false","followRedirects":"false"}},"diskSeq":"3","type":"ISO"}],"nics":[{"deviceId":"0","networkRateMbps":"200","defaultNic":"true","pxeDisable":"false","nicUuid":"50d83dd3-bd22-4367-a26f-b8c260085a04","details":{"PromiscuousMode":"false","ForgedTransmits":"true","MacAddressChanges":"true","MacLearning":"false"},"dpdkEnabled":"false","uuid":"f0f04a3c-9d92-409f-bb40-8e64bd123536","ip":"1.1.1.9","netmask":"255.255.255.0","gateway":"1.1.1.1","mac":"1e:00:b0:00:00:30","dns1":"10.0.32.1","dns2":"8.8.8.8","broadcastType":"Vlan","type":"Guest","broadcastUri":"vlan://1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760","isolationUri":"vlan://1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760","isSecurityGroupEnabled":"false","name":"dvSwitch1,,vmwaredvs"}],"configDriveLocation":"SECONDARY","guestOsDetails":{},"extraConfig":{}},"_iqnToData":{},"result":"true","wait":"0","bypassHostMaintenance":"false"}}] }
...
2025-04-16 16:49:26,804 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-33:ctx-0cb2a682 job-43 ctx-f760c225) (logid:a33444b5) Complete async job-43, jobStatus: SUCCEEDED, resultCode: 0, result: org.apache.cloudstack.api.response.UserVmResponse/virtualmachine/{"id":"7abd3369-476c-405e-9856-ef228514f480","name":"testsharedvm01","displayname":"testsharedvm01","account":"admin","userid":"73e97c18-19e4-11f0-abf3-1e00a400040f","username":"admin","domainid":"36f47570-19e4-11f0-abf3-1e00a400040f","domain":"ROOT","domainpath":"/","created":"2025-04-16T16:48:21+0000","lastupdated":"2025-04-16T16:49:26+0000","state":"Running","haenable":"false","zoneid":"40e239ec-892e-46a4-a347-3c89ec82c57c","zonename":"ref-trl-8349-v-Mol8-suresh-anaparti","hostid":"6b82319c-ef41-4571-a37f-35cbeb71a653","hostname":"10.0.32.203","hostcontrolstate":"Enabled","templateid":"36fbf4c8-19e4-11f0-abf3-1e00a400040f","templatename":"CentOS 5.3(64-bit) no GUI (vSphere)","templatetype":"BUILTIN","templateformat":"OVA","templatedisplaytext":"CentOS 5.3(64-bit) no GUI (vSphere)","passwordenabled":"false","serviceofferingid":"ba329caa-ebde-48e6-8893-4e6ca771d7a2","serviceofferingname":"Small Instance","cpunumber":"1","cpuspeed":"500","memory":"512","guestosid":"37024d55-19e4-11f0-abf3-1e00a400040f","rootdeviceid":"0","rootdevicetype":"ROOT","securitygroup":[],"nic":[{"id":"50d83dd3-bd22-4367-a26f-b8c260085a04","networkid":"f0f04a3c-9d92-409f-bb40-8e64bd123536","networkname":"testshared","netmask":"255.255.255.0","gateway":"1.1.1.1","ipaddress":"1.1.1.9","isolationuri":"vlan://1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760","broadcasturi":"vlan://1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758,1759,1760","traffictype":"Guest","type":"Shared","isdefault":"true","macaddress":"1e:00:b0:00:00:30","secondaryip":[],"extradhcpoption":[],"deviceid":"0"}],"hypervisor":"VMware","ipaddress":"1.1.1.9","instancename":"i-2-7-VM","details":{"dataDiskController":"osdefault","cpuOvercommitRatio":"2.0","rootDiskController":"ide"},"affinitygroup":[],"displayvm":"true","isdynamicallyscalable":"false","ostypeid":"37024d55-19e4-11f0-abf3-1e00a400040f","osdisplayname":"CentOS 5.3 (64-bit)","pooltype":"NetworkFilesystem","receivedbytes":"0","sentbytes":"0","tags":[],"hasannotations":"false","jobid":"a33444b5-e5d0-4fc3-9f4d-c063d3e1f312","jobstatus":"0"}

Screenshots =>

CS_SharedNetworkWithMultipleVlansInBroadcastUri VMware_dvSwitchCreatedWithRange01 VMware_dvSwitchCreatedWithRange_Details VMware_dvSwitchCreatedWithRange_VLANTrunk

How did you try to break this feature and the system with this change?

…r dvSwitch (max 80 chars allowed for the port group name)
@sureshanaparti sureshanaparti force-pushed the vmware-dvswitch-long-broadcast-uri-support branch from 6babba3 to f56b966 Compare April 14, 2025 13:15
@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti 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.

Copy link

codecov bot commented Apr 14, 2025

Codecov Report

Attention: Patch coverage is 53.84615% with 30 lines in your changes missing coverage. Please review.

Project coverage is 15.17%. Comparing base (99ea77d) to head (dbb5ad2).
Report is 25 commits behind head on 4.19.

Files with missing lines Patch % Lines
...ils/src/main/java/com/cloud/utils/StringUtils.java 54.71% 23 Missing and 1 partial ⚠️
...oud/hypervisor/vmware/mo/HypervisorHostHelper.java 50.00% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.19   #10708      +/-   ##
============================================
+ Coverage     15.16%   15.17%   +0.01%     
- Complexity    11327    11334       +7     
============================================
  Files          5415     5415              
  Lines        474848   474975     +127     
  Branches      57914    57941      +27     
============================================
+ Hits          72018    72095      +77     
- Misses       394781   394822      +41     
- Partials       8049     8058       +9     
Flag Coverage Δ
uitests 4.28% <ø> (-0.01%) ⬇️
unittests 15.90% <53.84%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13047

@DaanHoogland DaanHoogland linked an issue Apr 15, 2025 that may be closed by this pull request
@sureshanaparti sureshanaparti changed the title [WIP][VMware] Update vlans with proper range before creating port group for dvSwitch [VMware] Update vlans with proper range before creating port group for dvSwitch Apr 16, 2025
@sureshanaparti sureshanaparti marked this pull request as ready for review April 16, 2025 17:04
@sureshanaparti
Copy link
Contributor Author

@blueorangutan ol8 vmware-70u3

@sureshanaparti sureshanaparti added this to the 4.19.3 milestone Apr 16, 2025
@DaanHoogland
Copy link
Contributor

@blueorangutan test ol8 vmware-70u3

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + vmware-70u3) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian Build Failed (tid-13038)

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti 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.

Copy link
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13103

@DaanHoogland
Copy link
Contributor

@blueorangutan test ol8 vmware-70u3

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + vmware-70u3) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13053)
Environment: vmware-70u3 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 83994 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10708-t13053-vmware-70u3.zip
Smoke tests completed. 128 look OK, 5 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_events_resource Error 419.67 test_events_resource.py
test_04_deploy_vm_for_other_user_and_test_vm_operations Error 112.89 test_network_permissions.py
test_01_restore_vm Error 3603.57 test_restore_vm.py
test_02_restore_vm_allocated_root Error 8.91 test_restore_vm.py
test_01_deploy_vm_on_specific_host Error 13.77 test_vm_deployment_planner.py
test_02_deploy_vm_on_specific_cluster Error 3603.02 test_vm_deployment_planner.py
test_03_deploy_vm_on_specific_pod Error 2.47 test_vm_deployment_planner.py
test_04_deploy_vm_on_host_override_pod_and_cluster Error 2.46 test_vm_deployment_planner.py
test_05_deploy_vm_on_cluster_override_pod Error 2.42 test_vm_deployment_planner.py
test_09_expunge_vm Failure 424.65 test_vm_life_cycle.py

Copy link
Member

@rohityadavcloud rohityadavcloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM didn't test it

@weizhouapache
Copy link
Member

tested a simple case

cloudstack vlan
image

dvs
image

@DaanHoogland
Copy link
Contributor

tested

🐱 > create network displaytext=testshared name=testshared networkofferingid=89ae8f9a-8fc4-4db6-b885-b1c49ced22f8 domainid=37e9839a-2a5a-11f0-9616-1e00e3000169 zoneid=d3e806be-b809-46d2-8be5-7baebc6df7b2 vlan=vlan://3040-3049,3060-3069 gateway=1.1.1.1 netmask=255.255.255.0 startip=1.1.1.2 endip=1.1.1.10 bypassvlanoverlapcheck=true

and

🐱 > create network displaytext=testshared name=testshared networkofferingid=89ae8f9a-8fc4-4db6-b885-b1c49ced22f8 domainid=37e9839a-2a5a-11f0-9616-1e00e3000169 zoneid=d3e806be-b809-46d2-8be5-7baebc6df7b2 vlan=vlan://1741,1742,1743,1744,1745,1746,1747,1748,1749,1750,1851,1852,1853,1854,1855,1856,1857,1858,1859,1860 gateway=1.1.1.1 netmask=255.255.255.0 startip=1.1.1.2 endip=1.1.1.10 bypassvlanoverlapcheck=true

both lead to properly formatted dvswitches in the backend after a vm is deployed on them.

@DaanHoogland DaanHoogland merged commit f0838cd into apache:4.19 May 8, 2025
26 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in ACS 4.20.1 May 8, 2025
@DaanHoogland DaanHoogland deleted the vmware-dvswitch-long-broadcast-uri-support branch May 8, 2025 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Unable to create network with long broadcastUri in vSwitch
5 participants