thetumbled opened a new pull request, #18882: URL: https://github.com/apache/pulsar/pull/18882
<!-- Either this PR fixes an issue, --> Fixes #18881 https://github.com/apache/pulsar/issues/18881 ### Motivation When retrieve all paths of physical NICs, **it did not filter those NICs whose state are down.** `org.apache.pulsar.broker.loadbalance.LinuxInfoUtils#getPhysicalNICs` <img width="581" alt="image" src="https://user-images.githubusercontent.com/52550727/206959079-dfe285ca-0b2c-4b44-9efa-1ebe8a68496d.png"> As a consequence, we will get a wrong limit value of NIC if `loadBalancerOverrideBrokerNicSpeedGbps` is enabled. <img width="609" alt="image" src="https://user-images.githubusercontent.com/52550727/206959354-f1719903-91b5-4f82-8ed7-f12486a225df.png"> 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. ### Modifications filter those NICs whose state are down. ### Verifying this change - [ ] Make sure that the change passes the CI checks. *(Please pick either of the following options)* This change is a trivial rework / code cleanup without any test coverage. *(or)* This change is already covered by existing tests, such as *(please describe tests)*. *(or)* This change added tests and can be verified as follows: *(example:)* - *Added integration tests for end-to-end deployment with large payloads (10MB)* - *Extended integration test for recovery after broker failure* ### Documentation <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. --> - [ ] `doc` <!-- Your PR contains doc changes. Please attach the local preview screenshots (run `sh start.sh` at `pulsar/site2/website`) to your PR description, or else your PR might not get merged. --> - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later --> - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs --> - [ ] `doc-complete` <!-- Docs have been already added --> ### Matching PR in forked repository PR in forked repository: <!-- ENTER URL HERE --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
