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

RFE: way to track other network resources over time for automated cleanup #2

Open
yazug opened this issue Feb 26, 2016 · 2 comments
Open

Comments

@yazug
Copy link
Collaborator

yazug commented Feb 26, 2016

RFE: way to track other network resources over time to be able to identify unused resources for easy automated cleanup

If running this as part of an automated job sometimes just the network resources are leaked, sometimes just some of them are leaked. It would be nice to be able to catch this and be able to cleanup those resources as well, in an automated fashion.

@queria
Copy link
Contributor

queria commented Apr 25, 2016

I still have to go over current implementation of --unused, but flow i'm using for our group atm is:

  • all networks which do not have any VMs
    • their router/ports will be cleaned too
  • all routers which are not connected in networks

with same anti-racecondition check as floating ip's - try refine_count times with refine_delay time gap's (3x 60sec) ... while doing intersect of found resources ... to rule out possibly slowly running jobs (which created networks but not yet the vms etc)

with cleanup of old servers being done first, this ends up being precise enough to in the same step pick the net resources left after those servers, or any other left there by failing 'consumer' scripts (jobs etc)

if this would be of interest to you i would port the code and create pull requests (if it is not already there - as i did not read your code for this, in which case this issue's description should be improved?)

@yazug
Copy link
Collaborator Author

yazug commented Apr 26, 2016

Interested in details. Pull request welcome. I did get a --unused option
but didn't have time logic for it
On Apr 25, 2016 10:23 AM, "Queria Sa-Tas" [email protected] wrote:

I still have to go over current implementation of --unused, but flow i'm
using for our group atm is:

  • all networks which do not have any VMs
    • their router/ports will be cleaned too
  • all routers which are not connected in networks

with same anti-racecondition check as floating ip's - try refine_count
times with refine_delay time gap's (3x 60sec) ... while doing intersect
of found resources ... to rule out possibly slowly running jobs (which
created networks but not yet the vms etc)

with cleanup of old servers being done first, this ends up being precise
enough to in the same step pick the net resources left after those servers,
or any other left there by failing 'consumer' scripts (jobs etc)

if this would be of interest to you i would port the code and create pull
requests (if it is not already there - as i did not read your code for
this, in which case this issue's description should be improved?)


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#2 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants