Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e45ea95
engine-schema: upgrade path for 24.0.0
shwstppr Sep 14, 2026
c2ebb3a
Support multi-VLAN trunk NICs
Pearl1594 Sep 14, 2026
219f9cb
Merge branch 'main' of github.com:apache/cloudstack into support-mult…
Pearl1594 Sep 14, 2026
eb97acf
deliver multi-VLAN trunk nics via libvirt vlan XML and bridge fallback
Pearl1594 Sep 16, 2026
d143862
Fix nic_network_map unique constraint blocking re-association
Pearl1594 Sep 28, 2026
a7b6a8e
Deliver multi-VLAN trunk NICs on KVM via libvirt vlan XML and bridge …
Pearl1594 Sep 28, 2026
bcb89ab
Bill usage for a trunk nic's associated networks
Pearl1594 Sep 28, 2026
3d27d89
Expose trunk nic and associated-network info in NicResponse
Pearl1594 Sep 28, 2026
dd4ee2a
Add ApiConstants for NicResponse trunk fields
Pearl1594 Sep 28, 2026
c16a58d
Add multi-VLAN trunk NIC association service
Pearl1594 Sep 28, 2026
88585ed
Add EventTypes constants for the association service commit
Pearl1594 Sep 28, 2026
df74bd9
Support multi-VLAN trunk NICs at VM deploy time
Pearl1594 Sep 28, 2026
3a7519d
Fix static NAT lookup in disassociate guard
Pearl1594 Sep 28, 2026
68d7771
Fix VNF management nic trunkable via live associate API
Pearl1594 Sep 28, 2026
485ad26
Fix stale nic fields after changing its primary network
Pearl1594 Sep 28, 2026
721bae1
Clear multiNetwork flag when a nic's last trunk association is removed
Pearl1594 Sep 29, 2026
1a3ddfb
Push DHCP entries to a trunk nic's associated networks
Pearl1594 Sep 29, 2026
5088e0b
Add KVM live migration support for multi-VLAN trunk NICs (Phase 7)
Pearl1594 Oct 2, 2026
01729b9
Merge branch 'main' of github.com:apache/cloudstack into support-mult…
Pearl1594 Oct 2, 2026
c9b98ea
fix test
Pearl1594 Oct 2, 2026
5f95946
Fix CI build failures from the multi-VLAN trunk NIC changes
Pearl1594 Oct 2, 2026
b4c18d6
Fix NullPointerException in LibvirtComputingResourceTest.testMigrateC…
Pearl1594 Oct 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clear multiNetwork flag when a nic's last trunk association is removed
- disassociateNetworkFromNic now clears nics.multi_network once
  nic_network_map has no remaining rows for that nic
- Without this, listNics/listVirtualMachines kept reporting trunked=true
  and the deployment planner kept restricting the VM to VLAN-filtering-
  capable hosts even after all associations were removed
  • Loading branch information
Pearl1594 committed Sep 29, 2026
commit 721bae1929d98ea3321b93dcc1f2776fae11856f
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,11 @@ public Nic disassociateNetworkFromNic(DisassociateNetworkFromNicCmd cmd) throws
// so removing this row is itself the release
_nicNetworkMapDao.remove(association.getId());

if (nic.getMultiNetwork() && _nicNetworkMapDao.listByNicId(nic.getId()).isEmpty()) {
nic.setMultiNetwork(false);
_nicDao.update(nic.getId(), nic);
}

if (vmRunning) {
updateLiveVlanTrunkMembership(vm, nic);
refreshNicVlanMappingMetadata(nic);
Expand Down
22 changes: 22 additions & 0 deletions server/src/test/java/com/cloud/network/NetworkServiceImplTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2005,12 +2005,34 @@ public void disassociateNetworkFromNicRemovesAssociationOnAStoppedVm() throws Ex
Mockito.when(userVmDao.findById(5L)).thenReturn(vm);
NicNetworkMapVO association = new NicNetworkMapVO(11L, 206L, "10.1.1.50", null);
Mockito.when(nicNetworkMapDao.findByNicIdAndNetworkId(11L, 206L)).thenReturn(association);
Mockito.when(nicNetworkMapDao.listByNicId(11L)).thenReturn(Collections.emptyList());

Nic result = service.disassociateNetworkFromNic(mockDisassociateCmd(11L, 206L));

Assert.assertNotNull(result);
Mockito.verify(nicNetworkMapDao).remove(association.getId());
Mockito.verify(agentMgr, Mockito.never()).easySend(Mockito.anyLong(), Mockito.any());
Mockito.verify(nic).setMultiNetwork(false);
Mockito.verify(nicDao).update(11L, nic);
}

@Test
public void disassociateNetworkFromNicKeepsMultiNetworkFlagWhenOtherAssociationsRemain() throws Exception {
NicVO nic = mockNic(11L, 5L, 205L, true);
Mockito.when(nicDao.findById(11L)).thenReturn(nic);
UserVmVO vm = mockVm(VirtualMachine.State.Stopped, null);
Mockito.when(userVmDao.findById(5L)).thenReturn(vm);
NicNetworkMapVO association = new NicNetworkMapVO(11L, 206L, "10.1.1.50", null);
Mockito.when(nicNetworkMapDao.findByNicIdAndNetworkId(11L, 206L)).thenReturn(association);
NicNetworkMapVO remainingAssociation = new NicNetworkMapVO(11L, 207L, "10.1.1.60", null);
Mockito.when(nicNetworkMapDao.listByNicId(11L)).thenReturn(Arrays.asList(remainingAssociation));

Nic result = service.disassociateNetworkFromNic(mockDisassociateCmd(11L, 206L));

Assert.assertNotNull(result);
Mockito.verify(nicNetworkMapDao).remove(association.getId());
Mockito.verify(nic, Mockito.never()).setMultiNetwork(Mockito.anyBoolean());
Mockito.verify(nicDao, Mockito.never()).update(Mockito.eq(11L), Mockito.any());
}

@Test
Expand Down