Skip to content

[mux] Add Mux Container To Master Branch #8838

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 13 commits into from
Oct 15, 2021

Conversation

tahmed-dev
Copy link
Contributor

Why I did it

Internal mux container is out of Beta and is now available on sonic-linkmgrd.

How I did it

Added submodule and pointer to tip of master branch of sonic-linkmgrd.
Also, added packages variable that is not in internal branch.

How to verify it

image produced with mux container and service

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

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

@yxieca
Copy link
Contributor

yxieca commented Sep 27, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

prsunny
prsunny previously approved these changes Sep 27, 2021
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Tamer Ahmed and others added 7 commits September 28, 2021 10:14
Linkmgrd monitors link status, mux status, and link state. Has
the link becomes unhealthy, linkmgrd will trigger mux switchover
on a standby ToR ensuring uninterrupted service to servers/blades.
This PR is initial implementation of linkmgrd.

Also, docker-mux container hold packages related to maintaining and managing
mux cable. It currently runs linkmgrd binary that monitor and switches
the mux if needed.
This PR also introduces mux-container and starts linkmgrd as startup when
build is configured with INCLUDE_MUX=y

Edit: linkmgrd PR will follow.

signed-off-by: Tamer Ahmed <[email protected]>

Related work items: sonic-net#2315, #3146150
During warm reboot, linkmgrd would go away and so heartbeats will
be lost. This would result in standby link son peer ToR to pull the
link active. This is undesirable since we would not create tunnel
from the ToR that is being rebooted to the peer ToR. This PR
implicitly lock the state of the mux if config is not set to auto.

Also, orchagent does not initialize MUX to it hardware state, rather
it initilizes MUX to Unknown state. linkmgrd will detect this situation
and probe MUX state to correct orchagent state.

There a fix for the case when state os switched MUX is delayed. The
PR will poll the MUX for the new state. This is required to update
the state ds and hence create/tear tunnel.

signed-off-by: Tamer Ahmed <[email protected]>
Ading new packaging variable to mux docker

signed-off-by: Tamer Ahmed <[email protected]>
This PR deletes local-to-buildimage linkmgrd and creates new submodule
pointing to github repo of sonic-linkmgrd.

signed-off-by: Tamer Ahmed <[email protected]>
[mux] Start Mux on Only Dual-ToR Platform

mux docker depends on the presence of mux cable hardware and is
supposed to run only Gemini ToRs. This PR change the mux feature
config in order to enable mux docker based on device configuration.

signed-off-by: Tamer Ahmed <[email protected]>
[mux.service]: Bind to sonic.target

Signed-off-by: Lawrence Lee <[email protected]>
[mux] Update Service Install With SONiC Target

Recent PR grouped all SONiC service into sonic.taget. The install section
of mux.service was not update and this causes delays when using config
reload as the service failed state is not being reset.

signed-off-by: Tamer Ahmed <[email protected]>
@zjswhhh zjswhhh force-pushed the taahme/build-sonic-image-with-mux branch from 5be5994 to 0abeca2 Compare September 28, 2021 17:24
yxieca
yxieca previously approved these changes Sep 28, 2021
@yxieca
Copy link
Contributor

yxieca commented Oct 4, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lgtm-com
Copy link

lgtm-com bot commented Oct 4, 2021

This pull request introduces 7 alerts when merging 61f1903b779a5aa04fc030d29ecb7d10007aff7f into df6361f - view on LGTM.com

new alerts:

  • 5 for Property in old-style class
  • 2 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Oct 4, 2021

This pull request introduces 5 alerts when merging cea6590911e060a79affec9832aa98d7b59a1a40 into 552963a - view on LGTM.com

new alerts:

  • 5 for Property in old-style class

@theasianpianist theasianpianist force-pushed the taahme/build-sonic-image-with-mux branch from cea6590 to 7b4dbda Compare October 5, 2021 18:25
Signed-off-by: Lawrence Lee <[email protected]>

[write_standby]: Cleanup and fix build

Signed-off-by: Lawrence Lee <[email protected]>
[bgp]: Switch mux to standby if BGP container exits

Signed-off-by: Lawrence Lee <[email protected]>
[write_standby]: Ignore non-auto interfaces

* In the event that `write_standby.py` is used to automatically switchover interfaces when linkmgrd or bgp crashes, ignore any interfaces that are not configured to auto-switch

Signed-off-by: Lawrence Lee <[email protected]>
@theasianpianist theasianpianist force-pushed the taahme/build-sonic-image-with-mux branch from 7b4dbda to 1b9711c Compare October 5, 2021 18:36
@yxieca
Copy link
Contributor

yxieca commented Oct 8, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft
Copy link
Collaborator

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

@qiluo-msft
Copy link
Collaborator

@yxieca Did you intend to remove 202012 label?

@yxieca
Copy link
Contributor

yxieca commented Nov 15, 2021

@yxieca Did you intend to remove 202012 label?

Thanks! Fixed now.

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.

7 participants