[ 
https://issues.apache.org/jira/browse/KAFKA-19549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18024507#comment-18024507
 ] 

Maros Orsak commented on KAFKA-19549:
-------------------------------------

I assume your environment is MacOS with podman machine right? If that 
assumption is correct then the problem is that on MacOS and specifically when 
using *traffic control utility* with *netem* (i.e., qdisc to simulate network 
latency and bandwidth limits). That test case needs kernel module 
{*}sch_netem{*}, which is not available in Podman's Fedora CoreOS VMs on MacOS 
by default => so you have to enabled it => to make such test case pass. 

One way how to solve it is:
{code:java}
$ podman machine ssh
$ sudo modprobe sch_netem                                             // here 
you would see that there is no such kernel module...
$ sudo rpm-ostree install kernel-modules-extra                        // this 
would install missing kernel modules
$ sudo rm /etc/modprobe.d/sch_netem-blacklist.conf                    // you 
also have to remove config blocking to auto-load kernel module 
$ sudo sh -c 'echo sch_netem >/etc/modules-load.d/sch_netem.conf'     // enable 
loading sch_netem on start-up
$ podman machine stop
$ podman machine start
$ podman machine ssh
$ lsmod | grep sch_netem // here you would see that in your podman machine you 
have sch_netem installed :){code}
After those steps, which I wrote above it should also work on MacOS with podman 
machine :).

 

 

 

 

> network_degrade_test.py failure
> -------------------------------
>
>                 Key: KAFKA-19549
>                 URL: https://issues.apache.org/jira/browse/KAFKA-19549
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 4.1.0
>            Reporter: Mickael Maison
>            Priority: Major
>
> The following test is consistently failing in my environment:
> kafkatest.tests.core.network_degrade_test.test_rate_device_name=eth0_latency_ms=50_metadata_quorum=COMBINED_KRAFT_rate_limit_kbit=1000000_task_name=rate-1000-latency-50
> Stacktrace:
> {noformat}
> runs 1, 2, 3, 4, 5 summary:
> AssertionError('Expected most of the measured rates to be within an order of 
> magnitude of target 1000000. This means `tc` did not limit the bandwidth as 
> expected.')
> Traceback (most recent call last):
>   File 
> "/usr/local/lib/python3.9/dist-packages/ducktape/tests/runner_client.py", 
> line 351, in _do_run
>     data = self.run_test()
>   File 
> "/usr/local/lib/python3.9/dist-packages/ducktape/tests/runner_client.py", 
> line 411, in run_test
>     return self.test_context.function(self.test)
>   File "/usr/local/lib/python3.9/dist-packages/ducktape/mark/_mark.py", line 
> 438, in wrapper
>     return functools.partial(f, *args, **kwargs)(*w_args, **w_kwargs)
>   File "/opt/kafka-dev/tests/kafkatest/tests/core/network_degrade_test.py", 
> line 146, in test_rate
>     assert len(acceptable_rates) > 5, msg
> AssertionError: Expected most of the measured rates to be within an order of 
> magnitude of target 1000000. This means `tc` did not limit the bandwidth as 
> expected.
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to