Hi,
1) I understand the issues about installing rules at each switch, which can make the system use different paths when the cost is the same. Before going deeper into your multiple flow installations, a simple solution you might take to solve the criteria to always pick the same path is to always take the same path based on the same criteria. For instance, with S7-2-1 and S7-3-1, you might decide to pick always the path that holds the set of switches with the "lowest" device id number. For instance, you can pick S7-2-1 because 2 is lower than 3, etc. If you have more hops like (imagine) S7-6-2-1 and S7-5-3-1, then you might see that at hop 2 (S6 compared to S5) the device id is lower of S5 compared to S6, so you pick the path S7-5-3-1. This criterion can still be an issue if you plan to load balance the traffic at some point.
Unless I am mistaken, your main problem is that "rules are installed twice" as you said, is that correct? I don't understand though why only twice and not maybe 10 or 100 times. Imagine you get the same packet every 1 ms in the controller because of PacketIn from a switch, and every time you process it you try to install the same rules of course. Unless ONOS detects that you already tried the same flow installations then you install the same rule every millisecond. To solve this you need to wait (imagine) 30 ms until you detect that flows are installed. In this case, you will get 30 packets as PacketIn and you might try 30 flow installations. To detect that you already tried to install the same flow rule you might try to store the flow installation information in a shared variable (say a Map) and check the map before trying to install the rules. Then remove the information from the map when an async function of your program detects that it has been installed.
2) About the issue we talked about in
https://groups.google.com/u/2/a/onosproject.org/g/onos-dev/c/wjTHBI5WfBk, check if different versions of the controller present the same issues. Make sure GUI2 is running and check if the problems are the same. As we talked use different browsers and see if any of them has issues checking the console. Unfortunately, that is as far as I can go. I am not totally sure what is wrong, or which is the main issue. I can still try to contact on that thread later on if you ask any other question.
3) Finally, about monitoring networks, the question is what do you want to monitor? Some things can already be monitored using the ONOS Web GUI (port utilization, device up/down, etc.). You can also use the REST API from ONOS like checking flows from devices, check if a device is up or down, etc. You might be able to use this information in tools like Grafana or Prometheus.
Cheers,