Git Product home page Git Product logo

marathon_zoocleaner's Introduction

marathon_zoocleaner

Find lost Marathon tasks and remove them from Zookeeper

Warning!

This script was written to solve a particular problem I had with a Mesos host disappearing and Marathon showing 'ghost' tasks in the WebUI (and refusing to scale applications because the number of running apps was satisfied by these ghosts).

I have not tested all edge cases where this script could potentially eat your ZK cluster. It's fairly safe, but still, be sure you have a backup, or you're brave.

Installation

pip install -r requirements.txt will install the basic requirements.

It's recommended to run this in a virtualenv, since the mesos protobuf files might conflict if you have mesos installed in site-packages on your host.

Usage

./zoocleaner.py --help
Usage: zoocleaner.py [OPTIONS]

  Search a given Zookeeper Ensemble where Mesosphere's Marathon is running
  for tasks that have become zombies due to a slave being abruptly removed.

  Once the search is complete, ZooCleaner will prompt you (yes/no) if you'd
  like to delete the zombie tasks from Zookeeper. You will need to force a
  leader election in Marathon once this is complete to allow the fix to
  work.

Options:
  --zk TEXT      Zookeeper host:port list
  --chroot TEXT  Zookeeper chroot path (default /marathon)
  --debug        Enable debug logging
  --help         Show this message and exit.

Bugs?

Yep, I'm sure there's a bug or two. Feel free to open an issue or a pull request :)

marathon_zoocleaner's People

Contributors

thecubed avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.