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

Add PIT HLD document. #1014

Closed
wants to merge 3 commits into from
Closed

Add PIT HLD document. #1014

wants to merge 3 commits into from

Conversation

@clarklee-guizhao
Copy link
Collaborator Author

Test comments.

@zhufangbo
Copy link

test comments.


Platform plugins are intended to provide abstraction for device function, in order to test full functionality, we extend some APIs for testing purpose. Most of them are not intended to be used in a running deployment , they are defined to have fine grain test only. Extended/added plugins are as follow:

* device/$platform_name/plugins/sfputil.py
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to extend the platform APIs instead of extending the plugins? platform plugs are phased out, many platforms don't support them anymore.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, in phase 2 we may support platform APIs. Platform plugins is supported to back our massive deployment and a lot of users are still using platform plugins, that's why our first step extends plugins rather than platform APIs.

Copy link
Collaborator

Choose a reason for hiding this comment

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

would be good to clarify the plan in the document itself. Incremental deliverable is OK, but let's share the plan.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

would be good to clarify the plan in the document itself. Incremental deliverable is OK, but let's share the plan.

Thanks, I'll add it to HLD.


### 3.4.1 Test cases list generator

Test case list generator is used to generate a list of test cases, it parses users' input options, product specific platform configuration, and generate test case list from all test case database. This is used in the daily regression test and delivery test scenario.
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it possible to reuse the current test framework in the sonic-mgmt repositoty? If the new cases can be added there it will also benefit those who use the sonic-mgmt test cases as SONiC daily regression.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it's possible to add to sonic-mgmt repository, with some extra effort. Anyone want to take this piece of job is more than welcome.
As PIT is proposed to be used by ODM vendor in development and manufacturing stage, that's an early stage of a device lifecycle, it is designed to be a stand-alone component without sonic-mgmt test framework(it's much difficult to get sonic-mgmt deployed in these scenario, as we focus on a per device basis).

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree with Kebo. It's much easier to put the tests together.

I'm not following on why standalone test is difficult.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree with Kebo. It's much easier to put the tests together.

I'm not following on why standalone test is difficult.

The most important reason is ODM vendor cannot have access to SAI unless they pay extra money while we(users) have it, especially for new ASIC. In this situation, they cannot have the whole sonic running, this is a reality for most smaller ODM vendors.

Figure 3-4

Each test case has a configuration file, containing information such as test case name, description, type, and tag list.
Each platform has a platform configuration file, containing platform specific (product specific) information such as CPU architecture, boot loader, CPU error monitor capability, peripheral related information (e.g. FAN number, PSU control options, etc.).

Choose a reason for hiding this comment

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

Is there an example of the platform configuration file?

I am concerned that this will be yet another configuration file that platform vendors will have to generate and maintain when bringing platforms in to SONiC. Can the platform configuration be derived from already-existing platform configs?
https://github.com/Azure/sonic-buildimage/blob/master/device/dell/x86_64-dell_s6100_c2538-r0/platform.json is an example of an existing platform config.

There is also the PDDF feature that was contributed by Broadcom that provides structured platform config data as well. Example:
https://github.com/Azure/sonic-buildimage/blob/master/device/accton/x86_64-accton_as7712_32x-r0/pddf/pddf-device.json

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi Jeff,

Case configuration is for test case, not imply any implementation of the switch. an example of fan test case:
{
"name": "fan-test",
"description": "Check fan status",
"type": "auto",
"tags": ["manufacture", "delivery", "pa", "emc"]
}
As above, the fan test case is tagged with list, those tags are used to generate test case list for certain scenario. Like, "manufacture" means this case should be include in manufacturing test in manufacturing process.

PIT is totally different from PDDF/PDK stuff, PIT is a verify system.

@clarklee-guizhao
Copy link
Collaborator Author

@clarklee-guizhao
Copy link
Collaborator Author

@zhangyanzhao
Copy link
Collaborator

@clarklee-guizhao would you please add the code PRs by following example #806 ?

@prgeor
Copy link
Contributor

prgeor commented Nov 4, 2022

@clarklee-guizhao is this HLD presented in the community?

@prgeor prgeor self-assigned this Nov 4, 2022
@clarklee-guizhao
Copy link
Collaborator Author

@clarklee-guizhao is this HLD presented in the community?

Yes, this HLD was presented in June 2022, in 2 weekly meeings.

![](images/PIT_subsystem_overview.png)
Figure 2-1

PIT runs in SONiC variant(which is called D4OS, aka. Datacenter Development Diagnostic and Delivery OS, SONiC based, tailored to focus on the developing process of a switch product, co-develop by ODM and users, added users' tools for delivery process, system default configuation, etc). It can be deployed in 3 stage of a switch device developing time axis. Development stage and manufacturing stage which take place in ODM side. Delivery stage which happen on the IDC users. The verified hardware drivers can be added and run in the user SONiC system without changes.
Copy link
Collaborator

@lihuay lihuay Nov 21, 2022

Choose a reason for hiding this comment

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

Please avoid creating new brand names. -- I'm referring to the D4OS name

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @lihuay Thanks for the advise. So, should I change back to branch master and redo this PR?

Copy link
Collaborator

@lihuay lihuay Nov 22, 2022

Choose a reason for hiding this comment

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

yes, you need redo the PR against the master branch since the current PR is not for any branches.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, you need redo the PR against the master branch since the current PR is not for any branches.

Please check this PR, changed the branch to master.
#1127


In the blooming SONiC community, lots of users build their software on open hardware(especially white-box switches). As the devices hardware are built by ODM vendor, not end users (users' SONiC development team), it's necessary to have a systematic method to verify whether the hardware, firmware (such as CPLD, FPGA, BMC, BIOS) and their drivers meet the users' requirement. At this point, PIT system (Platform Integration Test) is introduced for this purpose.

PIT system could lighten up workload for both ODM and end-user because it not only automates hardware, firmware, driver verification efforts, but also it acheive this in a platform independent way, ias it provide a set of platform APIs to unify platform functions, so that hardware from different ODM have a unique view to the users. PIT is the first standard target to simplified SONiC porting on white-box switch in SONiC community. The simplified porting job may attract more and more user and ODM partners to join the SONiC community.
Copy link
Collaborator

Choose a reason for hiding this comment

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

by "lighten up", do you mean "reduce"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, reduce, it's more suitable.


In the blooming SONiC community, lots of users build their software on open hardware(especially white-box switches). As the devices hardware are built by ODM vendor, not end users (users' SONiC development team), it's necessary to have a systematic method to verify whether the hardware, firmware (such as CPLD, FPGA, BMC, BIOS) and their drivers meet the users' requirement. At this point, PIT system (Platform Integration Test) is introduced for this purpose.

PIT system could lighten up workload for both ODM and end-user because it not only automates hardware, firmware, driver verification efforts, but also it acheive this in a platform independent way, ias it provide a set of platform APIs to unify platform functions, so that hardware from different ODM have a unique view to the users. PIT is the first standard target to simplified SONiC porting on white-box switch in SONiC community. The simplified porting job may attract more and more user and ODM partners to join the SONiC community.
Copy link
Collaborator

Choose a reason for hiding this comment

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

ias it provide ==> as it provides?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hah, typo. I'll fix it. Thanks.


# Scope

This document describes a subsystem for Platform Integration Test, aka. PIT. PIT system concentrates on standardize and automate white-box switch hardware functionalities verification, along with their driver and firmware. As a result, it will be easier to port SONiC on a new white-box platform which is PIT-verified. Current scope covers all hardware components, such as CPU, memory, SSD, power system, fan, system sensors of various kind, and logical device firmware management, BMC subsystem etc.
Copy link
Collaborator

Choose a reason for hiding this comment

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

how does PIT compares to PMON? what is the problem in PMON that we are trying to address with PIT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@lihuay
That's a good question and I'm trying to summary it briefly as below:

Q1: PIT and PMON are different in several aspects.

  1. PIT is a tool while PMON is a monitoring daemon
    PIT is a tool for verification in the stage of development, manufacturing and acceptance test in delivery, it's not a running process(daemon) as PMON(regular container). PIT won't (and should not) be run the the stage of production.
  2. PIT run before production deployment while PMON runs in production
    PMON is created and works in the running stage for switch system without BMC, it is used for platform monitoring while PIT is not used as monitoring tool.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

how does PIT compares to PMON? what is the problem in PMON that we are trying to address with PIT?
@lihuay
The second question:
What issue PIT is addressing?

PIT is trying to solve 1 core issue: users tells the ODM partners how they verify the hardware+driver+firmware. In this way, both users and ODMs workloads are reduced as many duplicated requirement discussion, development detail(hardware+driver functionality, testing requirement) can be expressed by test logic(in codes).

Signed-off-by: Li Hua <guizhao.lh@alibaba-inc.com>
@clarklee-guizhao clarklee-guizhao closed this by deleting the head repository Nov 23, 2022
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.

7 participants