-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue of high stats value being sent from VN UVE.
Issue VN stats are picked from flow statistics. Statistics for VN are collected from flow statistics. Agent periodically collects flow stats from vrouter and updates its statistics for flow. During such collection agent also detects whether 6 byte statistics provided by vrouter has resulted in overflow. If it detects overflow, it will increment stats by value of 0x0001000000000000 (first bit of 7th byte) to account for overflow. Because of bug in overflow detection, the stats were getting incremented by 0x0001000000000000, even when overflow has not really occurred. This is resulting in high VN stats. During periodic stats collection from vrouter, agent detects overflow by checking if the value of agent copy of stats is bigger than the value of vrouter copy of stats. The agent copy of stats was higher than vrouter copy due to the following reasons 1. When gen-id/flow-handle of a flow changes, statistics for the flow were not reset by stats collection module. 2. During periodic scanning of flows, the stats collection module used current/updated flow-handle and gen-id from the flow. 3. When vrouter sends message for stats collection, agent was not using the gen-id in the message. Fix 1.When stats collection module receives add for a flow which is already present, reset stats for the flow if its gen-id/flow-handle (identified by change of flow uuid) has changed. 2. During periodic scanning of flows, use gen-id/flow-handle with which the flow was added to stats collection module, instead of using the latest gen-id/flow-handle of flow. 3. The Evicted flows stats update message sent to stats collection module should carry UUID of the flow. In Stats collection module ignore the stats update message if the Flow UUID in the message does not match with its Flow UUID. 4. Read all the stats, flags, udp source port for flows in one shot and validate the read values. Use these read values for further processing instead of reading these fields from vrouter separately during processing. 5. When stats collection module is processing delete message for a flow, we read and export stats for the flow before it is deleted. To read stats here we should use gen-id/flow-handle from flow stats module instead of picking latest value from FlowEntry. Change-Id: I1a852816dd890d49ddee8ff7fcafd4100c5212e4 Closes-Bug: #1654557
- Loading branch information
Showing
20 changed files
with
464 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.