[Bug 1805841] Re: CPI information about kvm usage is lost during apt upgrade

Łukasz Zemczak 1805841 at bugs.launchpad.net
Thu May 16 16:47:04 UTC 2019


Hello bugproxy, or anyone else affected,

Accepted s390-tools into bionic-proposed. The package will build now and
be available at
https://launchpad.net/ubuntu/+source/s390-tools/2.3.0-0ubuntu3.3 in a
few hours, and then in the -proposed repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.  Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested and change the tag from
verification-needed-bionic to verification-done-bionic. If it does not
fix the bug for you, please add a comment stating that, and change the
tag to verification-failed-bionic. In either case, without details of
your testing we will not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

** Changed in: s390-tools (Ubuntu Bionic)
       Status: In Progress => Fix Committed

** Tags added: verification-needed verification-needed-bionic

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to s390-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1805841

Title:
  CPI information about kvm usage is lost during apt upgrade

Status in Ubuntu on IBM z Systems:
  In Progress
Status in s390-tools package in Ubuntu:
  Fix Released
Status in s390-tools source package in Bionic:
  Fix Committed
Status in s390-tools source package in Cosmic:
  In Progress
Status in s390-tools source package in Disco:
  Fix Released

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/cpi/system_level
  0x0000000000041200

  Note the 41200 digits, this is hex-encoded kernel version number. Can
  be different depending on the kernel in use

  $ sudo /lib/s390-tools/cpictl -b kvm
  $ cat /sys/firmware/cpi/system_level
  0x8000000000041200

  # Note the leading bit is now 0x8, instead of 0x0

  $ sudo systemctl daemon-reload
  $ cat /sys/firmware/cpi/system_level
  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/cpi/set: Permission denied

  0x0000000000040f00

  LINUX
  root at m83lp52:~# virsh start guest   # starting a guest does set the highest bit in
  /sys/firmware/cpi/system_leveln

  root at m83lp52:~# cat /sys/firmware/cpi/*
  cat: /sys/firmware/cpi/set: Permission denied

  0x8000000000040f00   <---- see the 8

  LINUX

  root at 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 at m83lp52:~# cat /sys/firmware/cpi/*
  cat: /sys/firmware/cpi/set: Permission denied
  18 04 1
  0x0000000000040f00
  UBUNTU
  LINUX

  The canonical place to handle /sys/firmware/cpi should be /lib/s390-tools/cpictl and /lib/systemd/system/cpi.service. So can we put the additional features (setting 18 04 1 and UBUNTU things also into
  /etc/sysconfig/cpi
  or
  /lib/s390-tools/cpictl
  )
  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/system-generators/s390-cpi-vars

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1805841/+subscriptions



More information about the foundations-bugs mailing list