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

[ycabled][active-active] no initialize Async Client, when no active-active cable type; fix names for all ycabled threads #373

Merged
merged 15 commits into from
Jul 7, 2023

Conversation

vdahiya12
Copy link
Contributor

@vdahiya12 vdahiya12 commented Jun 6, 2023

This PR intends to not start sonic-ycabled's Asynchronous client, when there is no active-active cable type.
The Problem that we encounter is ycabled expects all threads to be working/running state all the time.
Since there are no active-active cable_type Async client thread exits gracefully,
but by design this needs to be working if added to monitor loop thread. So this PR fixes this problem by runnig the Async Client only if configuration is active-active for atleast a cable.

This PR also has all the infrastructure changes UT for all Classes having infinite loops in ycabled, thus helping in picking up cases if changes break the code.

MSFT ADO: 24121234

Description

Motivation and Context

How Has This Been Tested?

Running on DUT and UT

Additional Information (Optional)

cable type

Signed-off-by: vaibhav dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav dahiya <vdahiya@microsoft.com>
@vdahiya12 vdahiya12 changed the title [ycabled][active-active] no initialize Async Clinet, when no active-active cable type; fix names for all ycabled threads [ycabled][active-active] no initialize Async Client, when no active-active cable type; fix names for all ycabled threads Jun 6, 2023
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@vdahiya12 vdahiya12 requested a review from zjswhhh June 6, 2023 20:28
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@vdahiya12 vdahiya12 requested a review from prgeor June 14, 2023 18:21
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
prgeor
prgeor previously approved these changes Jun 19, 2023
Copy link
Collaborator

@prgeor prgeor left a comment

Choose a reason for hiding this comment

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

@vdahiya12 please fix the code coverage

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
zjswhhh
zjswhhh previously approved these changes Jun 28, 2023
Copy link

@zjswhhh zjswhhh left a comment

Choose a reason for hiding this comment

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

Please add ADO# and proper branch labels.

Also please wait for approval from Prince G. before merging.

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
yxieca pushed a commit that referenced this pull request Jul 7, 2023
…ctive cable type; fix names for all ycabled threads (#373)

This PR intends to not start sonic-ycabled's Asynchronous client, when there is no active-active cable type.
The Problem that we encounter is ycabled expects all threads to be working/running state all the time.
Since there are no active-active cable_type Async client thread exits gracefully,
but by design this needs to be working if added to monitor loop thread. So this PR fixes this problem by runnig the Async Client only if configuration is active-active for atleast a cable.

This PR also has all the infrastructure changes UT for all Classes having infinite loops in ycabled, thus helping in picking up cases if changes break the code.

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@prgeor
Copy link
Collaborator

prgeor commented Jul 7, 2023

Please add ADO# and proper branch labels.

Also please wait for approval from Prince G. before merging.

@yxieca please wait before merging to this repo

@prgeor
Copy link
Collaborator

prgeor commented Jul 12, 2023

@StormLiangMS please cherry pick to 202305

StormLiangMS pushed a commit that referenced this pull request Sep 21, 2023
…ctive cable type; fix names for all ycabled threads (#373)

This PR intends to not start sonic-ycabled's Asynchronous client, when there is no active-active cable type.
The Problem that we encounter is ycabled expects all threads to be working/running state all the time.
Since there are no active-active cable_type Async client thread exits gracefully,
but by design this needs to be working if added to monitor loop thread. So this PR fixes this problem by runnig the Async Client only if configuration is active-active for atleast a cable.

This PR also has all the infrastructure changes UT for all Classes having infinite loops in ycabled, thus helping in picking up cases if changes break the code.

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants