[Bug 1892367] Comment bridged from LTC Bugzilla
bugproxy
1892367 at bugs.launchpad.net
Wed Mar 31 07:20:05 UTC 2021
------- Comment From Vineeth.Vijayan at ibm.com 2021-03-31 02:13 EDT-------
Tested on focal.
---------------
dpkg -l | grep s390-tools
ii s390-tools 2.12.0-0ubuntu3.3 s390x fundamental utilities for Linux on z Systems
ii s390-tools-signed 2.12.0-0ubuntu3.3 s390x Signed zipl stage3.bin
root at m35lp41:~#
root at m35lp41:~#
root at m35lp41:~# cat /proc/version
Linux version 5.4.0-70-generic (buildd at bos02-s390x-010) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #78-Ubuntu SMP Fri Mar 19 13:25:37 UTC 2021
root at m35lp41:~# cat /sys/devices/qeth/0.0.bd00/buffer_count
64
root at m35lp41:~# chzdev qeth bd00 -p layer2=1 buffer_count=128
Configuring devices in the persistent configuration only
QETH device 0.0.bd00:0.0.bd01:0.0.bd02 configured
Note: The initial RAM-disk must be updated for these changes to take effect:
- QETH device 0.0.bd00:0.0.bd01:0.0.bd02
update-initramfs: Generating /boot/initrd.img-5.4.0-70-generic
Using config file '/etc/zipl.conf'
Building bootmap in '/boot'
Adding IPL section 'ubuntu' (default)
Preparing boot device: dasda (af8a).
Done.
root at m35lp41:~# cat /sys/devices/qeth/0.0.bd00/buffer_count
64
root at m35lp41:~# reboot
----
Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-70-generic s390x)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Wed 31 Mar 2021 06:12:05 AM UTC
System load: 0.38 Processes: 212
Usage of /: 6.7% of 20.18GB Users logged in: 0
Memory usage: 2% IPv4 address for encbd00: 172.18.60.41
Swap usage: 0%
0 updates can be installed immediately.
0 of these updates are security updates.
**************************************************************
* *
* The system was installed using *
* TESSIA *
* Task Execution Supporter and System Installation Assistant *
* *
* Open source repo: https://gitlab.com/tessia-project *
* (GitHub mirror: https://github.com/tessia-project) *
* *
* Documentation is located here: *
* https://gitlab.com/tessia-project/tessia/-/tree/master/doc *
* *
* To create custom templates for auto installation see: *
* > tess autotemplate add --help *
* *
**************************************************************
Last login: Wed Mar 31 06:07:43 2021 from 172.18.0.1
root at m35lp41:~#
root at m35lp41:~#
root at m35lp41:~# cat /sys/devices/qeth/0.0.bd00/buffer_count
128
---
And looks good.
Thank you for the fix.
------- Comment From Vineeth.Vijayan at ibm.com 2021-03-31 02:44 EDT-------
Tested on Groovy
----------------
root at m35lp41:~# dpkg -l | grep s390-tools
ii s390-tools 2.14.0-1ubuntu1.2 s390x fundamental utilities for Linux on z Systems
ii s390-tools-signed 2.14.0-1ubuntu1.2 s390x Signed zipl stage3.bin
root at m35lp41:~#
root at m35lp41:~# cat /proc/version
Linux version 5.8.0-48-generic (buildd at bos02-s390x-020) (gcc (Ubuntu 10.2.0-13ubuntu1) 10.2.0, GNU ld (GNU Binutils for Ubuntu) 2.35.1) #54-Ubuntu SMP Fri Mar 19 14:18:31 UTC 2021
root at m35lp41:~# cat /sys/devices/qeth/0.0.bd00/buffer_count
64
root at m35lp41:~# chzdev qeth bd00 -p layer2=1 buffer_count=128
Configuring devices in the persistent configuration only
QETH device 0.0.bd00:0.0.bd01:0.0.bd02 configured
Note: The initial RAM-disk must be updated for these changes to take effect:
- QETH device 0.0.bd00:0.0.bd01:0.0.bd02
update-initramfs: Generating /boot/initrd.img-5.8.0-48-generic
Using config file '/etc/zipl.conf'
Building bootmap in '/boot'
Adding IPL section 'ubuntu' (default)
Preparing boot device: dasda (af8a).
Done.
root at m35lp41:~# cat /sys/devices/qeth/0.0.bd00/buffer_count
64
root at m35lp41:~# reboot
packet_write_wait: Connection to UNKNOWN port 65535: Broken pipe
[vineeth.vijayan at oc6887364776 ~]$ ssh m35lp41.lnxne.boe
channel 0: open failed: connect failed: Connection refused
stdio forwarding failed
ssh_exchange_identification: Connection closed by remote host
[vineeth.vijayan at oc6887364776 ~]$ ssh m35lp41.lnxne.boe
channel 0: open failed: connect failed: Connection refused
stdio forwarding failed
ssh_exchange_identification: Connection closed by remote host
[vineeth.vijayan at oc6887364776 ~]$ ssh m35lp41.lnxne.boe
root at m35lp41.lnxne.boe's password:
Welcome to Ubuntu 20.10 (GNU/Linux 5.8.0-48-generic s390x)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Wed Mar 31 06:43:14 AM UTC 2021
System load: 0.31 Processes: 207
Usage of /: 6.9% of 20.18GB Users logged in: 0
Memory usage: 2% IPv4 address for encbd00: 172.18.60.41
Swap usage: 0%
0 updates can be installed immediately.
0 of these updates are security updates.
**************************************************************
* *
* The system was installed using *
* TESSIA *
* Task Execution Supporter and System Installation Assistant *
* *
* Open source repo: https://gitlab.com/tessia-project *
* (GitHub mirror: https://github.com/tessia-project) *
* *
* Documentation is located here: *
* https://gitlab.com/tessia-project/tessia/-/tree/master/doc *
* *
* To create custom templates for auto installation see: *
* > tess autotemplate add --help *
* *
**************************************************************
Last login: Wed Mar 31 06:38:45 2021 from 172.18.0.1
root at m35lp41:~#
root at m35lp41:~# cat /sys/devices/qeth/0.0.bd00/buffer_count
128
----
And the result looks good to me.
Thank you.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to s390-tools-signed in Ubuntu.
https://bugs.launchpad.net/bugs/1892367
Title:
[UBUNTU 20.04] udev rule change did not get applied
Status in Ubuntu on IBM z Systems:
Fix Committed
Status in s390-tools package in Ubuntu:
Fix Released
Status in s390-tools-signed package in Ubuntu:
Fix Released
Status in s390-tools source package in Focal:
Fix Committed
Status in s390-tools-signed source package in Focal:
Fix Committed
Status in s390-tools source package in Groovy:
Fix Committed
Status in s390-tools-signed source package in Groovy:
Fix Committed
Status in s390-tools source package in Hirsute:
Fix Released
Status in s390-tools-signed source package in Hirsute:
Fix Released
Bug description:
SRU:
====
[Impact]
* In case a ccw (special s390x hardware) device is configured
in a special (non-default) way using chzdev
(like for example increasing the qeth buffer_count to 128),
the modifications are not persistent by default, since the
generated udev rules are not automatically incuded/added to the initramfs.
* One needs to either manually re-create the initramfs,
e.g. with 'sudo update-initramfs -k all -u' (maybe triggered by zipl)
* or pass the arguments '-p -r zdev:early' to chzdev.
* This is not really intuitive and what people expect
and partly leads to confusion.
* The solution is to compile with the ZDEV_ALWAYS_UPDATE_INITRD=1 option set.
This makes sure that executions of chzdev always trigger 'update-initramfs -u'.
[Test Plan]
* Prepare an Ubuntu Server 20.04 or 20.04 on IBM Z with at least
one ccw device, for example a qeth network device, here '0.0.1234'.
(better to do that with a second spare qeth device,
other than the one that is in use by your remote connection).
* Configure the device using:
sudo chzdev qeth -e 1234
* Check the (default) value of a certain attribute, like qeth buffer_count:
cat /sys/devices/qeth/0.0.1234/buffer_count
64
* Disable the ccw device again:
sudo chzdev qeth -d 1234
* And enable (re-)enable it with an increased buffer_count:
sudo chzdev -e 1234 buffer_count=128
* Check the (increased) value of the qeth buffer_count:
cat /sys/devices/qeth/0.0.1234/buffer_count
128
* Restart the system (without manually running update-initramfs or zipl):
sudo shutdown -r now
* Once the system is up again, re-check if the ccw device was enabled again
and if it still has the increased buffer_count value:
lszdev qeth 1234
TYPE ID ON PERS NAMES
qeth 0.0.1234:0.0.1235:0.0.1236 yes yes enc1234
cat /sys/devices/qeth/0.0.1234/buffer_count
128
(alternatively check with: lsqeth enc1234 | grep buffer_count)
[Where problems could occur]
* The logic of handling DZDEV_ALWAYS_UPDATE_INITRD could be wrong, e.g. inversed.
Then the initramfs is re-build even if not desired
and in case needed not done, hence similar result than before.
* The setting of 'ZDEV_ALWAYS_UPDATE_INITRD=1' could have been missed,
which would lead to the similar behaviour than w/o the patch.
* 'add_pers_removed' could handle wrong device types or not all devices,
in case of potential array index errors.
* 'is_zdev_early_0' could identify wrong persistent devices as some to be
included early in the boot process (means added to the initramfs).
* Problems in 'if (all_pers)' could lead to a wrong set of persistent devices
that are considered (or not all),
which could lead to unexpected (de-)configurations.
* Finally the handling of the confirmation
or the 'build of the command line' could be errornous,
since the encapsulated if condition(s) changed (sightly).
[Other Info]
* This patch became upstream accepted with s390-tools 2.16.0 and is
with that already included in hirsute, based on LP:1914574.
__________
During the ubuntu installation in tessia, we do chzdev for both dasd
and qeth devices, as below.
2020-08-20 09:54:45 | INFO | START subiquity/Early/run/command_1 : chzdev -e dasd 385c
2020-08-20 09:54:45 | INFO | SUCCESS subiquity/Early/run/command_1 : chzdev -e dasd 385c
2020-08-20 09:54:45 | INFO | START subiquity/Early/run/command_2 : chzdev -e qeth 0.0.bdf0
2020-08-20 09:54:47 | INFO | SUCCESS subiquity/Early/run/command_2 : chzdev -e qeth 0.0.bdf0
and we can see the below files in the /etc/udev/rules.d/
oot at m8360024:~# ls -l /etc/udev/rules.d/
total 76
-rw-r--r-- 1 root root 154 Aug 20 09:08 41-cio-ignore.rules
-rw-r--r-- 1 root root 430 Aug 20 09:08 41-dasd-eckd-0.0.385c.rules
-rw-r--r-- 1 root root 357 Aug 20 09:08 41-generic-ccw-0.0.0009.rules
-rw-r--r-- 1 root root 1049 Aug 20 09:08 41-qeth-0.0.bdf0.rules
-rw-r--r-- 1 root root 58549 Aug 20 09:10 70-snap.snapd.rules
Now, lsinitramfs shows files as below,
root at m8360024:~# lsinitramfs /boot/initrd.img-5.4.0-42-generic | grep 41
etc/udev/rules.d/41-cio-ignore-root.rules
etc/udev/rules.d/41-dasd-eckd-0.0.385c.rules
usr/lib/udev/rules.d/41-cio-ignore.rules
usr/lib/udev/rules.d/41-dasd-eckd-0.0.385c.rules
usr/lib/udev/rules.d/41-generic-ccw-0.0.0009.rules
usr/lib/udev/rules.d/41-qeth-0.0.bdf0.rules
Even though lsinitramfs shows the below files, they are overruled by
the filesystem files.
Next thing we did was to modify the 41-qeth-0.0.bdf0.rules and
modified the buffer_count to 128 (As in the attached file). In ideal
scenario, the value should we modified as mentioned in the bug. But,
in our case, if we are not doing a zipl or update-initramfs -u, the
value is not getting modified.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1892367/+subscriptions
More information about the foundations-bugs
mailing list