Skip to content

[barefoot][platform] Refactor chassis.py #7704

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

Merged
merged 1 commit into from
Jun 4, 2021

Conversation

vboykox
Copy link
Member

@vboykox vboykox commented May 25, 2021

Signed-off-by: Volodymyr Boyko [email protected]

Why I did it

On our platforms syncd must be up while using the sonic_platform.
The issue is warm-reboot script first disables syncd then instantiate Chassis, which tries to connect syncd in init.

How I did it

Refactor Chassis to lazy initialize components.

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

@vboykox vboykox requested a review from lguohan as a code owner May 25, 2021 11:02
@lgtm-com
Copy link

lgtm-com bot commented May 25, 2021

This pull request fixes 2 alerts when merging b22157154a06ba4511d97097d65eea73a943d3a4 into 9930e73 - view on LGTM.com

fixed alerts:

  • 2 for Wrong number of arguments in a class instantiation

akokhan
akokhan previously approved these changes May 25, 2021
@lgtm-com
Copy link

lgtm-com bot commented May 25, 2021

This pull request fixes 2 alerts when merging 2dcfb6a61ed3d39a1373807f1fbb1003195f9f72 into 9930e73 - view on LGTM.com

fixed alerts:

  • 2 for Wrong number of arguments in a class instantiation

@vboykox
Copy link
Member Author

vboykox commented May 26, 2021

@jleveque

jleveque
jleveque previously approved these changes May 26, 2021
@jleveque
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vboykox
Copy link
Member Author

vboykox commented May 27, 2021

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 7704 in repo Azure/sonic-buildimage

@lgtm-com
Copy link

lgtm-com bot commented May 27, 2021

This pull request fixes 2 alerts when merging 91c933ce673312da66127db88b28af40e8b50f5d into a42aa3d - view on LGTM.com

fixed alerts:

  • 2 for Wrong number of arguments in a class instantiation

@vboykox vboykox force-pushed the vboykox/chassis-lazy branch from 91c933c to 59e40ee Compare May 27, 2021 18:52
@lgtm-com
Copy link

lgtm-com bot commented May 27, 2021

This pull request fixes 2 alerts when merging 59e40eeb0e86edb6dde948b67a7933b1293740df into bf21dbc - view on LGTM.com

fixed alerts:

  • 2 for Wrong number of arguments in a class instantiation

@vboykox vboykox force-pushed the vboykox/chassis-lazy branch from 59e40ee to bacab9e Compare May 31, 2021 07:53
@lgtm-com
Copy link

lgtm-com bot commented May 31, 2021

This pull request fixes 2 alerts when merging bacab9e2b0d258be6e172b0783ddf30ef9fe5a4a into 1324200 - view on LGTM.com

fixed alerts:

  • 2 for Wrong number of arguments in a class instantiation

akokhan
akokhan previously approved these changes May 31, 2021
@jleveque
Copy link
Contributor

jleveque commented Jun 1, 2021

/azp run

jleveque
jleveque previously approved these changes Jun 1, 2021
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vboykox vboykox dismissed stale reviews from jleveque and akokhan via bbb8c79 June 2, 2021 21:12
@vboykox vboykox force-pushed the vboykox/chassis-lazy branch from bacab9e to bbb8c79 Compare June 2, 2021 21:12
@lgtm-com
Copy link

lgtm-com bot commented Jun 2, 2021

This pull request fixes 2 alerts when merging bbb8c79dcf335411594d45f943703f8c2faf3e60 into 3ad4f79 - view on LGTM.com

fixed alerts:

  • 2 for Wrong number of arguments in a class instantiation

@vboykox vboykox force-pushed the vboykox/chassis-lazy branch from bbb8c79 to 2a5d290 Compare June 3, 2021 21:58
@lgtm-com
Copy link

lgtm-com bot commented Jun 3, 2021

This pull request fixes 2 alerts when merging 2a5d2908bc0c7f573d48326b6ab790ef1b26195b into b30cf44 - view on LGTM.com

fixed alerts:

  • 2 for Wrong number of arguments in a class instantiation

@vboykox vboykox requested a review from jleveque June 4, 2021 03:50
@vboykox vboykox force-pushed the vboykox/chassis-lazy branch from 2a5d290 to db2fc70 Compare June 4, 2021 10:27
@lgtm-com
Copy link

lgtm-com bot commented Jun 4, 2021

This pull request fixes 2 alerts when merging db2fc70 into 5366333 - view on LGTM.com

fixed alerts:

  • 2 for Wrong number of arguments in a class instantiation

@jleveque jleveque merged commit 9d05077 into sonic-net:master Jun 4, 2021
@qiluo-msft
Copy link
Collaborator

This could not be cleanly cherry-picked to 202012. Please submit another PR.

@vboykox
Copy link
Member Author

vboykox commented Jun 8, 2021

@qiluo-msft Please cherry-pick this PR first: #7103
Thanks.

qiluo-msft pushed a commit that referenced this pull request Jun 9, 2021
#### Why I did it
On our platforms syncd must be up while using the sonic_platform.
The issue is warm-reboot script first disables syncd then instantiate Chassis, which tries to connect syncd in __init__.

#### How I did it
Refactor Chassis to lazy initialize components.

Signed-off-by: Volodymyr Boyko <[email protected]>
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
#### Why I did it
On our platforms syncd must be up while using the sonic_platform.
The issue is warm-reboot script first disables syncd then instantiate Chassis, which tries to connect syncd in __init__.

#### How I did it
Refactor Chassis to lazy initialize components.

Signed-off-by: Volodymyr Boyko <[email protected]>
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.

4 participants