#9307 Python: avoid assigning same port number to multiple grpc sessions

* Python: avoid assigning same port number to multiple grpc sessions
* Add retry count when checking for port number file
* Use grpc to find and use port number
* Add test used to start several instances of resinsight at the same time
Testing up to 50 instances works well

* Python: allow launch_port == 0 to assign port by GRPC in Instance.launch().
Also allow longer wait before failing the port number file reading:
it can take some time to launch when launching lots of instances at
the same time.
This commit is contained in:
Kristian Bendiksen
2022-09-27 11:56:30 +02:00
committed by Magne Sjaastad
parent dba447e3b8
commit 9d0fa408e2
7 changed files with 165 additions and 36 deletions
@@ -76,6 +76,11 @@ bool RiaArgumentParser::parseArguments( cvf::ProgramOptions* progOpt )
"[<portnumber>]",
"Launch as a GRPC server. Default port is 50051",
cvf::ProgramOptions::SINGLE_VALUE );
progOpt->registerOption( "portnumberfile",
"[<filename>]",
"Write the port number to this file.",
cvf::ProgramOptions::SINGLE_VALUE );
progOpt->registerOption( "startdir", "<folder>", "Set startup directory.\n", cvf::ProgramOptions::SINGLE_VALUE );
progOpt->registerOption( "summaryplot",