Currently there are an issue preventing us from really doing OVN troubleshooting with this tool:
We can't run multiple ovsdb-server instances at the same time
This PR adds support for multiple ovsdb-servers, adds collect-db-ovn-{nb,sb} to the commandline and prints OVN hint commands nicely.
Also, it collects the OVN database from a running k8s cluster. As a result, after collecting k8s data:
$ ./bin/offline-dbg collect-k8s ovn_worker && ./bin/offline-dbg start
[...]
Offline OVS Debugging started
******************************
Working directory: /tmp/ovs-offline-dbg:
* openvswitch control found at /tmp/ovs-offline-dbg/var-run/ovs/ovs-vswitchd.8.ctl
You can run ovs-appctl commands as:
ovs-appctl --target=/tmp/ovs-offline-dbg/var-run/ovs/ovs-vswitchd.8.ctl [...]
* ovs ovsdb-server socket found at /tmp/ovs-offline-dbg/var-run/ovs/ovs.sock
You can run commands such as:
ovs-vsctl --db unix:/tmp/ovs-offline-dbg/var-run/ovs/ovs.sock [...]
or
ovsdb-client /tmp/ovs-offline-dbg/var-run/ovs/ovs.sock [...]
* ovn_nb ovsdb-server socket found at /tmp/ovs-offline-dbg/var-run/ovn_nb/ovn_nb.sock
You can run commands such as:
ovn-nbctl --db unix:/tmp/ovs-offline-dbg/var-run/ovn_nb/ovn_nb.sock [...]
or
ovsdb-client /tmp/ovs-offline-dbg/var-run/ovn_nb/ovn_nb.sock [...]
* ovn_sb ovsdb-server socket found at /tmp/ovs-offline-dbg/var-run/ovn_sb/ovn_sb.sock
You can run commands such as:
ovn-sbctl --db unix:/tmp/ovs-offline-dbg/var-run/ovn_sb/ovn_sb.sock [...]
or
ovsdb-client /tmp/ovs-offline-dbg/var-run/ovn_sb/ovn_sb.sock [...]
* openflow bridge management sockets found at /tmp/ovs-offline-dbg/var-run/ovs/breth0.mgmt
/tmp/ovs-offline-dbg/var-run/ovs/br-int.mgmt
You can run ofproto commands such as:
ovs-ofctl [...] /tmp/ovs-offline-dbg/var-run/ovs/breth0.mgmt
ovs-ofctl [...] /tmp/ovs-offline-dbg/var-run/ovs/br-int.mgmt
Currently there are an issue preventing us from really doing OVN troubleshooting with this tool: We can't run multiple ovsdb-server instances at the same time
This PR adds support for multiple ovsdb-servers, adds collect-db-ovn-{nb,sb} to the commandline and prints OVN hint commands nicely.
Also, it collects the OVN database from a running k8s cluster. As a result, after collecting k8s data:
You can even run ovn-detrace as:
Also, it collects OVN databases from SOS reports.
Fixes: #33