Bug 1996146

Summary: [RFE] Export flow_mod and group_mod statistics to a CLI command
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Mark Michelson <mmichels>
Component: OVNAssignee: xsimonar
Status: NEW --- QA Contact: Jianlin Shi <jishi>
Severity: unspecified Docs Contact:
Priority: medium    
Version: FDP 21.GCC: ctrautma, jiji
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mark Michelson 2021-08-20 16:46:45 UTC
CMSes are interested in being able to inspect the number of OpenFlow FLOW_MOD and GROUP_MOD operations that are occurring within ovn-controller. This helps to provide operators with information that might help to indicate the busy-ness of OVN. Currently, they must turn on debug logging in ovn-controller and then scrape the logs in order to determine how many FLOW_MOD and GROUP_MOD operations are occurring.

For this task, we will need the following:
1) In controller/ofctrl.c, add some code to track the number of FLOW_MOD and GROUP_MOD commands that are issued during each ofctrl_put() operation. If possible, sub-categorize these into adds, removes, and updates. Ideally, we will not keep an in-memory list of values, but rather handle this similarly to how the stopwatch code operates. This means that we can keep a running average, maximum, 95th percentile, etc.

2) Add an ovn-appctl command to ovn-controller to list the FLOW_MOD and GROUP_MOD statistics. You can use the stopwatch implementation to get a good idea of how to format the information.

There is every possibility that we may want to gather more similar stats in the future. So if possible, it would be good to create this in a way that allows for future statistics to also be gathered and queried without large overhauls.