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

KAFKA-10822 Force some stdout from system tests for Travis #9712

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/kafkatest/tests/core/downgrade_test.py
Expand Up @@ -120,11 +120,11 @@ def test_upgrade_and_downgrade(self, version, compression_types, security_protoc
self.setup_services(kafka_version, compression_types, security_protocol, static_membership)
self.await_startup()

self.logger.info("First pass bounce - rolling upgrade")
print("First pass bounce - rolling upgrade", flush=True) # Force some stdout for Travis
Copy link
Contributor

@ijuma ijuma Jan 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems weird. If we want to force stdout, we should configure the logger to do so, right?

Copy link
Contributor Author

@chia7712 chia7712 Jan 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to configure ducktape to force more output but ducktape supports only --debug. It is too noisy to me.

Another way is to make a patch to ducktape for INFO level support. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.upgrade_from(kafka_version)
self.run_validation()

self.logger.info("Second pass bounce - rolling downgrade")
print("Second pass bounce - rolling downgrade", flush=True) # Force some stdout for Travis
self.downgrade_to(kafka_version)
self.run_validation()
assert self.kafka.check_protocol_errors(self)
2 changes: 2 additions & 0 deletions tests/kafkatest/tests/core/replication_test.py
Expand Up @@ -52,13 +52,15 @@ def clean_bounce(test, broker_type):
"""Chase the leader of one partition and restart it cleanly."""
for i in range(5):
prev_broker_node = broker_node(test, broker_type)
print("clean_bounce on " + str(prev_broker_node.account), flush=True) # Force some stdout for Travis
test.kafka.restart_node(prev_broker_node, clean_shutdown=True)


def hard_bounce(test, broker_type):
"""Chase the leader and restart it with a hard kill."""
for i in range(5):
prev_broker_node = broker_node(test, broker_type)
print("hard_bounce on " + str(prev_broker_node.account), flush=True) # Force some stdout for Travis
test.kafka.signal_node(prev_broker_node, sig=signal.SIGKILL)

# Since this is a hard kill, we need to make sure the process is down and that
Expand Down
Expand Up @@ -65,6 +65,7 @@ def roll_in_secured_settings(self, client_protocol, broker_protocol):
# Roll cluster to include inter broker security protocol.
self.kafka.setup_interbroker_listener(broker_protocol)
self.bounce()
print("succeed in bouncing kafka cluster to include inter broker security protocol", flush=True) # Force some stdout for Travis

# Roll cluster to disable PLAINTEXT port
self.kafka.close_port(SecurityConfig.PLAINTEXT)
Expand Down
4 changes: 2 additions & 2 deletions tests/kafkatest/tests/core/upgrade_test.py
Expand Up @@ -55,17 +55,17 @@ def perform_upgrade(self, from_kafka_version, to_message_format_version=None):
# 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.
self.zk.describe(self.topic)
self.logger.info("First pass bounce - rolling upgrade")
for node in self.kafka.nodes:
print("First pass bounce - rolling upgrade on " + str(node.account), flush=True) # Force some stdout for Travis
self.kafka.stop_node(node)
node.version = DEV_BRANCH
node.config[config_property.INTER_BROKER_PROTOCOL_VERSION] = from_kafka_version
node.config[config_property.MESSAGE_FORMAT_VERSION] = from_kafka_version
self.kafka.start_node(node)
self.wait_until_rejoin()

self.logger.info("Second pass bounce - remove inter.broker.protocol.version config")
for node in self.kafka.nodes:
print("Second pass bounce - remove inter.broker.protocol.version config from " + str(node.account), flush=True) # Force some stdout for Travis
self.kafka.stop_node(node)
del node.config[config_property.INTER_BROKER_PROTOCOL_VERSION]
if to_message_format_version is None:
Expand Down