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

(10.1.0) INFRASYS-6186 - Adding IP address method to enchance logging #11

Merged
merged 1 commit into from
Oct 29, 2015

Conversation

adamjkeller
Copy link
Contributor

No description provided.

@adamjkeller
Copy link
Contributor Author

Running the code:

akeller@akeller-MBPR License2Deploy (INFRASYS-6186 *+):$ python rolling_deploy.py -e stg -p dnbi-cirrus -b 13 -P dnbi-deploy -a ami-bf0879d5
2015-10-27 21:03:59,014: INFO: Begin Logging...
2015-10-27 21:04:01,296: INFO: AMI ami-bf0879d5 is ready
2015-10-27 21:04:01,296: INFO: Build #: 13 ::: Autoscale Group: dnbi-backend-stg-dnbicirrusASGstg-1WMYPAJF123E4
2015-10-27 21:04:01,457: INFO: Current desired count was changed from 2 to 4
2015-10-27 21:04:01,457: INFO: Set autoscale capacity for dnbi-backend-stg-dnbicirrusASGstg-1WMYPAJF123E4 to 4
2015-10-27 21:04:01,637: INFO: Sleeping for 240 seconds to allow for instances to spin up
2015-10-27 21:08:02,885: INFO: List of all Instance ID's and IP addresses in dnbi-backend-stg-dnbicirrusASGstg-1WMYPAJF123E4: {u'i-a7a69a73': u'10.32.10.192', u'i-a8a69a7c': u'10.32.10.191', u'i-cd91af19': u'10.32.10.65', u'i-cc91af18': u'10.32.10.66'}
2015-10-27 21:08:04,244: INFO: New Instance List with IP Addresses: {u'i-a7a69a73': u'10.32.10.192', u'i-a8a69a7c': u'10.32.10.191', u'i-cd91af19': u'10.32.10.65', u'i-cc91af18': u'10.32.10.66'}
2015-10-27 21:08:04,478: INFO: i-a8a69a7c is in a healthy state. Moving on...
2015-10-27 21:08:04,697: INFO: i-a7a69a73 is in a healthy state. Moving on...
2015-10-27 21:08:04,961: WARNING: i-cc91af18 is not in a fully working state yet
2015-10-27 21:08:35,156: WARNING: i-cc91af18 is not in a fully working state yet
2015-10-27 21:09:05,354: INFO: i-cc91af18 is in a healthy state. Moving on...
2015-10-27 21:09:06,703: INFO: i-cd91af19 is in a healthy state. Moving on...
2015-10-27 21:09:07,990: INFO: ELB healthcheck OK == i-a7a69a73: InService
2015-10-27 21:09:08,106: INFO: ELB healthcheck OK == i-a8a69a7c: InService
2015-10-27 21:09:08,242: WARNING: Load balancer healthcheck is returning OutOfService for i-cc91af18. Retrying after 10 seconds. Count == 0
2015-10-27 21:09:38,356: WARNING: Load balancer healthcheck is returning OutOfService for i-cc91af18. Retrying after 10 seconds. Count == 1
2015-10-27 21:10:08,481: WARNING: Load balancer healthcheck is returning OutOfService for i-cc91af18. Retrying after 10 seconds. Count == 2
2015-10-27 21:10:38,630: INFO: ELB healthcheck OK == i-cc91af18: InService
2015-10-27 21:10:38,762: INFO: ELB healthcheck OK == i-cd91af19: InService
2015-10-27 21:10:39,302: INFO: Current desired count was changed from 4 to 2
2015-10-27 21:10:39,303: INFO: Set autoscale capacity for dnbi-backend-stg-dnbicirrusASGstg-1WMYPAJF123E4 to 2
2015-10-27 21:11:41,840: INFO: Deployed instances [InstanceState:(i-cc91af18,InService), InstanceState:(i-cd91af19,InService)] to ELB: dnbicirrusELBstg
2015-10-27 21:11:42,072: INFO: No tagging necessary, already tagged with env: stg
2015-10-27 21:11:42,072: INFO: Deployment Complete!

Unit tests:

akeller@akeller-MBPR License2Deploy (INFRASYS-6186):$ coverage run --source License2Deploy setup.py test
running test
running egg_info
writing requirements to License2Deploy.egg-info/requires.txt
writing License2Deploy.egg-info/PKG-INFO
writing top-level names to License2Deploy.egg-info/top_level.txt
writing dependency_links to License2Deploy.egg-info/dependency_links.txt
reading manifest file 'License2Deploy.egg-info/SOURCES.txt'
writing manifest file 'License2Deploy.egg-info/SOURCES.txt'
running build_ext
test_calculate_autoscale_desired_instance_count (tests.rolling_deploy_test.RollingDeployTest) ... ok
test_calculate_autoscale_desired_instance_count_failure (tests.rolling_deploy_test.RollingDeployTest) ... ERROR:root:Please make sure the desired_state is set to either increase or decrease: local variable 'new_count' referenced before assignment
ok
test_confirm_lb_has_only_new_instances (tests.rolling_deploy_test.RollingDeployTest) ... ok
test_decrease_autoscale_instance_count (tests.rolling_deploy_test.RollingDeployTest) ... ok
test_double_autoscale_instance_count (tests.rolling_deploy_test.RollingDeployTest) ... ok
test_failure_get_group_info (tests.rolling_deploy_test.RollingDeployTest) ... ERROR:root:Unable to pull down autoscale group: Bad Group: cool
ok
test_get_all_instance_ids (tests.rolling_deploy_test.RollingDeployTest) ... ok
test_get_autoscale_group_name (tests.rolling_deploy_test.RollingDeployTest) ... ok
test_get_group_info (tests.rolling_deploy_test.RollingDeployTest) ... ok
test_get_instance_ids_by_requested_build_tag (tests.rolling_deploy_test.RollingDeployTest) ... ok
test_get_instance_ids_by_requested_build_tag_failure (tests.rolling_deploy_test.RollingDeployTest) ... ERROR:root:New Instance List is empty, something went wrong
ok
test_get_instance_ip_addrs (tests.rolling_deploy_test.RollingDeployTest) ... ERROR:root:Unable to get IP Addresses for instances: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
  <Response>
    <Errors>
      <Error>
        <Code>InvalidInstanceID.NotFound</Code>
        <Message>The instance ID 'blah' does not exist</Message>

      </Error>
    </Errors>
  <RequestID>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</RequestID>
</Response>
ok
test_get_lb (tests.rolling_deploy_test.RollingDeployTest) ... ok
test_get_lb_failure (tests.rolling_deploy_test.RollingDeployTest) ... ERROR:root:Unable to connect to region, please investigate: Profile "server-deploy" not found!
ERROR:root:Unable to connect to region, please investigate: Profile "server-deploy" not found!
ERROR:root:Unable to connect to region, please investigate: Profile "server-deploy" not found!
ERROR:root:Unable to pull down ELB info: 'NoneType' object has no attribute 'get_all_load_balancers'
ok
test_lb_healthcheck (tests.rolling_deploy_test.RollingDeployTest) ... ok
test_load_config (tests.rolling_deploy_test.RollingDeployTest) ... WARNING:root:Unable to get region info. Environment requested: get-shwifty. Regions available: ['us-east-1', 'cn-north-1', 'ap-northeast-1', 'eu-west-1', 'ap-southeast-1', 'ap-southeast-2', 'us-west-2', 'us-gov-west-1', 'us-west-1', 'eu-central-1', 'sa-east-1']. Returning the default region of us-west-1
ok
test_set_autoscale_instance_desired_count (tests.rolling_deploy_test.RollingDeployTest) ... ok
test_set_autoscale_instance_desired_count_failure (tests.rolling_deploy_test.RollingDeployTest) ... ERROR:root:Unable to update desired count, please investigate error: BotoServerError: 403 Forbidden
<ErrorResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/">
  <Error>
    <Type>Sender</Type>
    <Code>InvalidClientTokenId</Code>
    <Message>The security token included in the request is invalid.</Message>
  </Error>
  <RequestId>5b13f049-7dc9-11e5-8628-d7064d654abb</RequestId>
</ErrorResponse>

ok
test_tag_ami (tests.rolling_deploy_test.RollingDeployTest) ... ERROR:root:Unable to tag ID, please investigate: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
  <Response>
    <Errors>
      <Error>
        <Code>InvalidAMIID.Malformed</Code>
        <Message>Invalid id: "blargness" (expecting "ami-...")</Message>

      </Error>
    </Errors>
  <RequestID>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</RequestID>
</Response>
ok
test_wait_ami_availability (tests.rolling_deploy_test.RollingDeployTest) ... ERROR:root:Unable to get ami-id, please investigate: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
  <Response>
    <Errors>
      <Error>
        <Code>InvalidAMIID.Malformed</Code>
        <Message>Invalid id: "bad-id" (expecting "ami-...")</Message>

      </Error>
    </Errors>
  <RequestID>7a62c49f-347e-4fc4-9331-6e8eEXAMPLE</RequestID>
</Response>
ERROR:root:AMI ami-54c77999 is not ready after 1446067951.83 minutes, please investigate
ok
test_wait_for_new_instances (tests.rolling_deploy_test.RollingDeployTest) ... ok
test_wait_for_new_instances_failure (tests.rolling_deploy_test.RollingDeployTest) ... WARNING:root:i-f707a5ed is not in a fully working state yet
WARNING:root:i-f707a5ed is not in a fully working state yet
WARNING:root:i-f707a5ed is not in a fully working state yet
WARNING:root:i-f707a5ed is not in a fully working state yet
ERROR:root:i-f707a5ed has not reached a valid healthy state
ok

----------------------------------------------------------------------
Ran 22 tests in 6.748s

OK
akeller@akeller-MBPR License2Deploy (INFRASYS-6186):$ coverage report -m
Name                            Stmts   Miss  Cover   Missing
-------------------------------------------------------------
License2Deploy/AWSConn             36      0   100%
License2Deploy/__init__             0      0   100%
License2Deploy/rolling_deploy     168     11    93%   46-47, 169-175, 187-188
License2Deploy/set_logging          4      0   100%
-------------------------------------------------------------
TOTAL                             208     11    95%

@adamjkeller adamjkeller changed the title INFRASYS-6186 - Adding IP address method to enchance logging (WIP) INFRASYS-6186 - Adding IP address method to enchance logging Oct 28, 2015
@adamjkeller adamjkeller force-pushed the INFRASYS-6186 branch 3 times, most recently from acb9ec7 to 6c62a41 Compare October 28, 2015 22:42
@adamjkeller adamjkeller changed the title (WIP) INFRASYS-6186 - Adding IP address method to enchance logging (10.1.0) INFRASYS-6186 - Adding IP address method to enchance logging Oct 28, 2015
@mjgorman
Copy link

+1

1 similar comment
@sbraverman
Copy link
Contributor

+1

adamjkeller added a commit that referenced this pull request Oct 29, 2015
(10.1.0) INFRASYS-6186 - Adding IP address method to enchance logging
@adamjkeller adamjkeller merged commit 2512697 into dandb:master Oct 29, 2015
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.

3 participants