forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[serve] Add replica info to metadata rest api (ray-project#33292)
This adds details about the live replicas for each deployment to be fetched from the new GET endpoint. Sample replica detail from running a test application: ``` replica_id: app2_BasicDriver#KhlXQe state: RUNNING pid: 25853 actor_name: SERVE_REPLICA::app2_BasicDriver#KhlXQe actor_id: 2355af670b023966af79501501000000 node_id: 3631e75fc5312752c54b567ee66491a1e58a0420f0abc5b1c44e70cf node_ip: 192.168.0.141 start_time_s: 1678818083.039281 ``` Details: * `is_allocated` on each replica used to return just the node id for the controller to confirm the replica has been placed on a node and started. Now, it returns a tuple of runtime-context-related info: * `pid` * `actor_id` * `node_id` * `node_ip` * The four fields listed above that are retrieved from the replica actor may be `None` before the actor is actually scheduled, so they are marked optional in the schema. (The rest of the fields are filled in immediately when the replica is created to be tracked in the controller) ``` class ReplicaDetails(BaseModel, extra=Extra.forbid): replica_id: str state: ReplicaState pid: Optional[int] actor_name: str actor_id: Optional[str] node_id: Optional[str] node_ip: Optional[str] start_time_s: float ``` Signed-off-by: Edward Oakes <[email protected]>
- Loading branch information
Showing
9 changed files
with
121 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters