Skip to content

Commit 14e8aea

Browse files
shwstpprdhslove
authored andcommitted
kvm, ui: fix interface when using vlan subnet for storage traffic type (apache#11245)
* kvm, ui: fix interface when using vlan subnet for storage traffic type Fixes apache#7816 Signed-off-by: Abhishek Kumar <[email protected]>
1 parent 5e2d055 commit 14e8aea

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,15 @@ public LibvirtVMDef.InterfaceDef plug(NicTO nic, String guestOsType, String nicA
256256
intf.defBridgeNet(_bridges.get("private"), null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter));
257257
} else if (nic.getType() == Networks.TrafficType.Storage) {
258258
String storageBrName = nic.getName() == null ? _bridges.get("private") : nic.getName();
259+
if (nic.getBroadcastType() == Networks.BroadcastDomainType.Storage) {
260+
vNetId = Networks.BroadcastDomainType.getValue(nic.getBroadcastUri());
261+
protocol = Networks.BroadcastDomainType.Vlan.scheme();
262+
}
263+
if (isValidProtocolAndVnetId(vNetId, protocol)) {
264+
s_logger.debug(String.format("creating a vNet dev and bridge for %s traffic per traffic label %s",
265+
Networks.TrafficType.Storage.name(), trafficLabel));
266+
storageBrName = createVnetBr(vNetId, storageBrName, protocol);
267+
}
259268
intf.defBridgeNet(storageBrName, null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter));
260269
}
261270
if (nic.getPxeDisable()) {

ui/src/views/infra/network/IpRangesTabStorage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export default {
166166
},
167167
{
168168
title: this.$t('label.vlan'),
169-
dataIndex: 'vlanid'
169+
dataIndex: 'vlan'
170170
},
171171
{
172172
title: this.$t('label.startip'),

0 commit comments

Comments
 (0)