-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
rhel-9.5
-
None
-
No
-
Low
-
rhel-arch-hw-2
-
ssg_platform_enablement
-
None
-
False
-
False
-
-
None
-
Red Hat Enterprise Linux
-
None
-
None
-
None
-
-
s390x
-
None
What were you trying to do that didn't work?
The customer requires to have his network interface be configured with portno=1:
$ cat etc/NetworkManager/system-connections/enc600.nmconnection [connection] id=enc600 [...] [ethernet-s390-options] layer2=1 portno=1 [...]
It appears that NetworkManager is not capable to configure this. It instead relies on some "s390utils udev rule" as per documentation found in NetworkManager source code (NetworkManager-1.48.10/docs/api/html/settings-802-3-ethernet.html):
s390-options Dictionary of key/value pairs of s390-specific device options. Both keys and values must be strings. Allowed keys include "portno", "layer2", "portname", "protocol", among others. Key names must contain only alphanumeric characters (ie, [a-zA-Z0-9]). Currently, NetworkManager itself does nothing with this information. However, s390utils ships a udev rule which parses this information and applies it to the interface.
Checking s390utils sources, I was able to spot a udev rule that somehow "matches": /usr/lib/udev/rules.d/81-ccw.rules:
ACTION!="add|bind|change", GOTO="ccw_end" SUBSYSTEM!="ccw", GOTO="ccw_end" DRIVER=="ctcm|lcs|qeth", RUN+="ccw_init" LABEL="ccw_end"
This udev rule executes /usr/lib/udev/ccw_init which indeed reads some NM configuration file properties and apply them on the interface, e.g.:
80 LAYER2=$(sed -nr "/^\[ethernet-s390-options\]/ { :l /^layer2[ ]*=/ { s/.*=[ ]*//; p; q;}; n; b l;}" $CONFIG_FILE)
However, there are multiple issues with this:
- portno property is not processed, only layer2
- The script seems totally buggy
For example, on line 143, a check is made if directory $SYSDIR exists and if so, exits:143 [ -e $SYSDIR ] && exit 0 144 145 # check if the interface is already online 146 if [ -e $SYSDIR/online ]; then 147 read on <$SYSDIR/online 148 [ "$on" = "1" ] && exit 0 149 fi
Checking on my system, the directory always exists (/sys/bus/ccwgroup/drivers/qeth/0.0.0600 in my case), hence nothing ever occurs.
Additionally, here above, this code doesn't make any sense to me: if the path doesn't exist (line 143), then it continues. But then a check is made on $SYSDIR/online, which would fail since $SYSDIR directory didn't exist!
I went with patching the script to handle portno and rework the script to disable the interface if it needs reconfiguration, then reconfigure it.
I would like some Z specialist to verify my patch (attached) and discuss this with IBM itself.
What is the impact of this issue to you?
Can't configure the network interface properly.
Please provide the package NVR for which the bug is seen:
s390utils-2.33.1-2
How reproducible is this bug?:
Always
Steps to reproduce
- Configure portno=1 instead of portno=0 (requires hardware modification probably)
Expected results
Interface configured with portno set to 1
Actual results
Interface configured with portno set to 0