Skip to content

Add loganalyzer for sairedis for advanced reboot tests#3378

Merged
shi-su merged 6 commits intosonic-net:masterfrom
shi-su:analyzer
Apr 27, 2021
Merged

Add loganalyzer for sairedis for advanced reboot tests#3378
shi-su merged 6 commits intosonic-net:masterfrom
shi-su:analyzer

Conversation

@shi-su
Copy link
Contributor

@shi-su shi-su commented Apr 21, 2021

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

How did you do it?

Add loganalyzer for sairedis for advanced reboot tests to gather information about the time the device enters different states in fast/warm reboot.

How did you verify/test it?

Tested locally and check the time for each state:

{
    "Services": {
        "bgp": {
            "timestamp": {
                "Stopping": "Apr 23 21:58:52.955303", 
                "Starting": "Apr 23 22:00:12.362430", 
                "Stopped": "Apr 23 21:58:59.164886", 
                "Started": "Apr 23 22:00:14.106322"
            }, 
            "start_time": 1.743892, 
            "stop_time": 6.209583, 
            "reboot_time": 74.941436
        }, 
        "radv": {
            "timestamp": {
                "Stopping": "Apr 23 21:58:52.206894", 
                "Starting": "Apr 23 22:00:17.860428", 
                "Stopped": "Apr 23 21:58:52.919687", 
                "Started": "Apr 23 22:00:19.533290"
            }, 
            "start_time": 1.672862, 
            "Stopping count": 2, 
            "stop_time": 0.712793, 
            "reboot_time": 86.613603
        }, 
        "longest_downtime": 150.668403, 
        "total_downtime": "N/A", 
        "teamd": {
            "timestamp": {
                "Stopping": "Apr 23 21:59:12.966736", 
                "Starting": "Apr 23 22:00:15.975674", 
                "Stopped": "Apr 23 21:59:19.739232", 
                "Started": "Apr 23 22:00:17.385416"
            }, 
            "start_time": 1.409742, 
            "stop_time": 6.772496, 
            "reboot_time": 57.646184
        }, 
        "gbsyncd": {
            "timestamp": {
                "Stopping": "Apr 23 21:59:34.710807", 
                "Starting": "Apr 23 22:00:15.972795", 
                "Stopped": "Apr 23 21:59:35.435963", 
                "Started": "Apr 23 22:00:17.588242"
            }, 
            "start_time": 1.615447, 
            "stop_time": 0.725156, 
            "reboot_time": 42.152279
        }, 
        "syncd": {
            "timestamp": {
                "Stopping": "Apr 23 21:59:19.778560", 
                "Starting": "Apr 23 22:00:15.976602", 
                "Stopped": "Apr 23 21:59:31.518727", 
                "Started": "Apr 23 22:00:17.784502"
            }, 
            "start_time": 1.8079, 
            "stop_time": 11.740167, 
            "reboot_time": 46.265775
        }, 
        "swss": {
            "timestamp": {
                "Stopping": "Apr 23 21:59:09.799595", 
                "Starting": "Apr 23 22:00:14.143509", 
                "Stopped": "Apr 23 21:59:10.910408", 
                "Started": "Apr 23 22:00:15.937556"
            }, 
            "start_time": 1.794047, 
            "stop_time": 1.110813, 
            "reboot_time": 65.027148
        }, 
        "reboot_time": 149.513459
    }, 
    "sairedis_state": {
        "default_route_set": {
            "timestamp": {
                "Started": "Apr 23 22:00:41.501188"
            }
        }, 
        "sai_switch_create": {
            "timestamp": {
                "Started": "Apr 23 22:00:27.838804", 
                "Stopped": "Apr 23 22:00:27.840236"
            }, 
            "time": 0.001432
        }
    }
}

Any platform specific information?

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

Documentation

Copy link
Contributor

@vaibhavhd vaibhavhd left a comment

Choose a reason for hiding this comment

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

It would be great if we can generalize the LogAnalyzer to support argument based log type grepping.
For example, here analyze_sairedis is added. But, in future this can grow to many different flags.
To prevent that, if we the caller can specify what files need to be analyzed, this would be useful for several other usecases.

@shi-su shi-su marked this pull request as ready for review April 22, 2021 00:27
@shi-su shi-su requested review from a team and jleveque as code owners April 22, 2021 00:27
Copy link
Contributor

@vaibhavhd vaibhavhd left a comment

Choose a reason for hiding this comment

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

Looking good. Some refactoring suggestions added. Suggest to test another unrelated test which uses log_analyzer, to make sure that there is no regression.

Copy link
Contributor

@vaibhavhd vaibhavhd left a comment

Choose a reason for hiding this comment

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

Lgtm, thanks for this useful enhancement!

@shi-su shi-su merged commit 4fd923e into sonic-net:master Apr 27, 2021
saravanansv pushed a commit to saravanansv/sonic-mgmt that referenced this pull request May 6, 2021
Add loganalyzer for sairedis for advanced reboot tests to gather information about the time the device enters different states in fast/warm reboot.
bingwang-ms pushed a commit to bingwang-ms/sonic-mgmt that referenced this pull request Aug 18, 2021
We are migrating from Jenkins to azure pipeline. This PR added azure pipeline yaml files and dependent template files for nightly tests. Pipeline yaml files only added for 3 testbeds yet. The pipelines were originally added to branch azp-test of repo https://dev.azure.com/mssonic/internal/_git/sonic-mgmt-int. They have been tested on Azure DevOps.

Now we formally add these pipelines to the Networking-acs-sonic-mgmt repo. Currently the internal branch of Networking-acs-sonic-mgmt is synched to same internal branch of the sonic-mgmt-int repo. After this PR is merged, we need to update configuration of the created pipelines to formally use these files from the internal branch.

If the pipelines work fine with yaml files from internal branch, we will create more pipeline files based on current templates for rest of the nightly testbeds.

Related work items: sonic-net#3021, sonic-net#3073, sonic-net#3135, sonic-net#3153, sonic-net#3162, sonic-net#3176, sonic-net#3238, sonic-net#3241, sonic-net#3346, sonic-net#3352, sonic-net#3378, sonic-net#3389, sonic-net#3395, sonic-net#3397, sonic-net#3398, sonic-net#3407, sonic-net#3410, sonic-net#3411, sonic-net#3412, sonic-net#3413, sonic-net#3414, sonic-net#3415, sonic-net#3434, sonic-net#3437, sonic-net#3445, sonic-net#3446, sonic-net#3447, #9740131, #9821349
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
Add loganalyzer for sairedis for advanced reboot tests to gather information about the time the device enters different states in fast/warm reboot.
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.

2 participants