ray/dashboard
Matti Picus 02f220b755
use an agent-id rather than the process PID (#24968)
When using ray inside a virtualenv on windows, python.exe as reported by sys.executable is a PEP397 launcher to the actual python as reported by os.getpid():

>>> import sys, os, psutil
>>> >>> print(sys.executable)
C:\temp\issue24361\Scripts\python.exe
>>> os.getpid()
2208
>>> child = psutil.Process(2208)
>>> child.cmdline()
['C:\\oss\\CPython38\\python.exe']
>>> child.parent().cmdline()
['C:\\temp\\issue24361\\Scripts\\python.exe']
>>> child.parent().pid
6424
When the agent_manager launches the agent process via Process::Process(), it gets the PID of the launcher process (6424), which is what is expected as an ID when registering the agent in the gRPC callback. But inside agent.py, the child process reports the PID via os.getpid(), which is 2208, and this is the wrong PID to register the agent.

The solution proposed here is another version of #24905 that creates a int agent_id = rand(); before starting the python process, and passes the agent_id to the process.
2022-05-26 22:10:35 -07:00
..
client [Dashboard] avoid showing disk info when it is unavailable (#24992) 2022-05-24 17:13:47 -07:00
modules Support file:// for runtime_env working directories in jobs (#25062) 2022-05-24 16:17:18 -07:00
tests Revert "[core] Resubscribe GCS in python when GCS restarts. (#24887)" (#25168) 2022-05-24 18:13:40 -07:00
__init__.py [Dashboard] New dashboard skeleton (#9099) 2020-07-27 11:34:47 +08:00
agent.py use an agent-id rather than the process PID (#24968) 2022-05-26 22:10:35 -07:00
BUILD [job submission] Allow passing job_id, return DOES_NOT_EXIST when applicable (#20164) 2021-11-08 23:10:27 -08:00
consts.py [runtime env] URI reference refactor (#22828) 2022-03-21 11:21:15 -05:00
dashboard.py GcsPublisher is being constructed with unsupported position argument 2022-04-14 10:47:57 -07:00
datacenter.py [Dashboard] fix iterating over GPU processes (#23562) 2022-03-31 17:16:53 -07:00
head.py [Core] Allow accepting gRPC HTTP proxy via env variable (#23526) 2022-05-10 11:30:46 +08:00
http_server_agent.py [CI] Format Python code with Black (#21975) 2022-01-29 18:41:57 -08:00
http_server_head.py [Dashboard] Enable dashboard in the minimal ray installation (#21896) 2022-01-31 22:34:40 -08:00
k8s_utils.py [dashboard][kubernetes] Dashboard CPU and memory adjustments. (#21688) 2022-03-01 17:15:59 -08:00
memory_utils.py [core] Add task and object reconstruction status to ray memory (#22317) 2022-02-22 21:26:21 -08:00
optional_deps.py [Dashboard] Agent in minimal ray installation (#21817) 2022-01-26 04:03:54 -08:00
optional_utils.py [serve] Remove dashboard's dependency on Serve (#23389) 2022-03-21 22:14:41 -07:00
state_aggregator.py [State Observability API] Error handling (#24413) 2022-05-24 03:56:49 -07:00
utils.py [dashboard] Remove redis in dashboard (#22788) 2022-03-04 12:32:17 -08:00