Skip to content

Validate createSwitchTimeout is a positive integer - #4898

Open
subharam-cisco wants to merge 1 commit into
sonic-net:masterfrom
subharam-cisco:switch_create
Open

subharam-cisco wants to merge 1 commit into
sonic-net:masterfrom
subharam-cisco:switch_create

Conversation

@subharam-cisco

Copy link
Copy Markdown

What I did
In orchagent main.cpp, -t is applied only when the parsed timeout is > 0. Invalid values are ignored, create_switch_timeout stays 0, and we log an error.

Why I did it
Review sonic-net/sonic-buildimage#28911 asked for validation of malformed/negative -t. createSwitchTimeout comes from per-HWSKU sai.profile; a bad value should not change switch-create behavior.

How I verified it
On Cisco, validated applying valid (150) and invalid (-1) values with syslog.

Details if related

Signed-off-by: Subhasri-Ramasamy <subharam@cisco.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks!

---Powered by SONiC BuildBot

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