cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Storage VLAN configuration on KVM

Open rajujith opened this issue 1 year ago • 3 comments

ISSUE TYPE
  • Bug Report
COMPONENT NAME
KVM 
CLOUDSTACK VERSION
4.18.0
CONFIGURATION

ACS 4.18 , KVM : Ubuntu 22.04, Rocky 8. Storage traffic configured in the zone with VLAN subnet.

OS / ENVIRONMENT

KVM : Ubuntu 22.04, Rocky 8.

SUMMARY

When SSVM is created in the zone with storage traffic configured and has a subnet with VLAN the VLAN bridge is not provisioned by cloudstack on the KVM instead it attaches the vnet to the parent bridge instead of creating a VLAN bridge. Another issue is that the UI won't show the VLAN ID although it is in the DB, these could be caused by the same issue?

I could notice that the SSVM start answer has the following information on the storage NIC: "broadcastType":"Storage","type":"Storage","broadcastUri":"storage://150"

This should be ideal when compared to public NIC:

"broadcastType":"Vlan","type":"Public","broadcastUri":"vlan://51"

The table also has stored the VLAN id differently:

select * from dc_storage_network_ip_range;
+----+--------------------------------------+---------------+----------------+---------------+------+---------------+----------------+--------+------------+
| id | uuid                                 | start_ip      | end_ip         | gateway       | vlan | netmask       | data_center_id | pod_id | network_id |
+----+--------------------------------------+---------------+----------------+---------------+------+---------------+----------------+--------+------------+
|  3 | 596ef473-0224-4df2-a630-5c4840213b6b | 192.168.150.2 | 192.168.150.10 | 192.168.150.1 |  150 | 255.255.255.0 |              1 |      1 |        203 |
+----+--------------------------------------+---------------+----------------+---------------+------+---------------+----------------+--------+------------+

In the vlan table it is of format vlan://51. I tried changing the datatype of column vlan in table dc_storage_network_ip_range to VARCHAR(255) but it breaks.

STEPS TO REPRODUCE
1. Create a zone with storage traffic configured.
2. Enable the zone to deploy SSVM
3. verify whether SSVM's storage vNIC/vnet is attached to a VLAN-tagged bridge ( bridge with VLAN interface under it). 
EXPECTED RESULTS
CloudStack should create a VLAN interface and associate it with a bridge in KVM when SSVM is deployed in a zone with a storage subnet with VLAN. 
ACTUAL RESULTS
CloudStack is not creating a VLAN interface and associates it with a bridge in KVM when SSVM is deployed in a zone with a storage subnet with VLAN. 

 brctl show
bridge name	bridge id		STP enabled	interfaces
brbond1-51		8000.2e79bdd10f08	no		bond1.51
							vnet30
cloud0		8000.b220e3da90a2	no		vnet28
cloudbr0		8000.a2a6f0d66f61	yes		bond0
							vnet29
cloudbr1		8000.02206b3129f6	yes		bond1
							vnet31

Screenshot 2023-08-04 at 4 41 09 PM

rajujith avatar Aug 04 '23 11:08 rajujith