apache / cloudstack

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

Storage VLAN configuration on KVM #7816

Open rajujith opened 1 year ago

rajujith commented 1 year ago
ISSUE TYPE
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 columnvlan 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

tekkifygamer commented 1 year ago

Hi there,

I'm setting up a new Cloudstack install and plan to use VLANs for storage access. Is there any workarounds to this issue, or timeline as to when this will get fixed?

DaanHoogland commented 11 months ago

@tekkifygamer @rajujith , Is this a scenario in which the storage and management networks are on different physical networks? Is this same functionality working for management networks?

boubouX commented 11 months ago

We have had this issue for many years - It strangely worked fine before 4.17. We defined the storage network as a VLAN that rides on the CS private network. We eventually discovered that the SSVM is incapable of routing to that subnet, coupled with the fact that we have an old SecStorage still defined on the Storage network that refuses to be removed or migrated because of the lack of connectivity.