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

463/hotfix/exception on aws network error #464

Merged
merged 5 commits into from
Oct 13, 2019

Conversation

ShayNehmad
Copy link
Contributor

@ShayNehmad ShayNehmad commented Oct 13, 2019

Feature / Fixes

Fixes #463 .

  • 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
    I've added the line raise Exception('F') to the AwsInstance class to simulate an unknown error.

2019-10-13 11:05:14,516 - environment.py:46 -   <module>() - INFO - Monkey's env is: StandardEnvironment
2019-10-13 11:05:15,276 - report_generation_synchronisation.py:9 -   <module>() - DEBUG - Initializing report generation locks.
2019-10-13 11:05:16,380 - main.py:85 - assert_mongo_db_version() - INFO - Mongo DB version OK. Got (u'4', u'1', u'0-158-g3d62f3cd37')
2019-10-13 11:05:23,743 - remote_run_aws.py:38 - try_init_aws_instance() - ERROR - Failed init aws instance. Exception info: 
Traceback (most recent call last):
  File "C:\Users\shay.nehmad\PycharmProjects\monkey\monkey\monkey_island\cc\services\remote_run_aws.py", line 36, in try_init_aws_instance
    RemoteRunAwsService.aws_instance = AwsInstance()
  File "C:\Users\shay.nehmad\PycharmProjects\monkey\monkey\common\cloud\aws_instance.py", line 23, in __init__
    raise Exception("F")
Exception: F
2019-10-13 11:05:36,701 - exporter_init.py:26 - try_add_aws_exporter_to_manager() - ERROR - Failed adding aws exporter to manager. Exception info:
Traceback (most recent call last):
  File "C:\Users\shay.nehmad\PycharmProjects\monkey\monkey\monkey_island\cc\services\reporting\exporter_init.py", line 23, in try_add_aws_exporter_to_manager
    if RemoteRunAwsService.is_running_on_aws() and ('aws' == env.get_deployment()):
  File "C:\Users\shay.nehmad\PycharmProjects\monkey\monkey\monkey_island\cc\services\remote_run_aws.py", line 58, in is_running_on_aws
    return RemoteRunAwsService.aws_instance.is_aws_instance()
AttributeError: 'NoneType' object has no attribute 'is_aws_instance'
2019-10-13 11:06:02,450 - remote_run_aws.py:38 - try_init_aws_instance() - ERROR - Failed init aws instance. Exception info: 
Traceback (most recent call last):
  File "C:\Users\shay.nehmad\PycharmProjects\monkey\monkey\monkey_island\cc\services\remote_run_aws.py", line 36, in try_init_aws_instance
    RemoteRunAwsService.aws_instance = AwsInstance()
  File "C:\Users\shay.nehmad\PycharmProjects\monkey\monkey\common\cloud\aws_instance.py", line 23, in __init__
    raise Exception("F")
Exception: F
2019-10-13 11:06:08,950 - main.py:60 - log_init_info() - INFO - Monkey Island Server is running. Listening on the following URLs: https://10.28.0.111:5000, https://10.0.0.212:5000, https://172.17.218.17:5000
[...]

Changes

  • Added exception suppression to all usages of AwsInstance except places where specifically not required (which were documented).

@ShayNehmad ShayNehmad added Bug An error, flaw, misbehavior or failure in the Monkey or Monkey Island. Monkey labels Oct 13, 2019
@ShayNehmad ShayNehmad self-assigned this Oct 13, 2019
@ShayNehmad ShayNehmad merged commit f4b2874 into develop Oct 13, 2019
@ShayNehmad ShayNehmad deleted the 463/hotfix/exception-on-aws-network-error branch October 13, 2019 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug An error, flaw, misbehavior or failure in the Monkey or Monkey Island.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception when initializing AWS exporter
2 participants