Closed alansartorio closed 1 year ago
My suggestion is to implement a temporary solution (like checking for empty strings, or ignoring the exit status of pw-link
) and have a fully working solution on 1.0.0 where we will not rely on pw-dump
I agree
While sharing, connect-and-monitor.sh process crashed. In the logs, I was able to see this:
This is most probably a race condition, because we do: ask for node info -> ask for a full
pw-dump
to get it's ports -> connect them.The node can (and probably did) get removed between any of those steps, and it will crash when it reaches
pw-link
, which returns error exit status when it can't connect. We either:pw-dump
since the beginning and then query that for getting node info and port ids. (kinda costly doing full pw-dump for every node)But then if we lose the node before linking the ports,
pw-link
fails and because we've setset -e
, the script will crash. So I think we should also ignorepw-link
exit status code (pw-link ... || true
) because we cant prevent this race condition.