Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

marathonctl logs #1

Open
ashwanthkumar opened this issue Feb 5, 2016 · 0 comments
Open

marathonctl logs #1

ashwanthkumar opened this issue Feb 5, 2016 · 0 comments

Comments

@ashwanthkumar
Copy link
Owner

This issue contains my thoughts on how it must be implemented.

Usage

$ marathonctl logs -h
Tail the logs of an application deployed via Marathon.

Usage:
  marathonctl logs <app-id> [flags]

Flags:
  -o, --stdout       Tail the stdout file from the current executor directory
  -e, --stderr        Tail the stderr file from the current executor directory
  -l, --log string    Log file with relative to the current executor directory. (Default: stdout)

Implementation

  1. Query the Marthon's /apps/<app-name> endpoint to get the list of active tasks for the app.
  2. Build a unique list of host from the list of tasks
  3. Query each of the mesos-slave host's /slave(1)/state.json to get the corresponding current working directory for each of the task.
  4. Now use that along with the log file name on the /files/read.json?path=$CWD/$LOG_FILE.log on mesos slaves to tail the logs.

We might want to fan out the 4th operation into goroutines on a 1 sec ticket.

Questions

  • How do we detect a failed / killed / finished task and remove them from the list of goroutines.
  • Can mesos slaves handle so much load while tailing logs for a huge number of instances?
@ashwanthkumar ashwanthkumar changed the title marathonctl logs for non docker marathonctl logs Feb 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant