Skip to content

openvdc log fails on instances with FAILED state #185

@Metallion

Description

@Metallion

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions