Improve channel reporting to list disabled ones if requested
Current situation
The /channels
endpoint only lists known usable channels. SSH channels may have an
invalid specification, but, except by checking the orchestrator logs, there is no way
to identify them.
Also, unreachable agents are listed, with no way to know they are in fact unreachable.
Desired outcome
A way to list those disabled channels.
The channel manifest status.phase
is extended to include a new UNREACHABLE
value:
{
"apiVersion": "opentestfactory.org/v1alpha1",
"kind": "Channel",
"metadata": {
"name": string,
"namespaces": string,
"channelhandler_id": uuid
},
"spec": {
"tags": [string, ...]
},
"status": {
"lastCommunicationTimestamp": timestamp,
"phase": IDLE or BUSY or PENDING or UNREACHABLE,
"currentJobID": uuid or null
}
}
IDLE
means the channel is available for jobs. BUSY
means the channel is currently processing a job (in which case currentJobID
is the UUID of the job). PENDING
means the channel has been offered for a job, but has not been selected (yet). UNREACHABLE
means the channel is not assigned to a job but is not available: the orchestrator hasn't been able to communicate with it recently.