Skip to content

[Bug] incorrect Nic usage collected by pulsar  #18881

Closed

Description

@thetumbled

Search before asking

  • I searched in the issues and found nothing similar.

Version

all version.

Minimal reproduce step

When retrieve all paths of physical NICs, it did not filter those NICs whose state are down.
org.apache.pulsar.broker.loadbalance.LinuxInfoUtils#getPhysicalNICs
image

As a consequence, we will get a wrong limit value of NIC if loadBalancerOverrideBrokerNicSpeedGbps is enabled.
image

for example, we have 4 physical nics, but only eth0 and eth1 is enable, and both of their speed is 10Gbps.

2: eth0:  state UP 
3: eth1: state UP 
4: eth2: state DOWN 
5: eth3:state DOWN 

So, the correct limit value of NIC is 20Gbps, that is 20000000 Kbps. But the limit value collected by pulsar is 40Gbps, that is 40000000 Kbps. this is caused by the bug described above.

What did you expect to see?

correct limit value of NICs.

What did you see instead?

Incorrect limit value of NICs.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Activity

  1. added
    type/bug
    on Dec 12, 2022
  2. self-assigned this
    on Dec 12, 2022
  3. mattisonchao commented on Dec 12, 2022

    @mattisonchao
    Member

    I'll take it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions