Repository: mantl/mantl

Issue:
Handlers aren't defined when running addons
The `reload consul` handler is defined in `roles/handlers`, but might be undefined when running an addon. 

```
TASK: [distributive | de-register deprecated distributive tests with consul] ***
changed: [resching-aws-control-02] => (item=chronos)
changed: [resching-aws-control-01] => (item=chronos)
changed: [resching-aws-control-03] => (item=chronos)
ok: [resching-aws-control-02] => (item=chronos)
ok: [resching-aws-control-03] => (item=chronos)
ok: [resching-aws-control-01] => (item=chronos)
ERROR: change handler (reload consul) is not defined
```

Two ideas:
1. Add `handlers` role as a dependency to those that use it
2. Add `reload consul` as a handler explicitly to each role that uses it. 

Either of these should be applied to every role that uses anything from `roles/handlers`. 
- Git commit hash or branch:  7b076b9
- Cloud Environment: any

use zookeepercli package from a different location
Currently, we install the zookeepercli package from the github releases page. Because of this, builds were broken during the github outage last night. Not that it is impossible for bintray to have an outage, but we should consolidate the number of remote dependencies.



Discussion:
would another option be to add the handler to the distributive role? that's the dependency that is triggering that handler as far as I could tell

@ryane I think that's what I mean by (2), unless I'm misunderstanding you. 

This problem might be resolved by the following PR if mantl moves to ansible 2.0
https://github.com/ansible/proposals/pull/4

@siddharthist I think we're on the same page. in the case of logstash and chronos, at least, the `reload consul` handler is only notified because of the dependency on the distributive role. So, I was just thinking that we would only need to add the handler to the distributive role itself rather than the logstash or chronos roles (even though I did the opposite in https://github.com/CiscoCloud/mantl/pull/1342/files#diff-3edf8ebe9114681cdb3b6d272a142380R33 before I fully understood what the problem was)

I agree with this. It would clean up a lot of the roles if we just added our bintray yum repo, then we could install many of these packages on boot. 


Resolving patch:
diff --git a/docker.py b/docker.py
--- a/docker.py
+++ b/docker.py
@@ -125,9 +125,8 @@ def ci_build():
     link_ci_terraform_file()
 
     # Take different action for PRs from forks
-    if not os.environ['TRAVIS_REPO_SLUG'].startswith('CiscoCloud/'):
-        logging.warning("Because we can't unlock deploy keys for forks of the main project, we are going to make some prelim checks, then get back to you!")
-        logging.critical("Fork checks have not been implemented.")
+    if os.environ['MANTL_CI_FORK_CHECK'] == "1":
+        logging.warning("Currently, we can't unlock deploy keys for forks of Mantl, so we are skipping the build")
         exit(0)
 
     # Filter out commits that are documentation changes.


Test patch:
diff --git a/testing/healthchecks.py b/testing/healthchecks.py
--- a/testing/healthchecks.py
+++ b/testing/healthchecks.py
@@ -94,7 +94,7 @@ def cluster_health_check(ip_addresses):
 
 if __name__ == "__main__":
     print("Waiting for cluster to finalize init before starting health checks")
-    sleep(60*2)  # two minutes
+    sleep(60*5)  # five minutes
 
     # Get IP addresses of hosts from a dynamic inventory script
     cmd = ["python2", "plugins/inventory/terraform.py", "--list"]