Get desktop application:
View/edit binary Protocol Buffers messages
* Internal host service interface to be used by JobManager and PlacementEngine for task, reservation, volume and offer operations TODO: figure out a better name for InternalHostService
* Acquire a set of host offers from the host manager. Each host offer will only be used by one client at a given time.
The list of host offers that have been returned
key: HostFilterResult's string form, value: count. used for debugging purpose.
* Get a list of hosts from the host manager which matches the request This is just the get operation and there is no lock placed on any host.
GetHostsRequest is the request which is been used to call the GetHosts call
HostFilter required for matching the desired hosts in cluster
GetHostsResponse is the reponse for GetHosts call it returns the list of hosts if matched or error
The list of host that have been matched the HostFilter
ReserveHosts reserves the host for a specified task in the request. Host Manager will keep the host offers to itself till the time it does not have enough offers to itself and once that's fulfilled it will return the reservation with the offer to placement engine. till the time reservation is fulfilled or reservation timeout , offers from that host will not be given to any other placement engine.
ReserveHostsRequest is the request for making reservation for the task
reservation object for the host reservation
ReserveHostsResponse is the response for the reservation request
Error message if reservation request failed
Host info which host is reserved
GetCompletedReservations gets the completed host reservations from reserver. Based on the reserver it returns the list of completed Reservations (hostsvc.CompletedReservation) or return the NoFound Error.
GetCompletedReservationRequest is the request for GetCompletedReservation
(message has no fields)
GetCompletedReservationResponse is the response for GetCompletedReservation
list of completed reservations
* Release unused host offers to the host manager.
Launch tasks on Mesos cluster
Kill tasks that are running on Mesos cluster
Kill tasks that are running on Mesos cluster, and reserve the host for new task placement. This is used for in-place update/restart.
Shutdown executors that running on a Mesos agent
Reserve resources on a host
TODO: Add errors that could fail a reserve resources request
(message has no fields)
Unreserve resources on a host
TODO: Add errors that could fail a unreserve resources request
(message has no fields)
Create volumes on a Mesos host
TODO: Add errors that could fail a create volumes request
(message has no fields)
Destroy volumes on a Mesos host
TODO: Add errors that could fail a destroy volumes request
(message has no fields)
TODO move out to separate service if scope widens ClusterCapacity fetches the allocated resources to the framework`
(message has no fields)
Resources allocated
Resources for total physical capacity.
Represents total usage slack alloacted.
Represents total slack resources at Cluster.
Performs batch offer operations.
Repeated Operations will be performed in sequential manner.
The host name of the host where the operations will be performed
The host offer id of the host where the operations will be performed
Return leading mesos masters host:port.
* Request for mesos master hostname and port. NOTE: required for protobuf RPC call.
(message has no fields)
* Response for leader mesos master hostname and port.
Return all the outstanding offers present in offer pool.
* Request to get all outstanding offers from offer pool.
(message has no fields)
* Responds all outstanding offers of offer pool.
Toggles the switch to disable the kill tasks
(message has no fields)
(message has no fields)
Return all the hosts with available resources matching the query, used in cli only.
* Request to get all the hosts with available resources matching the query, used in cli.
Resource limit, currently only cpu and gpu count are used. The field is ignore if the value is 0.
Set to true if wants to return hosts with resources less than provided in the "resource" field, otherwise returns hosts with resources greater than and equal to the resources provided.
Match the agent hostnames if provided.
Set to true if the resource config provided includes revocable resources when applicable, default to false
* Responds all the hosts with available resources matching the query, used in cli.
Return all the outstanding status update events present in the event stream.
* Responds to all pending status update events.
Unique identifier for the watch session
Return all the host summary event updates from the host manage
* Responds to all host summary update events.
Unique identifier for the watch session
Cancel a watch. The watch stream will get an error indicating watch was cancelled and the stream will be closed.
CancelRequest is request for method WatchService.Cancel
ID of the watch session to cancel.
CancelRequest is response for method WatchService.Cancel Return errors: NOT_FOUND: Watch ID not found
(message has no fields)
Get the hosts in DRAINING state. This method is called by Resource Manager to get hosts which are to be drained.
GetDrainingHostsRequest is the request message for InternalHostService.GetDrainingHosts
Max number of draining hosts to dequeue
Timeout in milliseconds if no hosts are draining
GetDrainingHostsResponse is the response message for InternalHostService.GetDrainingHosts
Hostnames of the hosts dequeued
Mark a host as drained. This method is called by Resource Manager to notify Host Manager the specified DRAINING host is cleared of all tasks.
MarkHostDrainedRequest is the request message for InternalHostService.MarkHostDrained
Hostname of the host to be marked as drained
MarkHostDrainedResponse is the response message for InternalHostService.MarkHostDrained
Hostname of the host successfully marked as drained
Return Mesos agent info
* Request for Mesos agent's information as reported by Mesos.
Hostname of the agent whose information is being requested. If not provided, information about all agents will be returned.
* Response containing Mesos agents' information.
Release the hosts which are held for the tasks provided
GetHostPoolCapacity fetches the resources for each host-pool.
* The request for GetHostPoolCapacity.
(message has no fields)
* The response for GetHostPoolCapacity. Errors: NOT_IMPLEMENTED if host-pools are not enabled.
Resources for each host-pool.
GetTasksByHostState gets the tasks on hosts in the specified state.
Request message for GetTasksByHostState.
Host state
Max number of tasks to dequeue.
Timeout in milliseconds if no tasks are ready.
Response message for GetTasksByHostState.
The mesos task IDs of the tasks.
* Error when AcquireHostOffers failed.
Used in:
Used in:
Used in:
* Error when cluster is Unavailable
Used in:
* CompleteReservation is the messege between placement engine and host manager host manager. hostmanager will reserve one host from and once reservation is fulfilled it will send the completed reservation to placement engine
Used in:
List of hosts which needs to be reserved
resmgr task for which we need to reserve
an offer which needs to be filled once reservation is fulfilled
* ExecutorOnAgent describes the executor to be shutdown by host manager including Mesos agent id and executor id.
Used in:
, ,* FilterHint includes hint provided to host manager to decide which hosts to return. The hint is provided as an optimization and host manager can ignore them if hint cannot be satisfied.
Used in:
Hint for ranking hosts
Hint for which host to return
Used in:
return the host if it satisfies constraints
indicates for which task the host is for
Ways in which to rank hosts to return
Used in:
Use system default ranking
Rank hosts randomly
Rank hosts with least available resources first
Rank hosts with load aware
Error message for GetCompletedReservationResponse
Used in:
No completed reservations found
Host information by aggregating a list of Mesos offers
Used in:
name of the host
list of mesos resources for the host
host status - ready, placing, reserved
list of tasks the host is held for, if the host is held for in-place update
list of tasks running on the host
* Error when GetHosts failed.
Used in:
Error for the response
Used in:
InvalidHostFilter if the filter is invalid
GetHostsFailure if any other error occurs during fetching the host map
Error message for GetMesosAgentInfo
Used in:
No information found for host
Used in:
HostAlreadyReserved error , when host is already reserved
Used in:
message for the failed reason
* HostFilter can be used to control whether offers from a given host should be returned to placement engine to use.
Used in:
, ,Resource constraint which must be satisfied.
Attribute based affinity/anti-affinity scheduling constraints, which is typically copied from original task scheduling constraint. Only constraint with kind == HOST will be considered.
Extra quantity control message which can be used to influence how many host offers are returned.
Provides hint to about which hosts should return, host manager may ignore the hint
* HostFilterResult describes result of filtering hosts.
Reserved in case new result is unrecognized.
Host is matched by filter and returned in HostOffer.
Host has enough total resources but offered resources is insufficient (signal for fragmentation).
Host is filtered out because of mismatched task -> host constraint.
Host has GPU so reserved for GPU only task.
Host is in mismatch status (i.e, another placement engine) has a hold of the host.
Host is filtered out because maxHosts limit is reached.
Host has no available offer to be matched. Usually this means the host is fully used already.
Host has insufficiant resources to match the GetHosts Request.
Host has scarce resources which are to be used by exclusive task (needing those resources).
* HostInfo describes physical capacity of the hosts with all their attributes defined
Used in:
, , ,name of the host
agentId is mesos defined agentID
List of mesos resources for the host
List of attributes defined for that host
HostNotFound is an error message for GetMesosAgentInfo
Used in:
Failure message.
* HostOffer describes the resources available on a host by aggregating a list of Mesos offers to avoid offer defragmentation issue.
Used in:
, ,* Resources of a host-pool.
Used in:
Name of the pool.
Resources for physical capacity.
Resources for slack capacity.
HostUnavailable error , when host is unavailable for reservation
Used in:
message for the failed reason
* Error for invalid argument.
Used in:
,Any LaunchableTask whose content is invalid.
* Error for invalid shutdown executors.
Used in:
* Error for invalid filter.
Used in:
,Invalid filter from input.
* Error for invalid offers.
Used in:
,* Error for invalid task ids.
Used in:
,Any LaunchableTask whose content is invalid.
Used in:
Used in:
* Error when actually tasks kill failed.
Used in:
,Used in:
* Error when actually tasks launch failed.
Used in:
Used in:
* LaunchableTask describes the task to be launched by host manager including Mesos task id and task config.
Used in:
, ,Dynamic ports reserved on the host while this instance is running. The key is port name, value is port number.
Persistent volume used to launch task.
Peloton task id of the task to be launched
* NoOffersError represents on outstanding offers are present.
Used in:
NotFound is error message for not valid completed reservation found
Used in:
message for the failed reason
Used in:
Type of the operation.
Reservation labels used for operations.
Used in:
Persistent volume to be created.
Used in:
Persistent volume ID to be destroyed.
Used in:
List of tasks to be launched.
Used in:
Mesos resources to be reserved.
Defines an operation that can be performed against offers.
Used in:
Used in:
The reservation label string to be unreserved.
Used in:
* Error for offer operations call to mesos failed.
Used in:
* QuantityControl includes input from placement engine to control how many host offers need to be returned.
Used in:
Optinoal maximum number of hosts to return. Default zero value is no-op.
Used in:
(message has no fields)
Used in:
* Reservation is the messege between placement engine and host manager where placement engine asks hostmanager to reserve one host from certain hosts In the return host manager reserves the host and once resources are fulfilled , it fills the messege with valid offers
Used in:
List of hosts which needs to be reserved
resmgr task for which we need to reserve
ReservationAlreadyExist error , when reservation already exist
Used in:
message for the failed reason
ReservationFailed is the failed reservation
Used in:
message for the failed reason
Used in:
Failed reservation for the request
Error when reservation already exist
Host is unavailable for the request
Host is already reserved
* Resource allocation for a resource
Used in:
,Type of the resource
capacity of the resource
* ResourceConstraint describes a condition for which aggregated resources from a host must meet in order for it to be returned in `AcquireHostOffers`.
Used in:
Minimum amount of resources NOTE: gpu resources are specially protected in the following way: - if `gpuLimit` is specified, only hosts with enough gpu resources are returned; - if `gpuLimit` is not specified, only hosts without gpu resource will be returned.
Number of dynamic ports
revocable adds a constraint to use revocable/non-revocable resources.
Used in:
* Error for failed shutdown executors.
Used in:
* Volume config used for offer create/launch operation.
Used in:
,ID of the persistent volume.
the relative volume path inside the container.
Resource needed for the volume.
* Request object to watch request by client
Used as request type in: InternalHostService.WatchEventStreamEvent, InternalHostService.WatchHostSummaryEvent