Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fwutil update all cannot be run consecutively #8928

Open
alexrallen opened this issue Oct 8, 2021 · 4 comments
Open

fwutil update all cannot be run consecutively #8928

alexrallen opened this issue Oct 8, 2021 · 4 comments
Assignees
Labels
MSFT Triaged this issue has been triaged

Comments

@alexrallen
Copy link
Contributor

Description

When fwutil update all fw --boot=none it creates a /var/platform/fw_au_status which remains even after the firmware is installed. On each subsequent execution of fwutil update all it detects the existence of this file and bails out.

This also occurs on all unsuccessful firmware installs, the fw_au_status file must be deleted manually to proceed.

Steps to reproduce the issue:

  1. Setup platform_components.json
{
    "chassis": {
        "MSN2410": {
            "component": {
                "ONIE": {
                        "firmware": "/lib/firmware/onie-updater-2021.05-5.3.0006-115200",
                        "version": "2020.11-5.3.0005"
                },
                "SSD": {
                },
                "BIOS": { },
                "CPLD1": { },
                "CPLD2": { },
                "CPLD3": { }
            }
        }
    }
}
  1. Run fwutil update all fw --boot=none
  2. Run fwutil update all fw --boot=warm

Describe the results you received:

root@r-qa-sw-eth-21101:/home/admin# fwutil update all fw --boot=none
Firmware auto-update for boot_type none is allowed
MSN2410/ONIE firmware auto-update starting: /lib/firmware/onie-updater-newer with boot_type none
MSN2410/ONIE firmware auto-update status return_code: -1
Warning: All firmware auto-update has been performed.
All firmware auto-update has been performed
root@r-qa-sw-eth-21101:/home/admin# 
root@r-qa-sw-eth-21101:/home/admin# fwutil update all fw --boot=warm
/var/platform/fw_au_status firmware auto-update is already performed, warm firmware auto update is not allowed any more
root@r-qa-sw-eth-21101:/home/admin# cat /var/platform/fw_au_status 
{
   "none":[
      {
         "comp":"MSN2410/ONIE",
         "status":true,
         "info":"err_boot_type"
      }
   ]
}

Describe the results you expected:

We expect not to have to manually delete fw_au_status or at least to have clear instructions to do so in the event a stale file is left over.

@dgsudharsan
Copy link
Collaborator

@sujinmkang FYI

@zhangyanzhao zhangyanzhao added the Triaged this issue has been triaged label Oct 13, 2021
@sujinmkang
Copy link
Collaborator

@alexrallen originally it is designed to prevent from another fwutil all if there is already 'fwutil all' ran for a different reboot type.
But I agree to allow another 'fwutil all' for different reboot type if the first fwutil all call is for none.

qiluo-msft pushed a commit to sonic-net/sonic-utilities that referenced this issue Apr 29, 2022
…ot fw update (#2040)

sonic-net/sonic-buildimage#8928
sonic-net/sonic-buildimage#8926
sonic-net/sonic-buildimage#8925
sonic-net/sonic-buildimage#8924

#### What I did
Allow fwutil update all for other boot type if any previous fw update done for "none" boot type

#### How I did it
Allow fwutil update all for other boot type if any previous fw update done for "none" boot type

#### How to verify it
1. Run fwutil update all for boot_type="none"
2. Run fwutil update all for any other boot_type
3. Verify if the 2nd update is proceeded.
judyjoseph pushed a commit to sonic-net/sonic-utilities that referenced this issue May 2, 2022
…ot fw update (#2040)

sonic-net/sonic-buildimage#8928
sonic-net/sonic-buildimage#8926
sonic-net/sonic-buildimage#8925
sonic-net/sonic-buildimage#8924

#### What I did
Allow fwutil update all for other boot type if any previous fw update done for "none" boot type

#### How I did it
Allow fwutil update all for other boot type if any previous fw update done for "none" boot type

#### How to verify it
1. Run fwutil update all for boot_type="none"
2. Run fwutil update all for any other boot_type
3. Verify if the 2nd update is proceeded.
@alexrallen alexrallen reopened this May 11, 2022
@alexrallen
Copy link
Contributor Author

@sujinmkang During testing we discovered that this issue has not been completely resolved (my fault for not catching this during the PR review).

sonic-net/sonic-utilities#2040 only fixed the case of using --boot none we also see this issue anytime a firmware install fails.

i.e. If you attempt to install firmwares that can only be installed by a cold reboot but you pass the --boot warm flag then the install will (correctly) fail and create a fw_au_status file. Any subsequent installation attempts will fail due to the presence of that file. This is not desired behavior as there should not be any user intervention necessary to re-attempt the install with the correct boot type.

Perhaps augment the logic you have added here in the above PR
https://github.com/Azure/sonic-utilities/pull/2040/files#diff-241959edd76c39dcd4dfc3a6f07416039c62cc17b9ab1c255e87cd301073e12eR909

@zhangyanzhao
Copy link
Collaborator

@sujinmkang can you please help to provide an update on this issue? Thanks.

malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this issue Aug 3, 2023
…ot fw update (#2040)

sonic-net/sonic-buildimage#8928
sonic-net/sonic-buildimage#8926
sonic-net/sonic-buildimage#8925
sonic-net/sonic-buildimage#8924

#### What I did
Allow fwutil update all for other boot type if any previous fw update done for "none" boot type

#### How I did it
Allow fwutil update all for other boot type if any previous fw update done for "none" boot type

#### How to verify it
1. Run fwutil update all for boot_type="none"
2. Run fwutil update all for any other boot_type
3. Verify if the 2nd update is proceeded.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MSFT Triaged this issue has been triaged
Projects
None yet
Development

No branches or pull requests

4 participants