From 265aeabf6085e5844488b1f478a72ba1cece4e29 Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Thu, 22 Jan 2015 16:59:04 -0500 Subject: [PATCH] We need to tell the etcd client which protocol to use. --- buildman/manager/ephemeral.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buildman/manager/ephemeral.py b/buildman/manager/ephemeral.py index 47d2c805f..e25fc1250 100644 --- a/buildman/manager/ephemeral.py +++ b/buildman/manager/ephemeral.py @@ -151,12 +151,14 @@ class EphemeralBuilderManager(BaseManager): etcd_port = self._manager_config.get('ETCD_PORT', 2379) etcd_auth = self._manager_config.get('ETCD_CERT_AND_KEY', None) etcd_ca_cert = self._manager_config.get('ETCD_CA_CERT', None) + etcd_protocol = 'http' if etcd_auth is None else 'https' logger.debug('Connecting to etcd on %s:%s', etcd_host, etcd_port) worker_threads = self._manager_config.get('ETCD_WORKER_THREADS', 5) self._async_thread_executor = ThreadPoolExecutor(worker_threads) self._etcd_client = AsyncWrapper(self._etcd_client_klass(host=etcd_host, port=etcd_port, - cert=etcd_auth, ca_cert=etcd_ca_cert), + cert=etcd_auth, ca_cert=etcd_ca_cert, + protocol=etcd_protocol), executor=self._async_thread_executor) self._watch_etcd(ETCD_BUILDER_PREFIX, self._handle_builder_expiration)