[LTCTest][opal][FW840] Firmware updation using update_flash -f option does not work when kexec.service is running

Bug #1491063 reported by bugproxy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
powerpc-ibm-utils (Ubuntu)
Fix Released
High
Adam Conrad

Bug Description

---Problem Description---
Firmware updation using update_flash -f option does not work when kexec.service is running

---uname output---
Linux p824l 4.1.0-1-generic #1-Ubuntu SMP Mon Jul 20 19:37:16 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux

Machine Type = P8

---Steps to Reproduce---
Install a P8 PowerNV 8247-42L Hardware with Ubuntu 15.10.
Then I am trying to update the firmware with update_flash tool.

root@p824l:~# /etc/init.d/kdump-tools status
? kdump-tools.service - Kernel crash dump capture service
   Loaded: loaded (/lib/systemd/system/kdump-tools.service; enabled; vendor preset: enabled)
   Active: active (exited) since Thu 2015-07-23 01:42:42 CDT; 1min 33s ago
  Process: 4128 ExecStart=/etc/init.d/kdump-tools start (code=exited, status=0/SUCCESS)
 Main PID: 4128 (code=exited, status=0/SUCCESS)

Jul 23 01:42:41 p824l kdump-tools[4128]: Starting kdump-tools: Modified cmdline:root=UUID=287d4c41-6900-46fd-bf28-9a2da94bfbff ro quiet splash 3 ...r=155520K
Jul 23 01:42:41 p824l kdump-tools[4128]: segment[0].mem:0x8000000 memsz:24969216
Jul 23 01:42:41 p824l kdump-tools[4128]: segment[1].mem:0x97d0000 memsz:65536
Jul 23 01:42:41 p824l kdump-tools[4128]: segment[2].mem:0x97e0000 memsz:65536
Jul 23 01:42:41 p824l kdump-tools[4128]: segment[3].mem:0x97f0000 memsz:65536
Jul 23 01:42:41 p824l kdump-tools[4128]: segment[4].mem:0x9800000 memsz:24182784
Jul 23 01:42:41 p824l kdump-tools[4128]: segment[5].mem:0x2ffa0000 memsz:393216
Jul 23 01:42:42 p824l kdump-tools[4128]: * loaded kdump kernel
Jul 23 01:42:42 p824l kdump-tools[4153]: /sbin/kexec -p --args-linux --command-line="root=UUID=287d4c41-6900-46fd-bf28-9a2da94bfbff ro quiet spla...1-generic
Jul 23 01:42:42 p824l systemd[1]: Started Kernel crash dump capture service.
Hint: Some lines were ellipsized, use -l to show in full.

root@p824l:~# /etc/init.d/kexec status
? kexec.service - LSB: Execute the kexec -e command to reboot system
   Loaded: loaded (/etc/init.d/kexec)
   Active: active (exited) since Thu 2015-07-23 01:40:14 CDT; 4min 8s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3660 ExecStart=/etc/init.d/kexec start (code=exited, status=0/SUCCESS)

Jul 23 01:40:14 p824l systemd[1]: Starting LSB: Execute the kexec -e command to reboot system...
Jul 23 01:40:14 p824l systemd[1]: Started LSB: Execute the kexec -e command to reboot system.

root@p824l:~# uname -a
Linux p824l 4.1.0-1-generic #1-Ubuntu SMP Mon Jul 20 19:37:16 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux

root@p824l:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="15.10 (Wily Werewolf)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu Wily Werewolf (development branch)"
VERSION_ID="15.10"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

root@p824l:~# update_flash -f 01SV840_020_020.img
info: Current Temporary side will be committed to
Permanent side before being replaced with the new
image.

Projected Flash Update Results:
Current T Image: SV840_019
Current P Image: SV840_016
New T Image: SV840_020
New P Image: SV840_019

FLASH: Image ready...rebooting the system...
FLASH: This will take several minutes.
FLASH: Do not power off!
PolicyKit daemon disconnected from the bus.
We are no longer a registered authentication agent.
login as: ubuntu
ubuntu@9.70.88.203's password:
Access denied
ubuntu@9.70.88.203's password:
Welcome to Ubuntu Wily Werewolf (development branch) (GNU/Linux 4.1.0-1-generic ppc64le)

 * Documentation: https://help.ubuntu.com/

  System information as of Thu Jul 23 01:46:28 CDT 2015

  System load: 0.49 Processes: 979
  Usage of /: 1.0% of 1004.84GB Users logged in: 0
  Memory usage: 0% IP address for enP3p9s0f0: 9.70.88.203
  Swap usage: 0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

Last login: Thu Jul 23 01:40:47 2015 from pavsubra.in.ibm.com

Userspace tool common name: /usr/sbin/update_flash

The userspace tool has the following bit modes: 64-bit

Workaround:

In the mean time, you can stop kdump service and do the FW update.. That should work ..

Sample output with patch:
----------------------------------------

 ./update_flash -v -f /home/hegdevasant/01SV840_032_032.img
info: Current fixpack level is unknown.

Projected Flash Update Results:
Current T Image: UNKNOWN
Current P Image: SV840_031
New T Image: SV840_032
New P Image: SV840_031

info: kexec service is running. It will be stopped before flashing.

./update_flash -f /home/hegdevasant/01SV840_032_032.img
info: Current fixpack level is unknown.

Projected Flash Update Results:
Current T Image: UNKNOWN
Current P Image: SV840_031
New T Image: SV840_032
New P Image: SV840_031

FLASH: Image ready...rebooting the system...
FLASH: This will take several minutes.
FLASH: Do not power off!

info: kexec service stopped.

Revision history for this message
bugproxy (bugproxy) wrote : [PATCH] Stop kexec service before flashing

Default Comment by Bridge

tags: added: architecture-ppc64le bugnameltc-127957 severity-critical targetmilestone-inin1510
Luciano Chavez (lnx1138)
affects: ubuntu → powerpc-ibm-utils (Ubuntu)
Changed in powerpc-ibm-utils (Ubuntu):
assignee: nobody → Taco Screen team (taco-screen-team)
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2015-09-11 10:46 EDT-------
Hello Canonical,

All the patches are accepted in upstream.. Please pull below three patches..

[We have launchpad bug #1491063 for 15.04 series.]

commit 546174be41c74894126414515644888ed8b31584
Author: Vasant Hegde <email address hidden>
Date: Wed Sep 2 10:23:21 2015 -0400

update_flash: Fix bad variable issue
Shells like dash throws error if we try to assign string with space
without double quote. ex:
local bug=ML FW830.00 FW830.00
Sample output without this patch:
update_flash -f 01SV840_016_016.img
/usr/sbin/update_flash: 185: local: FW830.00: bad variable name

commit 62dc6d38de177588f205e01cec15b93b3e2b9a30
Author: Vasant Hegde <email address hidden>
Date: Wed Sep 2 10:26:23 2015 -0400

update_flash: Stop kexec service before starting firmware update
We run 'reboot' call before initiating firmware update. If kexec service
is enabled, then we endup booting into new kernel instead of starting
firmware update.
This patch validates kexec service and if required stops this service
before starting code update.

commit 8ff5144da07985cd84508465007f9031840d4ecd
Author: Vasant Hegde <email address hidden>
Date: Tue Sep 8 11:33:24 2015 -0400

update_flash: Stop kexec service before starting firmware update on PowerVM LPAR
We run 'reboot' call before initiating firmware update. If kexec service
is enabled, then we endup booting into new kernel instead of starting
firmware update.
Commit 62dc6d38 fix this issue on PowerNV platform.. but missed to fix
PowerVM LPAR. This patch fixes above described issue on PowerVM LPAR.
Signed-off-by: Vasant Hegde <email address hidden>

-Vasant

Steve Langasek (vorlon)
Changed in powerpc-ibm-utils (Ubuntu):
assignee: Taco Screen team (taco-screen-team) → Adam Conrad (adconrad)
status: New → Triaged
milestone: none → ubuntu-15.10
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package powerpc-ibm-utils - 1.2.26-2

---------------
powerpc-ibm-utils (1.2.26-2) unstable; urgency=medium

  * bad_variable.patch: Add extra quoting to update_flash (LP: #1491977)
  * stop_kexec_nv.patch: Stop kexec before starting flash (LP: #1491063)
  * stop_kexec_vm.patch: Likewise, but also do it for PowerVM platforms.

 -- Adam Conrad <adconrad@0c3.net> Thu, 15 Oct 2015 21:46:32 -0600

Changed in powerpc-ibm-utils (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2015-10-28 06:51 EDT-------
(In reply to comment #18)
> This bug was fixed in the package powerpc-ibm-utils - 1.2.26-2
>

Adam,

> ---------------
> powerpc-ibm-utils (1.2.26-2) unstable; urgency=medium
>
> * bad_variable.patch: Add extra quoting to update_flash (LP: #1491977)
> * stop_kexec_nv.patch: Stop kexec before starting flash (LP: #1491063)
> * stop_kexec_vm.patch: Likewise, but also do it for PowerVM platforms.

Can you please confirm that you have updated 15.04 and 14.04.03 series as well?

-Vasant

Revision history for this message
bugproxy (bugproxy) wrote : [PATCH] Stop kexec service before flashing

Default Comment by Bridge

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.