[DONE] Feature/210 monkey mia timeout#313
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 |
itaymmguardicore left a comment
There was a problem hiding this comment.
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
itaymmguardicore left a comment
There was a problem hiding this comment.
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
modelsdirectory, started using mongoengine