Mellanox / libxlio

Other
32 stars 18 forks source link

issue: 3958757 Change error message to warning when reading FS files #171

Closed BasharRadya closed 1 month ago

BasharRadya commented 1 month ago

Description

At startup, XLIO tries to read files in the /proc/sys/net/core/ directory, which can be inaccessible when running in a container (it doesn’t matter whether in privileged mode or not). In this case, XLIO produces ERROR messages which can be considered as WARNINGs.

What

This commit changes the default log severity in the read_file_to_int() function from VLOG_ERROR to VLOG_WARNING. This is done to account for different container configurations where certain files may not be accessible, while ensuring a default value is used for every parameter. This change enhances XLIO's adaptability in various container environments.

Why ?

This breaks CI and blocks the integration with DOCA.

Change type

What kind of change does this PR introduce?

Check list

swx-jenkins3 commented 1 month ago

Can one of the admins verify this patch?

pasis commented 1 month ago

I would suggest to modify read_file_to_int() and priv_read_file(). These functions print a message on a failure with the word "ERROR". On the other hand, these functions allow to change log severity and it will be confusing to see a warning or info log with an "ERROR" word.

Please, rephrase those messages with something like this:

Regarding commit message: Remove symbol "#" from the issue number (commit message format convention). Describe motivation for the change in the commit message.

BasharRadya commented 1 month ago

bot:retest

dpressle commented 1 month ago

bot:retest

galnoam commented 1 month ago

bot:retest