-
Notifications
You must be signed in to change notification settings - Fork 807
[DONE] Feature/210 monkey mia timeout #313
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
Conversation
…d added TTL field TTL doesn't get expired for some reason, trying to solve in https://stackoverflow.com/questions/55994379/mongodb-ttl-index-doesnt-delete-expired-documents
… for Monkey.is_dead The init of models checks the env and sets up the DB connection.
Useful in many cases in the code. Also added unittest for this method which passed.
Only for is_dead calls
should have been utcnow(). see https://stackoverflow.com/questions/55994379/mongodb-ttl-index-doesnt-delete-expired-documents Feature was tested locally and works!
Even though all monkeys have finished, the report page still used the dead=False check instead of is_dead. So even though all monkeys were dead or MIA the report page said that some monkeys are still runnning.
It would be perfect if we could update monkey's TTL each time it communicates to the server. For that you could write a custom decorator, that gets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed bugless oriented. However still need to fix minor stuff
Fixed type Co-Authored-By: Itay Mizeretz <30774653+itaymmguardicore@users.noreply.github.com>
CR comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved pending this passes sanity after all latest changes
Sanity passed ✔️ |
You're correct, that would be a great improvement. However I believe it's not a blocker. Adding to tasklist for future, hopefully I'll get to it soon ⏲ |
Feature / Fixes
#210
Have you added an explanation of what your changes do and why you'd like to include them?
Have you successfully tested your changes locally?
Example screenshot/log transcript of the feature working
Run monkey on a victim machine, looks alive on map:

TTL is created in DB:

Kill monkey (sorry little guy, it's for the cause 😢)

Wait a bit, TTL is deleted automatically by mongodb TTL index:

looks dead on map:

Changes
models
directory, started using mongoengine