andrijapanicsb opened a new issue, #14707:
URL: https://github.com/apache/cloudstack/issues/14707

   Trunk NICs on KVM is a feature I have been waiting for, and I need it for my 
own testing. Thanks @Pearl1594 for the work, it is a big piece.
   
   #14166 is now on main. I want this feature in 24.0, and I want it to be 
solid when it ships. So the points below should be fixed before the release, 
and I think this should be a release blocker.
   
   Everything here was checked against the merged code (`1881dc6`). It was not 
tested in a lab.
   
   ## Why this is a blocker
   
   Three of these can hurt users who never asked for the new feature.
   
   **1. Tenants can end up on the same L2 network.**
   The agent decides "this host has VLAN filtering" one time for the whole 
host. But every NIC is plugged into its own bridge. If a host has two guest 
bridges, one with filtering and one without, normal VM NICs can land on a 
bridge that does not separate VLANs.
   
   The docs say that more than one guest physical network is not supported. But 
that is only in the docs, and the docs PR is not merged yet. And let's be 
honest, we all know that most people do not read every line of the 
documentation before they change something on a host. The code does not check 
it and does not refuse. If somebody does it by mistake, there is no warning, 
and other tenants pay for it. A limit like this must be enforced in the code.
   
   - `LibvirtCheckNetworkCommandWrapper.java:43-45`
   - `LibvirtComputingResource.java:6358`
   - `BridgeVifDriver.java:490`
   - Review comments `r4458018368` and `r4458018485`, both marked High, both 
unanswered.
   
   **2. Load balancer is broken for normal VPC users.**
   In a VPC with conserve mode (released in 4.23), adding a secondary IP of a 
VM from another tier to a load balancer rule should now fail, from the code. 
The check uses the network of the LB rule and not the NIC of the VM. This has 
nothing to do with trunk NICs, but this PR changed that line.
   
   - `LoadBalancingRulesManagerImpl.java:1131`
   
   **3. A VM can sit on the wrong VLAN.**
   On libvirt older than 11 (EL8, Ubuntu 22.04 and 24.04, Debian 12):
   - The VM starts first and gets its VLANs after. Until then the NIC is on 
VLAN 1. `default_pvid` is never checked.
   - After `migrateNetwork` / `migrateVpc` the NIC is re-plugged and gets no 
VLANs at all. It stays on VLAN 1 until the VM is restarted.
   - If setting the VLANs after a live migration fails, there is only an alert. 
No retry.
   
   - `LibvirtStartCommandWrapper.java:99-101`, 
`LibvirtPlugNicCommandWrapper.java:93-98`, `LibvirtReplugNicCommandWrapper.java`
   
   ## Other things to fix
   
   | # | Problem | Where |
   |---|---|---|
   | 4 | When a trunk NIC is removed, port forwarding and static NAT rules on 
its extra networks are not checked. The IP is released but the rule stays, and 
can later point to another VM | 
`RulesManagerImpl.listAssociatedRulesForGuestNic` |
   | 5 | Live disassociate: if the router cannot be reached, the usage "remove" 
event is never sent and the usage record stays open | 
`NetworkServiceImpl.java:1168-1170` |
   | 6 | The four other open review comments: VM missing in the "Enable Static 
NAT" list, host count in zone readiness, usage default flag, `@EntityReference` 
| open threads on #14166 |
   
   ## How it was merged
   
   @nvazquez, a direct question for you, because you approved and merged it.
   
   - There were six review comments from Copilot on the PR. Two are marked 
**High**. All six are correct in the merged code.
   - Not one of them got a reply. Not even "known limit, see docs".
   - No code was changed after those comments. The only commit after 3 Nov is a 
merge from main.
   - On the final commit (`11c0394e`) the Build, Simulator CI and Sonar jobs 
did not run. They failed at "Setup Environment" and were not restarted.
   - The PR adds unit tests but no integration (Marvin) test. The smoke test 
hosts had VLAN filtering off (the QA note on the PR says so for the last run), 
so the automated runs used the old network path. The new path was tested only 
by hand. That manual testing was big, but nobody can re-run it automatically 
when this code changes later.
   
   This is a 10,000 line change in the KVM network path. Why was it merged with 
High review comments unanswered and without a green build on the final commit?
   
   ## What I am asking for
   
   1. Answer the six review comments on #14166.
   2. Fix points 1 to 6, or say which ones are wrong and why.
   3. Keep this issue on the 24.0 milestone as a blocker until that is done.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to