mirror of https://github.com/apache/kafka.git
KAFKA-13129: replace describe topic via zk with describe users (#11115)
Replace the unsupported describe topic via zk with describe users to fix the system tests. For the upgrade_test case where TLS support is not required, use list_acls instead. Reviewers: Ismael Juma <ismael@juma.me.uk>
This commit is contained in:
parent
c38adaf74b
commit
f959e6c583
|
@ -220,16 +220,15 @@ class ZookeeperService(KafkaPathResolverMixin, Service):
|
||||||
output = self.nodes[0].account.ssh_output(cmd)
|
output = self.nodes[0].account.ssh_output(cmd)
|
||||||
self.logger.debug(output)
|
self.logger.debug(output)
|
||||||
|
|
||||||
def describe(self, topic):
|
def describeUsers(self):
|
||||||
"""
|
"""
|
||||||
Describe the given topic using the ConfigCommand CLI
|
Describe the default user using the ConfigCommand CLI
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kafka_run_class = self.path.script("kafka-run-class.sh", DEV_BRANCH)
|
kafka_run_class = self.path.script("kafka-run-class.sh", DEV_BRANCH)
|
||||||
cmd = "%s kafka.admin.ConfigCommand --zookeeper %s %s --describe --topic %s" % \
|
cmd = "%s kafka.admin.ConfigCommand --zookeeper %s %s --describe --entity-type users --entity-default" % \
|
||||||
(kafka_run_class, self.connect_setting(force_tls=self.zk_client_secure_port),
|
(kafka_run_class, self.connect_setting(force_tls=self.zk_client_secure_port),
|
||||||
self.zkTlsConfigFileOption(),
|
self.zkTlsConfigFileOption())
|
||||||
topic)
|
|
||||||
self.logger.debug(cmd)
|
self.logger.debug(cmd)
|
||||||
output = self.nodes[0].account.ssh_output(cmd)
|
output = self.nodes[0].account.ssh_output(cmd)
|
||||||
self.logger.debug(output)
|
self.logger.debug(output)
|
||||||
|
|
|
@ -51,10 +51,10 @@ class TestUpgrade(ProduceConsumeValidateTest):
|
||||||
self.logger.info("Upgrade ZooKeeper from %s to %s" % (str(self.zk.nodes[0].version), str(DEV_BRANCH)))
|
self.logger.info("Upgrade ZooKeeper from %s to %s" % (str(self.zk.nodes[0].version), str(DEV_BRANCH)))
|
||||||
self.zk.set_version(DEV_BRANCH)
|
self.zk.set_version(DEV_BRANCH)
|
||||||
self.zk.restart_cluster()
|
self.zk.restart_cluster()
|
||||||
# Confirm we have a successful ZooKeeper upgrade by describing the topic.
|
# Confirm we have a successful ZooKeeper upgrade by List ACLs for the topic.
|
||||||
# Not trying to detect a problem here leads to failure in the ensuing Kafka roll, which would be a less
|
# Not trying to detect a problem here leads to failure in the ensuing Kafka roll, which would be a less
|
||||||
# intuitive failure than seeing a problem here, so detect ZooKeeper upgrade problems before involving Kafka.
|
# intuitive failure than seeing a problem here, so detect ZooKeeper upgrade problems before involving Kafka.
|
||||||
self.zk.describe(self.topic)
|
self.zk.list_acls(self.topic)
|
||||||
# Do some stuff that exercises the use of ZooKeeper before we upgrade to the latest ZooKeeper client version
|
# Do some stuff that exercises the use of ZooKeeper before we upgrade to the latest ZooKeeper client version
|
||||||
self.logger.info("First pass bounce - rolling Kafka with old ZooKeeper client")
|
self.logger.info("First pass bounce - rolling Kafka with old ZooKeeper client")
|
||||||
for node in self.kafka.nodes:
|
for node in self.kafka.nodes:
|
||||||
|
|
|
@ -81,7 +81,7 @@ class ZookeeperTlsEncryptOnlyTest(ProduceConsumeValidateTest):
|
||||||
|
|
||||||
# Make sure the ConfigCommand CLI is able to talk to a TLS-enabled, encrypt-only ZooKeeper quorum
|
# Make sure the ConfigCommand CLI is able to talk to a TLS-enabled, encrypt-only ZooKeeper quorum
|
||||||
# This is necessary for the bootstrap use case despite direct ZooKeeper connectivity being deprecated
|
# This is necessary for the bootstrap use case despite direct ZooKeeper connectivity being deprecated
|
||||||
self.zk.describe(self.topic)
|
self.zk.describeUsers()
|
||||||
|
|
||||||
# Make sure the AclCommand CLI is able to talk to a TLS-enabled, encrypt-only ZooKeeper quorum
|
# Make sure the AclCommand CLI is able to talk to a TLS-enabled, encrypt-only ZooKeeper quorum
|
||||||
# This is necessary for the bootstrap use case despite direct ZooKeeper connectivity being deprecated
|
# This is necessary for the bootstrap use case despite direct ZooKeeper connectivity being deprecated
|
||||||
|
|
|
@ -115,7 +115,7 @@ class ZookeeperTlsTest(ProduceConsumeValidateTest):
|
||||||
|
|
||||||
# Make sure the ConfigCommand CLI is able to talk to a TLS-enabled ZooKeeper quorum
|
# Make sure the ConfigCommand CLI is able to talk to a TLS-enabled ZooKeeper quorum
|
||||||
# This is necessary for the bootstrap use case despite direct ZooKeeper connectivity being deprecated
|
# This is necessary for the bootstrap use case despite direct ZooKeeper connectivity being deprecated
|
||||||
self.zk.describe(self.topic)
|
self.zk.describeUsers()
|
||||||
|
|
||||||
# Make sure the AclCommand CLI is able to talk to a TLS-enabled ZooKeeper quorum
|
# Make sure the AclCommand CLI is able to talk to a TLS-enabled ZooKeeper quorum
|
||||||
# This is necessary for the bootstrap use case despite direct ZooKeeper connectivity being deprecated
|
# This is necessary for the bootstrap use case despite direct ZooKeeper connectivity being deprecated
|
||||||
|
|
Loading…
Reference in New Issue