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

[check_consul] add SSL support to Consul checks. #2034

Merged
merged 1 commit into from
Nov 19, 2015

Conversation

diogokiss
Copy link
Contributor

This PR is supposed to enable Consul check over SSL, when a client certificate or a specific trusted CA might be needed.

@diogokiss
Copy link
Contributor Author

All tests passed locally. How can I reproduce it so I can fix?

Travis: https://travis-ci.org/DataDog/dd-agent/builds/89007459

Local:

$ git remote -vv
origin  [email protected]:diogokiss/dd-agent.git (fetch)
origin  [email protected]:diogokiss/dd-agent.git (push)

$ git remote update
Fetching origin

$ git pull origin master
From github.com:diogokiss/dd-agent
 * branch            master     -> FETCH_HEAD
Already up-to-date.

$ git log -n1
ddd827b 2 hours ago [email protected] [check_consul] add SSL support to Consul checks.

$ rake ci:run
Assuming you are running these tests locally

[2015-11-03T15:48:22Z] >>>>>>>>>>>>>> BEFORE_INSTALL STAGE

mkdir -p /tmp/dd-agent-testing

[2015-11-03T15:48:22Z] >>>>>>>>>>>>>> INSTALL STAGE

pip install --upgrade pip setuptools
Requirement already up-to-date: pip in ./venv/lib/python2.7/site-packages
Requirement already up-to-date: setuptools in ./venv/lib/python2.7/site-packages/setuptools-18.5-py2.7.egg
pip install           -r requirements.txt           --cache-dir /Users/diogokiss/ts/repos/dd-agent/.cache/pip           2>&1 >> /tmp/dd-agent-testing/ci.log
pip install pycurl==7.19.5.1 --cache-dir /Users/diogokiss/ts/repos/dd-agent/.cache/pip 2>&1 >> /tmp/dd-agent-testing/ci.log             || echo 'Unable to install pycurl==7.19.5.1' 2>&1 >> /tmp/dd-agent-testing/ci.log
pip install psutil==2.1.1 --cache-dir /Users/diogokiss/ts/repos/dd-agent/.cache/pip 2>&1 >> /tmp/dd-agent-testing/ci.log             || echo 'Unable to install psutil==2.1.1' 2>&1 >> /tmp/dd-agent-testing/ci.log
pip install pysnmp-mibs==0.1.4 --cache-dir /Users/diogokiss/ts/repos/dd-agent/.cache/pip 2>&1 >> /tmp/dd-agent-testing/ci.log             || echo 'Unable to install pysnmp-mibs==0.1.4' 2>&1 >> /tmp/dd-agent-testing/ci.log
pip install pysnmp==4.2.5 --cache-dir /Users/diogokiss/ts/repos/dd-agent/.cache/pip 2>&1 >> /tmp/dd-agent-testing/ci.log             || echo 'Unable to install pysnmp==4.2.5' 2>&1 >> /tmp/dd-agent-testing/ci.log
pip install pymongo==2.8 --cache-dir /Users/diogokiss/ts/repos/dd-agent/.cache/pip 2>&1 >> /tmp/dd-agent-testing/ci.log             || echo 'Unable to install pymongo==2.8' 2>&1 >> /tmp/dd-agent-testing/ci.log
pip install kazoo==1.3.1 --cache-dir /Users/diogokiss/ts/repos/dd-agent/.cache/pip 2>&1 >> /tmp/dd-agent-testing/ci.log             || echo 'Unable to install kazoo==1.3.1' 2>&1 >> /tmp/dd-agent-testing/ci.log
pip install paramiko==1.15.2 --cache-dir /Users/diogokiss/ts/repos/dd-agent/.cache/pip 2>&1 >> /tmp/dd-agent-testing/ci.log             || echo 'Unable to install paramiko==1.15.2' 2>&1 >> /tmp/dd-agent-testing/ci.log
pip install psycopg2==2.6 --cache-dir /Users/diogokiss/ts/repos/dd-agent/.cache/pip 2>&1 >> /tmp/dd-agent-testing/ci.log             || echo 'Unable to install psycopg2==2.6' 2>&1 >> /tmp/dd-agent-testing/ci.log
pip install wmi==1.4.9 --cache-dir /Users/diogokiss/ts/repos/dd-agent/.cache/pip 2>&1 >> /tmp/dd-agent-testing/ci.log             || echo 'Unable to install wmi==1.4.9' 2>&1 >> /tmp/dd-agent-testing/ci.log
pip install           -r requirements-test.txt           --cache-dir /Users/diogokiss/ts/repos/dd-agent/.cache/pip            2>&1 >> /tmp/dd-agent-testing/ci.log

[2015-11-03T15:48:27Z] >>>>>>>>>>>>>> BEFORE_SCRIPT STAGE

cp /Users/diogokiss/ts/repos/dd-agent/ci/resources/datadog.conf.example           /Users/diogokiss/ts/repos/dd-agent/datadog.conf

[2015-11-03T15:48:27Z] >>>>>>>>>>>>>> SCRIPT STAGE

Untested checks (10/62)
-----------------------
btrfs
docker
gunicorn
hdfs
kafka_consumer
kyototycoon
marathon
mesos
ntp
vsphere

Mocked tests (20/62)
--------------------
agent_metrics
cacti
consul
couchbase
directory
iis
jenkins
kubernetes
mesos_master
mesos_slave
nagios
network
postfix
riakcs
sqlserver
system_core
system_swap
teamcity
windows_service
wmi_check
Running RuboCop...
Inspecting 41 files
.........................................

41 files inspected, no offenses detected
flake8
PATH="/Users/diogokiss/ts/repos/dd-agent/embedded/bin:/Users/diogokiss/ts/repos/dd-agent/venv/bin:/Users/diogokiss/.rvm/gems/ruby-2.2.3@dd-agent/bin:/Users/diogokiss/.rvm/gems/ruby-2.2.3@global/bin:/Users/diogokiss/.rvm/rubies/ruby-2.2.3/bin:/Users/diogokiss/.rvm/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin" nosetests -s -v -A "(not requires) and not windows" tests/core
tests.core.test_check_status.test_check_status_fail ... ok
tests.core.test_check_status.test_check_status_pass ... ok
tests.core.test_check_status.test_persistence ... ok
tests.core.test_check_status.test_persistence_fail ... ok
test_dupe_tags (tests.core.test_common.TestAggregator) ... ok
testEdgeCases (tests.core.test_common.TestCore) ... ok
Tests that the app tags are sent if specified so ... ok
test_collector (tests.core.test_common.TestCore) ... ok
test_counter (tests.core.test_common.TestCore) ... ok
test_gauge (tests.core.test_common.TestCore) ... ok
test_get_proxy (tests.core.test_common.TestCore) ... ok
test_min_collection_interval (tests.core.test_common.TestCore) ... ok
test_name (tests.core.test_common.TestCore) ... ok
Starting with Agent 5.0.0, there should always be a local forwarder ... ok
test_ntp_global_settings (tests.core.test_common.TestCore) ... ok
test_samples (tests.core.test_common.TestCore) ... ok
test_service_check (tests.core.test_common.TestCore) ... ok
test_tags (tests.core.test_common.TestCore) ... ok
testBadPidFile (tests.core.test_config.TestConfig) ... ok
testDefaultChecks (tests.core.test_config.TestConfig) ... ok
Verify that the pid file succeeds and fails appropriately ... ok
testHostname (tests.core.test_config.TestConfig) ... ok
Leading whitespace confuse ConfigParser ... ok
testWindowsSplit (tests.core.test_config.TestConfig) ... ok
test_count (tests.core.test_count_type.TestCountType) ... ok
test_monotonic_count (tests.core.test_count_type.TestCountType) ... ok
test_cassandra_parser (tests.core.test_datadog.TestDogstream) ... ok
Ensure that pre-stateful plugins still work ... ok
test_dogstream_bad_input (tests.core.test_datadog.TestDogstream) ... ok
test_dogstream_counter (tests.core.test_datadog.TestDogstream) ... ok
test_dogstream_events (tests.core.test_datadog.TestDogstream) ... ok
test_dogstream_events_validation (tests.core.test_datadog.TestDogstream) ... ok
Ensure that non-class-based stateful plugins work ... ok
test_dogstream_gauge (tests.core.test_datadog.TestDogstream) ... ok
Make sure that globbed dogstream logfile matching works. ... ok
Ensure that class-based stateful plugins work ... ok
test_supervisord_parser (tests.core.test_datadog.TestDogstream) ... ok
test_bad_packets_throw_errors (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_batch_submission (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_counter (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_counter_normalization (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_diagnostic_stats (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_event_tags (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_event_text (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_event_text_utf8 (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_event_title (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_formatter (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_gauge (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_gauge_sample_rate (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_histogram (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_histogram_normalization (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_magic_tags (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_monokey_batching_notags (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_monokey_batching_withtags (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_monokey_batching_withtags_with_sampling (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
Starting with Agent 5.0.0, there should always be a local forwarder ... ok
test_packet_string_endings (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_recent_point_threshold (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_sampled_counter (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_sampled_histogram (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_scientific_notation (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_service_check_basic (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_service_check_message (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_service_check_tags (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_sets (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_string_sets (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_tags (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_tags_gh442 (tests.core.test_dogstatsd.TestUnitDogStatsd) ... ok
test_metadata (tests.core.test_ec2.TestEC2) ... ok
test_remove_control_chars (tests.core.test_emitter.TestEmitter) ... ok
test_init (tests.core.test_flare.FlareTest) ... ok
test_upload_no_case (tests.core.test_flare.FlareTest) ... ok
test_upload_with_case (tests.core.test_flare.FlareTest) ... ok
test_custom_aggregate (tests.core.test_histogram.TestHistogram) ... ok
test_custom_invalid_percentile (tests.core.test_histogram.TestHistogram) ... ok
test_custom_invalid_percentile2 (tests.core.test_histogram.TestHistogram) ... ok
test_custom_invalid_percentile3skip (tests.core.test_histogram.TestHistogram) ... ok
test_custom_multiple_percentile (tests.core.test_histogram.TestHistogram) ... ok
test_custom_single_percentile (tests.core.test_histogram.TestHistogram) ... ok
test_default (tests.core.test_histogram.TestHistogram) ... ok
Try to use a lot of memory ... ok
testNonRepeat (tests.core.test_laconic.TestLaconic) ... ok
testRepeatingErrors (tests.core.test_laconic.TestLaconic) ... ok
Collect hostname metadata ... ok
Roll-up instance metadata ... ok
Fill up checks that do not generate any metadata ... ok
Python module cache should be populated ... ok
Modules already in the cache should be reused ... ok
When the specifier contains no module name, any provided default ... ok
When the specifier contains a module name, any provided default ... ok
"Loading modules by absolute path should correctly set the name of ... ok
Can set, read, update and delete data in the agent_payload ... ok
Submit each payload to its specific endpoint. ... ok
`agent_payload` property returns a single agent_payload ... ok
Split data and metadata payloads. Submit to the right endpoint. ... ok
Test pickle file location when running on Linux ... ok
Test pickle file location when running a Mac DMG install ... ok
Test pickle file location when running a Mac source install ... ok
Test pickle file location on win32 ... ok
test_logrotate_copytruncate (tests.core.test_tail.TestTail) ... ok

----------------------------------------------------------------------
Ran 100 tests in 14.267s

OK
Cleaning up

[2015-11-03T15:48:43Z] >>>>>>>>>>>>>> CLEANUP STAGE

$ echo $?
0

@remh remh added this to the 5.7.0 milestone Nov 19, 2015
@remh
Copy link

remh commented Nov 19, 2015

Looks good to me.
Thanks a lot @diogokiss !

remh pushed a commit that referenced this pull request Nov 19, 2015
[check_consul] add SSL support to Consul checks.
@remh remh merged commit d36fffe into DataDog:master Nov 19, 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.

2 participants