Closed samdejoux1 closed 2 years ago
Thanks for opening your first issue here! Be sure to follow the issue template!
@samdejoux1 what VLAN pool/range was added (for ex. can you share the API request or parameter you passed in the API or UI)?
@samdejoux1 what VLAN pool/range was added (for ex. can you share the API request or parameter you passed in the API or UI)?
Hi @rohityadavcloud please see the command used to create the vlans below:
(mycloud2) 🐱 > dedicateguestvlanrange physicalnetworkid=203 vlanrange=1100-1150 account=admin domain=ROOT domainid=76546040-05d7-11ed-970b-005056a12013 🙈 Error: (HTTP 530, error code 9999) Index 0 out of bounds for length 0 (mycloud2) 🐱 >
Many thanks,
After receiving the out of bounds error, the VLANs are still added to the DB, however they are not 'available' for use when building an instance.
@samdejoux1 I'm unable to reproduce Index 0 out of bounds for length 0
error on 4.17. with a similar setup,
> dedicateguestvlanrange physicalnetworkid=201 vlanrange=2131-2135 account=admin domain=ROOT domainid=ecc52a37-1a08-11ed-981f-1e00f100018f
{
"dedicatedguestvlanrange": {
"account": "admin",
"domain": "ROOT",
"domainid": "ecc52a37-1a08-11ed-981f-1e00f100018f",
"guestvlanrange": "2131-2135",
"id": "d01dde50-d839-45c0-8dbc-59489c829171",
"physicalnetworkid": 201,
"zoneid": 1
}
}
Can you please share output of list physicalnetworks id=203
Thanks @shwstppr, please see the output of the list physical networks command below:
> list physicalnetworks id=203
{
"count": 1,
"physicalnetwork": [
{
"broadcastdomainrange": "ZONE",
"id": "b83056d8-faed-4bf6-9286-84baaa4613da",
"isolationmethods": "VLAN",
"name": "guest + public",
"state": "Enabled",
"zoneid": "8908f96e-d35e-403d-8035-8bf857c5361d",
"zonename": "au-dcxq1"
}
]
}
>
Thanks for sharing the physical network details @samdejoux1
The issue you see is due to the absence of VLAN range for the physical network. Right now I'm not sure what is the correct behaviour.
@weizhouapache @NuxRo @rohityadavcloud @DaanHoogland should it allow dedicating guest vlan range when the concerned physical network doesn't have any VLAN range itself?
For each VLAN in the rage for physical n/w an entry is created in cloud.op_dc_vnet_alloc
which is missing in this case and code at https://github.com/apache/cloudstack/blob/4.17/server/src/main/java/com/cloud/network/NetworkServiceImpl.java#L4148 is throwing error
whether we should disallow or auto-create a vlan-range seems like a user decision to me @shwstppr . good work tracking this.
Fixed with #6655
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
CONFIGURATION
Advanced networking configuration with VLANs used on the management, guest and public networks. Using VMWare DVS for guest and public traffic. Public traffic vlan has provisioned in vmware correctly, this issue is limited to guest.
OS / ENVIRONMENT
VMware ESXi, 6.7.0, 19898906 VCenter Version 6.7.0 Build 19832280
SUMMARY
When adding a pool of VLANs to the guest network under 'Dedicated VLAN/VNI Ranges' we receive the following error:
Error: (HTTP 530, error code 9999) Index 0 out of bounds for length 0
This is seen when creating through the GUI and also when using Cloud Monkey API Push.
Management server log shows :
2022-08-17 10:43:17,515 ERROR [c.c.a.ApiServer] (qtp1747352992-77024:ctx-db233219 ctx-fc39cbd8) (logid:bb7bd18a) unhandled exception executing api command: [Ljava.lang.String;@21acc147 java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
If you refresh the screen, the VLAN pool has been added however when creating an instance the process fails because a VLAN cannot be allocated from the pool. It feels like the VLAN pool is not being fully provisioned on the system.
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS