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

Update BMC password will fail if inital password wasn't set #85

Open
Gal-Zaidman opened this issue Jun 2, 2024 · 3 comments
Open

Update BMC password will fail if inital password wasn't set #85

Gal-Zaidman opened this issue Jun 2, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Gal-Zaidman
Copy link
Member

In case we start with a brand new xPU with the inital password (for example after factory reset [1]) the role would fail and BMC password won't be set.
The reason is because of the redfish collection module implementation, it crawls on the URL path.
For example, if you try to PATCH https:///redfish/v1/AccountService/Accounts/root
then it will first do GET for:
https:///redfish/v1/AccountService/
https:///redfish/v1/AccountService/Accounts/
https:///redfish/v1/AccountService/Accounts/root

Because the inital password wasn't set then you won't be able to do GET for https://<DPU-BMC-IP>/redfish/v1/AccountService/ and the entire role would fail.

Suggested workaround:

  • For this role use CURL
  • Work with Ansible redfish collection to allow skipping the path validation, this is required for scalability as well (issue we talked about in the past)
  • Track the workaround removal

image

[1]
https://docs.nvidia.com/networking/display/bluefieldbmcv2404/bmc+management#src-2821766407_BMCManagement-FactoryResetRedfishCommand
https://docs.nvidia.com/networking/display/bluefieldbmcv2404/bmc+management#src-2821766407_BMCManagement-FactoryResetIPMICommand

@glimchb glimchb added the bug Something isn't working label Jul 16, 2024
@glimchb
Copy link
Member

glimchb commented Jul 16, 2024

documenting what I get for the first time

$ curl -k -u "root:0penBmc"  https://172.22.4.2/redfish/v1/AccountService
{
  "@Message.ExtendedInfo": [
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The password provided for this account must be changed before access is granted.  PATCH the Password property for this account located at the target URI '/redfish/v1/AccountService/Accounts/root' to complete this process.",
      "MessageArgs": [
        "/redfish/v1/AccountService/Accounts/root"
      ],
      "MessageId": "Base.1.15.0.PasswordChangeRequired",
      "MessageSeverity": "Critical",
      "Resolution": "Change the password for this account using a PATCH to the Password property at the URI provided."
    }
  ]
}

got this after factory reset

$ curl -s -k -u "root:123456" -X POST -H "Content-Type: application/json" -d '{"ResetToDefaultsType": "ResetAll"}' https://172.22.4.2/redfish/v1/Managers/Bluefield_BMC/Actions/Manager.ResetToDefaults
{
  "@Message.ExtendedInfo": [
    {
      "@odata.type": "#Message.v1_1_1.Message",
      "Message": "The request completed successfully.",
      "MessageArgs": [],
      "MessageId": "Base.1.15.0.Success",
      "MessageSeverity": "OK",
      "Resolution": "None"
    }
  ]
}

@glimchb
Copy link
Member

glimchb commented Jul 17, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants