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

[DONE] Added assertion of mongo db version. #339

Merged
merged 2 commits into from
Jun 12, 2019

Conversation

ShayNehmad
Copy link
Contributor

@ShayNehmad ShayNehmad commented Jun 5, 2019

Also refactored a bit to make the main shorter.

Feature / Fixes

Changes/Fixes the following feature

Fixes #337

  • 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

Version is good

sudo+ssh://[email protected]:22/usr/bin/python -u /home/shay/monkey/monkey/monkey_island.py 2019-06-05 19:24:37,119 - environment.py:46 - <module>() - INFO - Monkey's env is: StandardEnvironment 2019-06-05 19:24:38,104 - main.py:60 - wait_for_mongo_db_server() - INFO - Waiting for MongoDB server on mongodb://localhost:27017/monkeyisland 2019-06-05 19:24:39,608 - main.py:60 - wait_for_mongo_db_server() - INFO - Waiting for MongoDB server on mongodb://localhost:27017/monkeyisland 2019-06-05 19:24:41,113 - main.py:60 - wait_for_mongo_db_server() - INFO - Waiting for MongoDB server on mongodb://localhost:27017/monkeyisland 2019-06-05 19:24:42,618 - main.py:60 - wait_for_mongo_db_server() - INFO - Waiting for MongoDB server on mongodb://localhost:27017/monkeyisland 2019-06-05 19:24:43,629 - main.py:77 - assert_mongo_db_version() - INFO - Mongo DB version OK. Got (u'4', u'0', u'8')

Version is bad (I upped the required version to 6.0.0)

sudo+ssh://[email protected]:22/usr/bin/python -u /home/shay/monkey/monkey/monkey_island.py 2019-06-05 19:27:31,436 - environment.py:46 - <module>() - INFO - Monkey's env is: StandardEnvironment 2019-06-05 19:27:31,917 - main.py:74 - assert_mongo_db_version() - ERROR - Mongo DB version too old. ('6', '0', '0') is required, but got (u'4', u'0', u'8') Process finished with exit code 255

Also refactoed a bit to make the main shorter.
@@ -6,6 +6,8 @@
import time
import logging

MINIMUM_MONGO_DB_VERSION_REQUIRED = "4.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 4? I thought we need 3.6

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what's the absolute minimum, but why not use 4.0.0? The current stable is 4.0.10 ( https://docs.mongodb.com/manual/release-notes/4.0/ ) , and 4.0.0 is months old by now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because Ubuntu 18.04 still provides only 3.6 and people may install that way.
https://launchpad.net/ubuntu/bionic/+source/mongodb

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔ That's a good reason

@ShayNehmad ShayNehmad changed the title Added assertion of mongo db version. [CR] Added assertion of mongo db version. Jun 5, 2019
@ShayNehmad ShayNehmad self-assigned this Jun 5, 2019
Because Ubuntu 18.04 still provides only 3.6 and people may install that way.
https://launchpad.net/ubuntu/bionic/+source/mongodb
@ShayNehmad ShayNehmad changed the title [CR] Added assertion of mongo db version. [DONE] Added assertion of mongo db version. Jun 12, 2019
@ShayNehmad ShayNehmad merged commit 4d184d5 into develop Jun 12, 2019
@ShayNehmad ShayNehmad deleted the feature/337-check-mongo-version branch June 12, 2019 15:29
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

Successfully merging this pull request may close these issues.

Island should validate mongodb version support before running
2 participants