[ovs-dev] [RFC ovn 0/5] Facilitate external use of ovn-detrace
Dumitru Ceara
dceara at redhat.com
Mon Oct 18 12:51:29 UTC 2021
On 10/14/21 6:41 PM, Adrian Moreno wrote:
> ovn-detrace is a very useful tool for debugging OVN issues.
>
> It's core logic (mapping openflow cookies / ports with OVN objects) can
> be used for a variety of troubleshooting tools. Therefore, it would be
> desirable to make use of such logic from an external python program.
>
> This could be done by creating a python library (similarly to what ovs
> provides) that is built and pushed to PyPi for other projects to
> consume.
>
> However, being the only python script that lives in OVN, this might be a
> bit of an overkill, so what this series proposes is an intermediate step
> that does not require that much extra maintenance and still alleviates
> the main obstacles one finds when trying to use ovn-detrace as a python
> module which are:
> - python expects module names to end in .py and use underscores instead
> of hyphens
> - internally, ovn-detrace prints directy to stdout, the output of the
> ovn-detrace information should be configurable
> - the version information is not easily available
>
> With this series, ovn-detrace is renamed to ovn_detrace.py and a
> symlink with the old name is created for backwards compatibility. As a
> result, a use can point her PYTHONPATH to ovn's installation path,
> run "import ovn_detrace", and make use of ovn-detrace's logic with, say,
> individual openflow cookies instead of ofproto/trace outputs.
>
> I know it's not the cleanest way to do it. I'd love to hear your opinion
> on the matter.
>
> Reviewing notes:
> - The first patch is a small fix I spotted when playing around with
> ovn-detrace
> - I have not tested the debian package thoroughly
>
Hi Adrian,
I briefly tried the RFC series out and I don't see any functional
changes, so that works for me.
I quickly glanced at the patches too and they also look OK to me.
Looking forward to the v1.
Regards,
Dumitru
More information about the dev
mailing list