Skip to content

Added HLD for Console Monitor Service#2178

Merged
lizhijianrd merged 6 commits into
sonic-net:masterfrom
wiperi:cliffchen/submit/console-monitor-hld
May 9, 2026
Merged

Added HLD for Console Monitor Service#2178
lizhijianrd merged 6 commits into
sonic-net:masterfrom
wiperi:cliffchen/submit/console-monitor-hld

Conversation

@wiperi
Copy link
Copy Markdown
Contributor

@wiperi wiperi commented Jan 12, 2026

The console monitor service provides real-time automatic detection of link Oper state, enabling observability for serial connections and allowing users to monitor link health status instantly.

Description Repo PR title State
Implement design in sonic-host-services sonic-host-services Console Monitor Service Merged
Support CLI commands in sonic-utilities sonic-utilities Console Monitor CLI support Merged
YANG model change in sonic-buildimage sonic-buildimage Console Monitor YANG model Merged
Add dependency to sonic-buildimage sonic-buildimage Console Monitor build dependency Merged
Publish test plan in sonic-mgmt sonic-mgmt Add Console-Monitor-Test-Plan.md by wiperi · Pull Request #22127 · sonic-net/sonic-mgmt Merged
Implement test in sonic-mgmt sonic-mgmt test(console-monitor): add oper_state transition test by wiperi · Pull Request #22137 · sonic-net/s… Merged

Signed-off-by: cliffchen <t-cliffchen+github@microsoft.com>
@wiperi wiperi force-pushed the cliffchen/submit/console-monitor-hld branch from efe559d to 21ccf51 Compare January 12, 2026 08:34
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

wiperi added a commit to wiperi/sonic-host-services that referenced this pull request Jan 18, 2026
- This is the implementation of HLD doc: sonic-net/SONiC#2178

Signed-off-by: cliffchen <t-cliffchen+github@microsoft.com>
- update duration foramt in cli example
- update oper_state to Up / Unknown

Signed-off-by: cliffchen <t-cliffchen+github@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

Signed-off-by: cliffchen <t-cliffchen+github@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

wiperi added a commit to wiperi/sonic-buildimage that referenced this pull request Jan 20, 2026
Why I did it

This PR supports [HLD](sonic-net/SONiC#2178)

To support controlled_device attribute in CONSOLE_SWITCH table to enable/disable the controlled device feature on SONiC console switch.

Sample config:

    "CONSOLE_SWITCH": {
        "console_mgmt": {
            "enabled": "yes"
        },
        "controlled_device": {
            "enabled": "yes"
        }
    }

How I did it
Update Yang model for sonic-console and add corresponding unit tests:
- Added controlled_device container in CONSOLE_SWITCH
- Added test cases for default value verification
- Added test cases for valid configuration
- Added test cases for invalid pattern detection

How to verify it
Verified by unit test.

Signed-off-by: cliffchen <t-cliffchen+github@microsoft.com>

#### 3.3.3 Oper State Determination

![ConsoleMonitorOperStateTransition](ConsoleMonitorOperStateTransition.png)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This link is outdated, need to update.
And the folder name has a typo, a missing n in word Design.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

* If not in frame: flush buffer as user data
* If in frame: frame is incomplete, discard buffer contents
* Exit in-frame state

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you provide a table to show the timeout for commonly used band-rate?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Signed-off-by: cliffchen <t-cliffchen+github@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

Signed-off-by: cliffchen <t-cliffchen+github@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

Signed-off-by: cliffchen <t-cliffchen+github@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

@lizhijianrd lizhijianrd merged commit 380509d into sonic-net:master May 9, 2026
2 checks passed
lizhijianrd pushed a commit to sonic-net/sonic-host-services that referenced this pull request May 11, 2026
- This is the implementation of HLD doc: sonic-net/SONiC#2178

---------

Signed-off-by: cliffchen <t-cliffchen+github@microsoft.com>
yejianquan pushed a commit to sonic-net/sonic-buildimage that referenced this pull request May 11, 2026
Why I did it

This PR supports [HLD](sonic-net/SONiC#2178)

To support controlled_device attribute in CONSOLE_SWITCH table to enable/disable the controlled device feature on SONiC console switch.

Sample config:

    "CONSOLE_SWITCH": {
        "console_mgmt": {
            "enabled": "yes"
        },
        "controlled_device": {
            "enabled": "yes"
        }
    }

How I did it
Update Yang model for sonic-console and add corresponding unit tests:
- Added controlled_device container in CONSOLE_SWITCH
- Added test cases for default value verification
- Added test cases for valid configuration
- Added test cases for invalid pattern detection

How to verify it
Verified by unit test.

Signed-off-by: cliffchen <t-cliffchen+github@microsoft.com>
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.

3 participants