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

Question about "Test Watchdog Reset Via IPMI And Verify Using REST" in test general ipmi #2226

Open
Julia-Delta opened this issue Nov 13, 2023 · 5 comments
Assignees

Comments

@Julia-Delta
Copy link

Hi developers,
In this test item, I have two questions.

  1. 'ipmitool mc watchdog reset' failed.
    image
    As the above, I updated the image and test watch reset.
    But the system returned the result "Reset Watchdog Timer command failed: Attempt to reset uninitialized watchdog"
    The user had to set /xyz/openbmc_project/watchdog/host0/attr/Initialized be true then reset watchdog worked.
    In the robot framework:
Test Watchdog Reset Via IPMI And Verify Using REST
    [Documentation]  Test watchdog reset via IPMI and verify using REST.
    [Tags]  Test_Watchdog_Reset_Via_IPMI_And_Verify_Using_REST

    Initiate Host Boot
    Set Watchdog Enabled Using REST  ${1}
    Watchdog Object Should Exist

    # Resetting the watchdog via IPMI.
    Run IPMI Standard Command  mc watchdog reset

    # Verify the watchdog is reset using REST after an interval of 1000ms.
    Sleep  1000ms
    ${watchdog_time_left}=
    ...  Read Attribute  ${HOST_WATCHDOG_URI}  TimeRemaining
    Should Be True
    ...  ${watchdog_time_left}<${1200000} and ${watchdog_time_left}>${2000}
    ...  msg=Watchdog timer didn't reset.

These was no command to set Initialized be true.
How do I add the command which set initialized true?

  1. The watchdog_time_left needs to less than 1200000
    Watchdog default interval value is 3600000.
    I think that it's hard that watchdog_time_left to be less 1200 seconds after the interval reset and waited 1 second.

Should I modify the default interval as 1200000? Or I modify the comparison value be 3599000?

@gkeishin
Copy link
Member

For 1) Check https://github.com/openbmc/openbmc-test-automation/blob/master/lib/utils.robot#L1097 you can do something like that to set the attribute

  1. I believe you go ahead and modify it.. this hasn't changed since, so it's not updated and I believe your interval mentioned would be correct.

@gkeishin gkeishin self-assigned this Nov 14, 2023
@Julia-Delta
Copy link
Author

Thanks for your comment.

I have one more question.
Why does the test plan always set power policy be AlwaysOff before testing, and not reset to default value when finished?

@gkeishin
Copy link
Member

As far I remember when we started.. we always wanted it to be off by default. That power policy is ONLY driven by the AC cycle when applied to the system and doesn't come in any other use cases. Historically, we just wanted to set it to off which is by default anyway.

@Julia-Delta
Copy link
Author

Julia-Delta commented Nov 20, 2023

About power policy, Where can I find the spec or description about power policy setting?
I know that host will be power off after reboot when power policy set AlwaysOff.
But I confuse that testing run automatically, some test items wait rebooted successfully and check obmc state be good, How the test result will be passed when power policy is AlwaysOff?

I have another question about boot_progress in state management.
What is different between OSStart and OSRunning?
The co-worker thinks that boot_progress set OSStart and next step be OSRunning, Is it right description?
If the host state entering OSRunning state, auto-test checking will be always failed.

@gkeishin
Copy link
Member

  1. Power recovery policy https://github.com/openbmc/docs/blob/5ae481581052b996966ef4c3df18afb12b1fbda8/designs/power-recovery.md

  2. On the boot progress: https://github.com/openbmc/docs/blob/5ae481581052b996966ef4c3df18afb12b1fbda8/designs/boot-progress.md

and as for OSStart this are older REST legacy state.. we still need to go clean up upcoming .

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

No branches or pull requests

2 participants