Skip to content

Conversation

@hdwhdw
Copy link
Contributor

@hdwhdw hdwhdw commented Jan 17, 2025

Description of PR

Summary:

This PR test the features in:
gNOI Cold Reboot #20709 - Adding the framework docker in the sonic-buildimage
gNOI Cold Reboot - Integrated Rebootbackend changes #20710 - rebootbackend process code inside the framework docker
gNOI Cold Reboot - Integrated tests #20711 - Unit tests for cold reboot in rebootbackend
gNOI Cold Reboot - Integrated gNOI repository #20712 - Adding gNOI submodule as a sub-dir inside framework
gNOI Cold Reboot - Integrated Docker and Makefile changes #20713 - Enabling framework docker and all Makefile changes
sonic-net/sonic-host-services#181 sonic-host-services changes for cold reboot
gNOI Reboot Frontend (gNMI)
gNOI Warm reboot - rebootbackend changes - Enabling warm reboot in rebootbackend process
gNOI warm reboot tests - Adding component tests for warm reboot
sonic-net/sonic-host-services#191 - sonic-host-services changes for warm reboot

Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@hdwhdw hdwhdw changed the title Add a testcase for reboot Add testcases for Reboot Jan 28, 2025
@hdwhdw hdwhdw requested a review from Copilot January 28, 2025 18:37
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

duthost = duthosts[rand_one_dut_hostname]

# Trigger reboot with invalid method
ret, msg = gnoi_request(duthost, localhost, "Reboot", '{"method": 2}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft qiluo-msft requested a review from vvolam January 31, 2025 22:32
pytest_assert(ret == 0, "System.Reboot API reported failure (rc = {}) with message: {}".format(ret, msg))
logging.info("System.Reboot API returned msg: {}".format(msg))

# Get reboot status
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get

Could you query telemetry OTHERS/proc/uptime to ensure the device was really rebooted recently?

Kanchana-HCLTech and others added 2 commits February 3, 2025 10:43
@mssonicbld
Copy link
Collaborator

/azp run

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 3, 2025

CLA Missing ID CLA Not Signed

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

pytest_assert("time" in msg_json, "System.Time API did not return time")


def test_gnoi_system_reboot(duthosts, rand_one_dut_hostname, localhost):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hdwhdw Since, all the tests are doing cold reboot, could you rename the tests accordingly to include the cold name? I plan to add similar tests for halt method testing as well.

rollback(duthost, SETUP_ENV_CP)
recover_cert_config(duthost)
# Get the skip_gnmi_check flag from duthost options
skip_gnmi_check = duthost.host.options.get('skip_gnmi_check', False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skip_gnmi_check

skip_gnmi_check -> skip_gnmi_reboot

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@hdwhdw hdwhdw closed this Mar 17, 2025
@hdwhdw hdwhdw deleted the reboot branch March 17, 2025 18:45
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

Successfully merging this pull request may close these issues.

5 participants