CPI information about kvm usage is lost during apt upgrade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Released
|
Medium
|
Dimitri John Ledkov | ||
s390-tools (Ubuntu) |
Fix Released
|
Undecided
|
Skipper Bug Screeners | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Fix Released
|
Undecided
|
Unassigned | ||
Disco |
Fix Released
|
Undecided
|
Skipper Bug Screeners |
Bug Description
SRU Justification:
[Impact]
* Needlessly slow systemctl daemon-reload on baremetal s390x machines
* Wipes information about auxilary bits, by force resetting kernel version
[Test Case]
$ cat /sys/firmware/
0x0000000000041200
Note the 41200 digits, this is hex-encoded kernel version number. Can be different depending on the kernel in use
$ sudo /lib/s390-
$ cat /sys/firmware/
0x8000000000041200
# Note the leading bit is now 0x8, instead of 0x0
$ sudo systemctl daemon-reload
$ cat /sys/firmware/
0x8000000000041200 -> is correct, 0x8 is preserved
0x0000000000041200 -> is wrong, 0x8 got reset to 0x0
[Solution]
In Ubuntu, cpi vars are set using systemd generator on early boot, thus HMC displays correct information about an LPAR very early on.
However, setting them takes about 1s, and at the moment was done upon every systemctl daemon-reload.
In addition, when kvm is used, cplictl -b kvm is called to update the leading kvm usage bit, this was getting lost upon every systemctl daemon-reload.
Instead, modify the generator to guard against re-setting cpi vars, if they were ever set once.
[Regression Potential]
* At worst case scenario, cpi-vars would not be set, leading to cosmetic issue of not able to see auxilary information (e.g. UBUNTU, running kernel version, Ubuntu release version) in the HMC console. As the variables form /sys/firmware/cpi/* are displayed in the HMC.
[Other Info]
* Original bug report
---Problem Description---
CPI information about kvm usage is lost during apt upgrade
---uname output---
4.15.0-42-generic
Machine Type = s390x lpar
---Steps to Reproduce---
# cat /sys/firmware/cpi/*
cat: /sys/firmware/
0x0000000000040f00
LINUX
root@m83lp52:~# virsh start guest # starting a guest does set the highest bit in
/sys/firmware/
root@m83lp52:~# cat /sys/firmware/cpi/*
cat: /sys/firmware/
0x8000000000040f00 <---- see the 8
LINUX
root@m83lp52:~# apt upgrade
[....]
has to upgrade at least one package, that will trigger some other code.
[....]
Now. some other code seems to have set values in /sys/firmware/cpi as well dropping the kvm information.
root@m83lp52:~# cat /sys/firmware/cpi/*
cat: /sys/firmware/
18 04 1
0x0000000000040f00
UBUNTU
LINUX
The canonical place to handle /sys/firmware/cpi should be /lib/s390-
/etc/sysconfig/cpi
or
/lib/s390-
)
and can we disable the other code that also sets /sys/firmware/cpi (I have not found out which code sets these values). This seems to be /lib/systemd/
tags: | added: architecture-s39064 bugnameltc-173674 severity-high targetmilestone-inin--- |
Changed in ubuntu: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
affects: | ubuntu → linux (Ubuntu) |
affects: | linux (Ubuntu) → s390-tools (Ubuntu) |
Changed in ubuntu-z-systems: | |
status: | New → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → Dimitri John Ledkov (xnox) |
tags: |
added: targetmilestone-inin1804 removed: targetmilestone-inin--- |
Changed in s390-tools (Ubuntu): | |
milestone: | none → ubuntu-19.04 |
tags: | added: id-5c6e827ce3d25a68622cfaed |
description: | updated |
Changed in s390-tools (Ubuntu): | |
status: | New → Fix Committed |
Changed in ubuntu-z-systems: | |
status: | Triaged → In Progress |
Changed in s390-tools (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in s390-tools (Ubuntu Cosmic): | |
status: | New → In Progress |
tags: |
added: verification-done removed: verification-needed |
Changed in ubuntu-z-systems: | |
status: | In Progress → Fix Committed |
Changed in ubuntu-z-systems: | |
status: | Fix Committed → Fix Released |
------- Comment From <email address hidden> 2018-11-29 09:18 EDT------- system- generators/ s390-cpi- vars Seems to help. (this seems to be an ubuntu specific extension).
removing /lib/systemd/
We just need to move this functionality (adding ubuntu and the version) into the common cpi handling.