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

[OpenBMC] Enable function to trigger BMC dumps #4235

Closed
whowutwut opened this issue Nov 2, 2017 · 6 comments
Closed

[OpenBMC] Enable function to trigger BMC dumps #4235

whowutwut opened this issue Nov 2, 2017 · 6 comments

Comments

@whowutwut
Copy link
Member

whowutwut commented Nov 2, 2017

As we start looking at ways to capture dump to debug issues with the BMC, there's a dump API: https://github.com/openbmc/phosphor-dbus-interfaces/tree/master/xyz/openbmc_project/Dump

However, the API is lacking some information. Externally, from xCAT, we have the following things that we would want to do:

  • List available dumps
    curl -c cjar -b cjar -k https://<BMC_IP>/xyz/openbmc_project/dump/list
    
  • Manually trigger a generation of a dump
    curl -c cjar -b cjar -k -H "Content-Type: application/json" -d "{\"data\": []}" \
    -X POST  https://<BMC_IP>/xyz/openbmc_project/dump/action/CreateDump
    
  • Download the dump
    curl -O -J -c cjar -b cjar -k -X GET https://<BMC_IP>/download/dump/<ID>
    
  • Clear the dumps from the BMC
    • Single
      curl -c cjar -b cjar -k -H "Content-Type: application/json" -d "{\"data\": []}" \
      -X POST  https://<BMC_IP>/xyz/openbmc_project/dump/entry/<ID>/action/Delete
      
    • All
      curl -c cjar -b cjar -k -H "Content-Type: application/json" -d "{\"data\": []}" \
      -X POST  https://<BMC_IP>/xyz/openbmc_project/dump/action/DeleteAll
      

Suggested xCAT Externals:

  • List: rspconfig <noderange> dump --list
  • Generate: rspconfig <noderange> dump --generate
  • Download: rspconfig <noderange> dump --download <ID>
  • Clear
    • single: rspconfig <noderange> dump -clear <id>
    • all: rspconfig <noderange> dump -clear all

When we download, openbmc names it the following: obmcdump_<ID>_<Elapsed Time>.tar.xz, So already we will have issues scaling this out and identifying which BMC this file comes from.

Create some use cases and will open questions to OpenBMC team...

Use Case 1:
As an administrator, I detect issues on 100 BMCs and I'd like to generate and capture the dump across all these BMCs...

@whowutwut
Copy link
Member Author

Some more ideas... If nothing changes in the request to openbmc team, we could do the following:

  • Store dumps in /var/log/xcat/openbmc/dump/<hostname> and to retrieve the latest dump, we just enumarate or list out and take the last ID and retrieve it.
  • Process can be recommended to the admin to
    1. Clear all dump
    2. generate a new one
    3. keep listing until we see all the nodes return ID=1
    4. get all at ID=1 (still need to put them into it's own directory to avoid duplicate naming)

@whowutwut
Copy link
Member Author

On a create, we do get the ID for the dump, but this means we have to block on it and store the ID...

[root@mgt03 p9]# ./create_dump.sh 
++ curl -c cjar -b cjar -k -H 'Content-Type: application/json' -d '{"data": []}' -X POST https://192.168.74.172/xyz/openbmc_project/dump/action/CreateDump
{
  "data": 4, 
  "message": "200 OK", 
  "status": "ok"
}

But it is possible..

@whowutwut
Copy link
Member Author

To resolve the file naming issue, we could pass the output file using Curl , suggested by FW team.

curl http://foo/bar -o local_file_name_i_want

@whowutwut
Copy link
Member Author

whowutwut commented Nov 10, 2017

@xuweibj It might be nice to also get function as you are doing development, and break it into smaller pull request, to first list out the dumps and create it, I can review and merge and provide feedback as we go...

I'm doing debug right now so any issue that I open I will send the openbmc team the dump file... , I can run the list command and see how it compares to the rest API manually creating it.

For example the date presentation, the API only show the value since epoch time so it's not user friendly.

@zet809
Copy link

zet809 commented Nov 20, 2017

Hi, @whowutwut , do you think we can close this task and open a new one for a more user-friendly interface for dump?

@whowutwut
Copy link
Member Author

Ok, sure, let me open another issue since this one really is enabling dump function from xCAT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants