[UBUNTU 20.04] udev rule change did not get applied
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Released
|
Medium
|
Skipper Bug Screeners | ||
s390-tools (Ubuntu) |
Fix Released
|
Medium
|
Canonical Foundations Team | ||
Focal |
Fix Released
|
Medium
|
Brian Murray | ||
Groovy |
Fix Released
|
Medium
|
Brian Murray | ||
Hirsute |
Fix Released
|
Medium
|
Canonical Foundations Team | ||
s390-tools-signed (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Groovy |
Fix Released
|
Undecided
|
Unassigned | ||
Hirsute |
Fix Released
|
Undecided
|
Unassigned |
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_
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/
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/
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:
cat /sys/devices/
128
(alternatively check with: lsqeth enc1234 | grep buffer_count)
[Where problems could occur]
* The logic of handling DZDEV_ALWAYS_
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_
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-)configurat
* 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/
2020-08-20 09:54:45 | INFO | SUCCESS subiquity/
2020-08-20 09:54:45 | INFO | START subiquity/
2020-08-20 09:54:47 | INFO | SUCCESS subiquity/
and we can see the below files in the /etc/udev/rules.d/
oot@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-
-rw-r--r-- 1 root root 357 Aug 20 09:08 41-generic-
-rw-r--r-- 1 root root 1049 Aug 20 09:08 41-qeth-
-rw-r--r-- 1 root root 58549 Aug 20 09:10 70-snap.snapd.rules
Now, lsinitramfs shows files as below,
root@m8360024:~# lsinitramfs /boot/initrd.
etc/udev/
etc/udev/
usr/lib/
usr/lib/
usr/lib/
usr/lib/
Even though lsinitramfs shows the below files, they are overruled by the filesystem files.
Next thing we did was to modify the 41-qeth-
Related branches
- Canonical Foundations Team: Pending requested
-
Diff: 292 lines (+258/-1)4 files modifieddebian/changelog (+9/-0)
debian/patches/0001-zdev-Add-build-option-to-update-initial-RAM-disk-by-default.patch (+247/-0)
debian/patches/series (+1/-0)
debian/rules (+1/-1)
- Canonical Foundations Team: Pending requested
-
Diff: 292 lines (+258/-1)4 files modifieddebian/changelog (+9/-0)
debian/patches/0001-zdev-Add-build-option-to-update-initial-RAM-disk-by-default.patch (+247/-0)
debian/patches/series (+1/-0)
debian/rules (+1/-1)
tags: | added: id-5f3edb43483dbd71389ae8c1 |
Changed in ubuntu-z-systems: | |
status: | Invalid → New |
tags: | added: fr-588 |
Changed in ubuntu-z-systems: | |
status: | Incomplete → New |
Changed in ubuntu-z-systems: | |
status: | New → Incomplete |
Changed in ubuntu-z-systems: | |
status: | Incomplete → Triaged |
assignee: | Canonical Foundations Team (canonical-foundations) → Skipper Bug Screeners (skipper-screen-team) |
Changed in s390-tools (Ubuntu): | |
assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
Changed in s390-tools (Ubuntu Focal): | |
milestone: | none → ubuntu-20.04.3 |
Changed in ubuntu-z-systems: | |
status: | Triaged → Confirmed |
Changed in s390-tools (Ubuntu Hirsute): | |
status: | New → Fix Committed |
Changed in ubuntu-z-systems: | |
status: | Confirmed → In Progress |
description: | updated |
Changed in s390-tools (Ubuntu Focal): | |
status: | New → In Progress |
Changed in s390-tools (Ubuntu Groovy): | |
status: | New → In Progress |
Changed in s390-tools (Ubuntu Focal): | |
assignee: | nobody → Brian Murray (brian-murray) |
Changed in s390-tools (Ubuntu Groovy): | |
assignee: | nobody → Brian Murray (brian-murray) |
tags: | removed: verification-needed-focal |
tags: | added: verification-needed-focal |
Changed in ubuntu-z-systems: | |
status: | In Progress → Fix Committed |
Changed in s390-tools (Ubuntu Focal): | |
importance: | Undecided → Medium |
Changed in s390-tools (Ubuntu Hirsute): | |
importance: | Undecided → Medium |
Changed in s390-tools (Ubuntu Groovy): | |
importance: | Undecided → Medium |
affects: | subiquity → ubuntu-translations |
no longer affects: | ubuntu-translations |
Changed in s390-tools-signed (Ubuntu Focal): | |
status: | Fix Committed → Fix Released |
Changed in s390-tools-signed (Ubuntu Groovy): | |
status: | Fix Committed → Fix Released |
Changed in ubuntu-z-systems: | |
status: | Fix Committed → Fix Released |
Default Comment by Bridge