You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by rh...@apache.org on 2019/05/30 19:04:02 UTC
[kafka] branch 1.0 updated: KAFKA-8418: Wait until REST resources
are loaded when starting a Connect Worker. (#6840)
This is an automated email from the ASF dual-hosted git repository.
rhauch pushed a commit to branch 1.0
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/1.0 by this push:
new 1395d37 KAFKA-8418: Wait until REST resources are loaded when starting a Connect Worker. (#6840)
1395d37 is described below
commit 1395d37ad8216d0832710b6e358f7653f1508458
Author: Alex Diachenko <sa...@gmail.com>
AuthorDate: Thu May 30 12:01:00 2019 -0700
KAFKA-8418: Wait until REST resources are loaded when starting a Connect Worker. (#6840)
Author: Alex Diachenko <sa...@gmail.com>
Reviewers: Arjun Satish <ar...@confluent.io>, Konstantine Karantasis <ko...@confluent.io>, Randall Hauch <rh...@gmail.com>
---
tests/kafkatest/services/connect.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tests/kafkatest/services/connect.py b/tests/kafkatest/services/connect.py
index 69690da..9d6026f 100644
--- a/tests/kafkatest/services/connect.py
+++ b/tests/kafkatest/services/connect.py
@@ -20,7 +20,6 @@ import signal
import time
import requests
-from ducktape.cluster.remoteaccount import RemoteCommandError
from ducktape.errors import DucktapeError
from ducktape.services.service import Service
from ducktape.utils.util import wait_until
@@ -90,12 +89,12 @@ class ConnectServiceBase(KafkaPathResolverMixin, Service):
def listening(self, node):
try:
- cmd = "nc -z %s %s" % (node.account.hostname, self.CONNECT_REST_PORT)
- node.account.ssh_output(cmd, allow_fail=False)
- self.logger.debug("Connect worker started accepting connections at: '%s:%s')", node.account.hostname,
+ self.list_connectors(node)
+ self.logger.debug("Connect worker started serving REST at: '%s:%s')", node.account.hostname,
self.CONNECT_REST_PORT)
return True
- except (RemoteCommandError, ValueError) as e:
+ except requests.exceptions.ConnectionError:
+ self.logger.debug("REST resources are not loaded yet")
return False
def start(self, mode=STARTUP_MODE_LISTEN):