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

feat(Kafka): Add option to login to SASL password-protected Kafka, like MSK #100

Merged
merged 25 commits into from
Dec 22, 2023

Conversation

Smejky338
Copy link
Contributor

No description provided.

@Smejky338
Copy link
Contributor Author

In the first use, I got these timeout errors so that only a part of the hosts generated:
https://master-jenkins-csb-perf.apps.ocp-c1.prod.psi.redhat.com/job/InsightsROS_runner/397/console
2023-12-08 15:44:12,709 kafka.client WARNING <BrokerConnection node_id=3 host=b-3-public.openpocmsk.pyzafp.c6.kafka.us-east-2.amazonaws.com:9196 <connected> [IPv4 ('3.132.12.218', 9196)]> timed out after 30000 ms. Closing connection. 2023-12-08 15:44:12,709 kafka.client WARNING Node 3 connection failed -- refreshing metadata 2023-12-08 15:44:12,710 kafka.producer.record_accumulator WARNING Produced messages to topic-partition TopicPartition(topic='platform.inventory.host-ingress', partition=8) with base offset -1 log start offset None and error None. 2023-12-08 15:44:12,710 root ERROR Failed to send message (RequestTimedOutError('Request timed out after 30000 ms'),); {'data_stats': {'successes': 7, 'failures': 0}, 'data_lock': <unlocked _thread.lock object at 0x7f44f173ccc0>} 2023-12-08 15:44:12,710 kafka.client WARNING <BrokerConnection node_id=2 host=b-2-public.openpocmsk.pyzafp.c6.kafka.us-east-2.amazonaws.com:9196 <connected> [IPv4 ('3.131.20.190', 9196)]> timed out after 30000 ms. Closing connection. 2023-12-08 15:44:12,710 kafka.producer.record_accumulator WARNING [Error 7] RequestTimedOutError: Request timed out after 30000 ms 2023-12-08 15:44:12,710 kafka.client WARNING Node 2 connection failed -- refreshing metadata 2023-12-08 15:44:12,711 kafka.producer.record_accumulator WARNING Produced messages to topic-partition TopicPartition(topic='platform.inventory.host-ingress', partition=1) with base offset -1 log start offset None and error None. 2023-12-08 15:44:12,711 root ERROR Failed to send message (RequestTimedOutError('Request timed out after 30000 ms'),); {'data_stats': {'successes': 7, 'failures': 1}, 'data_lock': <unlocked _thread.lock object at 0x7f44f173ccc0>} 2023-12-08 15:44:12,711 kafka.producer.record_accumulator WARNING Produced messages to topic-partition TopicPartition(topic='platform.inventory.host-ingress', partition=4) with base offset -1 log start offset None and error None. 2023-12-08 15:44:12,711 root ERROR Failed to send message (RequestTimedOutError('Request timed out after 30000 ms'),); {'data_stats': {'successes': 7, 'failures': 2}, 'data_lock': <unlocked _thread.lock object at 0x7f44f173ccc0>} 2023-12-08 15:44:12,711 kafka.producer.record_accumulator WARNING [Error 7] RequestTimedOutError: Request timed out after 30000 ms 2023-12-08 15:44:12,711 kafka.producer.record_accumulator WARNING [Error 7] RequestTimedOutError: Request timed out after 30000 ms Traceback (most recent call last): File "/home/venv/bin/script-hbi-populate.py", line 33, in <module> sys.exit(load_entry_point('opl-rhcloud-perf-team', 'console_scripts', 'script-hbi-populate.py')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/venv/src/opl-rhcloud-perf-team/opl/hbi_utils.py", line 311, in populate_main gen_send_verify(args, status_data) File "/home/venv/src/opl-rhcloud-perf-team/opl/hbi_utils.py", line 217, in gen_send_verify gen_and_send( File "/home/venv/src/opl-rhcloud-perf-team/opl/hbi_utils.py", line 107, in gen_and_send raise Exception( Exception: Failed to send 3 messages out of totally requested 10 command terminated with exit code 1

... but the second one worked fine: https://master-jenkins-csb-perf.apps.ocp-c1.prod.psi.redhat.com/job/InsightsROS_runner/398/console

@Smejky338 Smejky338 requested a review from jhutar December 12, 2023 14:21
opl/consumer_lag.py Outdated Show resolved Hide resolved
opl/consumer_lag.py Outdated Show resolved Hide resolved
opl/skip_to_end.py Outdated Show resolved Hide resolved
opl/consumer_lag.py Outdated Show resolved Hide resolved
opl/get_kafka_times.py Outdated Show resolved Hide resolved
opl/get_kafka_times.py Outdated Show resolved Hide resolved
opl/hbi_utils.py Outdated Show resolved Hide resolved
opl/post_kafka_times.py Outdated Show resolved Hide resolved
opl/skip_to_end.py Outdated Show resolved Hide resolved
opl/skip_to_end.py Outdated Show resolved Hide resolved
@shubham-html-css-js
Copy link
Contributor

@jsmejkal @jhutar I have tried this in my local environment and for Patchman , the script works well

@Smejky338
Copy link
Contributor Author

I've changed to default the kafka_user and kafka_password to "" and modified the scripts to take that into account and also refactored some Kafka consumer/producer code to be separated into a method.
It would be nice to refactor all the kafka consumer and producer methods into a common place so we don't have that much copypaste, but I would skip that "for now".

@jhutar jhutar merged commit 0b0442f into main Dec 22, 2023
6 checks passed
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.

3 participants