jmsperu commented on PR #14640: URL: https://github.com/apache/cloudstack/pull/14640#issuecomment-7112275915
Tested on 4.22.1.1 by swapping cloud-core on both KVM agents. Scenario: one VPC, 6 tiers created in parallel, one VM deployed into each tier as soon as its tier exists. | | Unpatched (5 runs) | With PR (6 runs) | |---|---|---| | Clean runs (6 VMs Running, 6 tier gateways on the VR) | 1 | 4 | | Runs with agent NPE "Cannot invoke java.util.Queue.clear() because queue is null" | 4 | 0 | | VMs Running in the bad runs | 1 to 5 of 6 | all created | | Runs where the VR is missing tier gateway addresses | 4 | 2 | So the PR is a clear improvement: the NPE is gone and deployments succeed. But in 2 of 6 runs the VR still ended with only 2 guest gateways configured (for 4 and 5 tiers) while every network was Implemented and every VM Running. On those routers the tier NICs were plugged at libvirt level, and there were 2 or 3 unprocessed `guest_network.json.<uuid>` files left in /var/cache/cloud. Cause of the remaining two bad runs (found in the management server log, it is not the agent): the tiers are implemented in parallel and each one plugs a NIC into the same VPC router. NetworkOrchestrator.createNicForVm reads the next free device ID (NicDao.getFreeDeviceId) without any lock, so several tiers get the same one. In the bad run the PlugNicCommands carried deviceId 2 three times and deviceId 3 twice, for 5 tiers, and the router ended with 2 gateways. This is a separate bug from this PR: issue #14814, with a fix in #14815 (a lock per instance around the device ID pick and the NIC allocation). With that fix on the management server and this PR on the Agents, 8 of 8 runs were clean (6 gateways, unique device IDs, no NPE). With that fix alone and the original Agent, the device IDs were unique but the NPE came back in 3 of 3 runs, so both changes are needed. -- 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]
