SW406771 - Duplicate FW ID or 2 BMC firmware active at the same time
====================================================================

* **Issue:** `SW407037 <https://w3.rchland.ibm.com/projects/bestquest/?defect=SW407037>`_
* **Reported:** 1740A (ibm-v1.99.10-0-r11-0-g9c65260)
* **Fixed:** 1742 or higher

**Issue:**

At some point after 1740A firmware, ``ibm-v1.99.10-0-r11-0-g9c65260``, the hashing algorithm to create the ID on the BMC was chagned by the Firmware team. This allows for the same firmware to potentially have two different IDs resulting in two active running BMC firmware.


**Work-around**

Upgrade from 1740A
------------------

If you are running 1740A, you will need to get two BMC firmware levels from your IBM representative.

This example will cover flashing from 1740A to 1742D, using 1742C as the recovery flash level.

#. Identify the issue where the IDs are not using the correct hash ::

    mid05tor12cn13: ID       Purpose State      Version
    mid05tor12cn13: -------------------------------------------------------
    mid05tor12cn13: 9e55358e BMC     Active(*)  ibm-v1.99.10-0-r11-0-g9c65260
    mid05tor12cn13: 6e71e1af BMC     Ready      ibm-v1.99.10-113-g65edf7d-r10-0-gcdf7635   <--- bad hash for 1742D

    mid05tor12cn16: ID       Purpose State      Version
    mid05tor12cn16: -------------------------------------------------------
    mid05tor12cn16: efc8a851 BMC     Ready      ibm-v1.99.10-113-g65edf7d-r10-0-gcdf7635   <--- correct hash for 1742D
    mid05tor12cn16: b48d27e1 BMC     Active(*)  ibm-v1.99.10-113-g65edf7d-r3-0-g9e4f715

#. Flash up to 1742D, activate and reboot:  ::

    mid05tor12cn13: ID       Purpose State      Version
    mid05tor12cn13: -------------------------------------------------------
    mid05tor12cn13: 9e55358e BMC     Active     ibm-v1.99.10-0-r11-0-g9c65260
    mid05tor12cn13: 221d9020 Host    Active(*)  IBM-witherspoon-redbud-ibm-OP9_v1.19_1.33
    mid05tor12cn13: 6e71e1af BMC     Active(*)  ibm-v1.99.10-113-g65edf7d-r10-0-gcdf7635   <--- bad hash, active
    mid05tor12cn13:

#. Flash down to 1742C, activate and reboot: ::

    mid05tor12cn13: ID       Purpose State      Version
    mid05tor12cn13: -------------------------------------------------------
    mid05tor12cn13: 9e55358e BMC     Active     ibm-v1.99.10-0-r11-0-g9c65260
    mid05tor12cn13: 221d9020 Host    Active(*)  IBM-witherspoon-redbud-ibm-OP9_v1.19_1.33
    mid05tor12cn13: 6e71e1af BMC     Active(*)  ibm-v1.99.10-113-g65edf7d-r10-0-gcdf7635
    mid05tor12cn13: f6590ce0 BMC     Active(+)  ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d    <--- 1742C
    mid05tor12cn13:

#. Delete the bad hash firmware: ``rflash <node> -d 6e71e1af``

   **Note:** This is optional because the BMC only allows 2 firmware max, so it would get pushed out.

#. Flash back up to 1742D (with correct hash), activate and reboot: ::

    mid05tor12cn13: ID       Purpose State      Version
    mid05tor12cn13: -------------------------------------------------------
    mid05tor12cn13: 221d9020 Host    Active(*)  IBM-witherspoon-redbud-ibm-OP9_v1.19_1.33
    mid05tor12cn13: efc8a851 BMC     Active(*)  ibm-v1.99.10-113-g65edf7d-r10-0-gcdf7635   <--- good hash
    mid05tor12cn13: f6590ce0 BMC     Active     ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d
    mid05tor12cn13:

Two active BMCs
---------------

If you have two active BMCs::

    [root@mgt03 ~]# rflash f7n02 -l
    f7n02: ID       Purpose State      Version
    f7n02: -------------------------------------------------------
    f7n02: b5273d71 BMC     Active(*)  ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d
    f7n02: 30ee1c48 Host    Active(*)  IBM-witherspoon-ibm-OP9_v1.19_1.112
    f7n02: 4f33e0f4 Host    Failed(+)  IBM-witherspoon-ibm-OP9_v1.19_1.109
    f7n02: f6590ce0 BMC     Active(*)  ibm-v1.99.10-113-g65edf7d-r8-0-g713d86d
    f7n02:

There's no way to de-activate one manually, recover by doing the following:

#. Flash the BMC to the previous level of the firmware and reboot BMC
#. Delete the duplicate firmware using ``rflash <node> -d <ID>``
#. Re-flash the BMC to the target level and reboot the BMC.
