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 does not print fw_au_status file in human-readable format #8926

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

Comments

@alexrallen
Copy link
Contributor

Description

When the fwutil update all command is run and it generates a fw_au_status file for tracking upgrade status, it does not create it in a human readable format. This is important because users are intended to reference this file to check the status of their firmware upgrades.

Steps to reproduce the issue:

  1. Setup platform_components.json
{
    "chassis": {
        "MSN2410": {
            "component": {
                "ONIE": {                },
                "SSD": {                },
                "BIOS": { },
                "CPLD1": {                         
                        "firmware": "/lib/firmware/CPLD_older.mpfa"
                },
                "CPLD2": { 
                        "firmware": "/lib/firmware/CPLD_older.mpfa"
                },
                "CPLD3": {
                        "firmware": "/lib/firmware/CPLD_older.mpfa"
                }
            }
        }
    }
}
  1. Run fwutil update all fw --boot=cold

Describe the results you received:

root@r-qa-sw-eth-21101:/home/admin# cat /var/platform/fw_au_status 
{"cold": [{"comp": "MSN2410/CPLD1", "status": false, "info": "err_others"}, {"comp": "MSN2410/CPLD3", "status": false, "info": "err_others"}]}

Status is referred to as "false" and info message is not useful for debugging. Would also much prefer pretty-printing the JSON so that it can be easily parsed when printed on a terminal screen.

Describe the results you expected:

{
    "MSN2700/BIOS":
        {
            "status": "updated",
            "from": "0ACLH004_02.02.007",
            "to": "0ACLH004_02.02.010",
            "info": "completed"
        },
    "MSN2700/SSD":
        {
            "status": "scheduled",
            "from": "4",
            "to": "5",
            "info": "installation scheduled for warm reboot"
        },
    "MSN2700/CPLD1":
        {
            "status": "skipped",
            "from": "5",
            "to": "10",
            "info": "warm reboot not supported for auto-update"
        }
    ]
}

This should be the response we get per the HLD. Informative and easy to read.

@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 I think it would be better to have readable fw_au_status but you can check update status using "fwutil show update status" to check the status(refer to https://github.com/Azure/SONiC/blob/master/doc/fwutil/fwutil.md)? can you use it for now to check the update status?

@alexrallen
Copy link
Contributor Author

For now, yes this is non-functional. However from a quality perspective we should have any output to the terminal be human readable.

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.
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
Triaged this issue has been triaged
Projects
None yet
Development

No branches or pull requests

4 participants