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

Marathon: Provide command to clean empty groups #103

Open
andygrunwald opened this issue Nov 22, 2017 · 1 comment
Open

Marathon: Provide command to clean empty groups #103

andygrunwald opened this issue Nov 22, 2017 · 1 comment

Comments

@andygrunwald
Copy link
Contributor

When you deploy services on Marathon and kill them later, the namespace / group will stay.
If no app will be deployed in this group later on, this group will stay empty forever.

See

screen shot 2017-11-22 at 09 37 24

Current Behavior

After time your Marathon instance will have several empty groups in the UI / API.

Possible Solution

Provide Framework (Marathon / Chronos) specific commands.
For this request it would be the /v2/groups/{group_id}/ DELETE command descibed in https://mesosphere.github.io/marathon/api-console/index.html

So the descriptive workflow would be

  • Get all groups from the server
  • Check if they are empty
  • When they are empty, delete the group

Steps to Reproduce (for bugs)

  1. Deploy a service on Marathon with ID /foo/my-service
  2. Delete the service from marathon
  3. The empty group /foo will stay

Your Environment

  • Chapi version: master (Rev: c683314)
  • PHP version: v7.1.11
  • Operating System and version: Mac OSx
  • Mesos version: v1.1.0
  • Marathon version: v 1.4.1
  • Chronos version: -
@ppar
Copy link
Contributor

ppar commented Nov 22, 2017

This sounds like a result of how chapi creates the apps. In my experience with deploying directly against the Marathon API, when you use the POST /v2/apps endpoint, Marathon creates the necessary group(s) implicitly and automatically removes them when the job(s) are destroyed; I've never had to deal with the groups directly using this approach.

WIthout looking at the code, I'd guess chapi creates groups explicitly using /v2/groups so Marathon won't delete them automatically.

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

2 participants