-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Problem
When we have an instance with state FAILED
.
> ./openvdc show i-0000000005
{
"ID": "i-0000000005",
"instance": {
...
"last_state": {
"state": "FAILED",
"created_at": "2017-07-05T09:08:41.181030773Z"
},
...
}
We are no longer able to access its log. This makes debugging very difficult.
> ./openvdc log i-0000000005
FATA[0000] Error streaming log error="rpc error: code = 2 desc = cl.GetLog: application could not be found"
Cause
When an instance reaches FAILED
state its mesos job is cleared. Mesos's log API no longer allows us to access it.
Solution
If there is no way to use the log API, rewrite the openvdc log <instance-id>
command to be able to fetch the mesos logs directly from the executor machines.