Bug 1899397

Summary: ifup-ib in rdma-core-22.4-5.el7.x86_64 always shows error messages in setting device MTU wrongly.
Product: Red Hat Enterprise Linux 7 Reporter: sstcosaka <sstcosaka01>
Component: rdma-coreAssignee: Honggang LI <honli>
Status: CLOSED WONTFIX QA Contact: Infiniband QE <infiniband-qe>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.9CC: rdma-dev-team
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-23 12:23:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description sstcosaka 2020-11-19 05:35:45 UTC
Description of problem:
ifup-ib in rdma-core-22.4-5.el7.x86_64  or later always  shows error messages wrongly
 like
[root@sandy01 network-scripts]# ifup ib0
ERROR     : [/etc/sysconfig/network-scripts/ifup-ib] Error setting device ib0 MTU to 1500, using HW default.

What's wrong is only the error messages.
MTU is set as specified succesfully.

[root@sandy01 network-scripts]# ip link show ib0
4: ib0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 256
    link/infiniband 80:00:02:08:fe:80:00:00:00:00:00:00:00:02:c9:03:00:f9:2a:51 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff


Version-Release number of selected component (if applicable):
# rpm -qf /etc/sysconfig/network-scripts/ifup-ib 
rdma-core-22.4-5.el7.x86_64

How reproducible:
static IP address for ib0 is better.
Because DHCP logic is more complicated.

Steps to Reproduce:
1. ifdown ib0
2. ifup ib0
3.

Actual results:
functional but with message like
ERROR     : [/etc/sysconfig/network-scripts/ifup-ib] Error setting device ib0 MTU to 1500, using HW default.


Expected results:
functional without any message as long as ifup is successful


Additional info:
- Originally, we found this problem in centOS7.8.
  And we reported  this problem to https://bugs.centos.org/view.php?id=17851
  bugs.centos.org adviced us to report this problem to bugzilla.redhat.com.
- We also checked  following RPMs and ifup-ib in them are identical.
cent7.8/rdma-core-22.4-1.el7_8.x86_64.rpm
cent7.8/rdma-core-22.4-2.el7_8.x86_64.rpm
cent7.8/rdma-core-22.4-4.el7_8.x86_64.rpm
cent7.9/rdma-core-22.4-5.el7.x86_64.rpm


- Since rdma-core-22.4-1.el7.x86_64 in 7.8.2003,
/etc/sysconfig/network-scripts/ifup-ib] in rdma-core-22.4-1.el7.x86_64 was modified.
- We want to focus on 
 secstion for setting  ib0's MTU.
    127 if [ -n "${MTU}" ]; then
    128     ip link set dev ${DEVICE} mtu ${MTU}
    129     if [ "$?" ]; then
    130         net_log $"Error setting device ${DEVICE} MTU to ${MTU}, using HW default."
    131     fi
    132 fi

return value should be treated more carefully like
[root@sandy01 network-scripts]# diff ifup-ib.sstc ifup-ib
129c129
<     if [ "$?" -gt 0 ]; then
---
>     if [ "$?" ]; then

- even return value is 0, the if [$? ] is true.

Comment 2 Honggang LI 2020-11-20 11:53:20 UTC
(In reply to sstcosaka from comment #0)

> What's wrong is only the error messages.
> MTU is set as specified succesfully.

First of all, I admit the wrong message is annoy. The problem is that rhel-7.9 is the last
RHEL7 release. We have to file z-stream bug to fix this. To file a z-stream bug, business
justification MUST be provide. So, this minor bug is unlikely get approved.

> return value should be treated more carefully like
> [root@sandy01 network-scripts]# diff ifup-ib.sstc ifup-ib
> 129c129
> <     if [ "$?" -gt 0 ]; then
> ---
> >     if [ "$?" ]; then

The patch looks good.

I'm closing this bug as WONTFIX in next week. Please let me know if you can provide business
justification for this bug before I close it.