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

[swss]: Clear MUX-related state DB tables on start #6759

Merged
merged 1 commit into from
Feb 14, 2021

Conversation

theasianpianist
Copy link
Contributor

Signed-off-by: Lawrence Lee lawlee@microsoft.com

- Why I did it
Port configuration changes can leave keys for unused interfaces behind in STATE DB

- How I did it

  • Add MUX_CABLE_TABLE to set of tables to clear on SWSS start, which
    will clear HW_MUX_CABLE_TABLE and MUX_CABLE_TABLE
  • Order swss to start before pmon to ensure that DBs are cleared before
    xcvrd (running inside pmon) starts and re-populates the tables

- 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)
image

* Add *MUX_CABLE_TABLE* to set of tables to clear on SWSS start, which
will clear HW_MUX_CABLE_TABLE and MUX_CABLE_TABLE
* Order swss to start before pmon to ensure that DBs are cleared before
xcvrd (running inside pmon) starts and re-populates the tables

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
Copy link
Contributor

@prsunny prsunny left a comment

Choose a reason for hiding this comment

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

cleanup table lgtm.. @vdahiya12 , @lguohan to check service dependency.

@lguohan
Copy link
Collaborator

lguohan commented Feb 12, 2021

@jleveque , now pmon is affected by swss.

@jleveque
Copy link
Contributor

jleveque commented Feb 12, 2021

@jleveque , now pmon is affected by swss.

Thanks for the heads-up! Do we have any concerns that SwSS startup issues could prevent PMon from starting, thus causing thermal overload issues? I believe since this is only a Before= dependency, PMon should still start up even if SwSS fails. Can we confirm this?

@theasianpianist
Copy link
Contributor Author

@jleveque This dependency should not prevent PMON from starting if SWSS fails, since Before= does not enforce any dependencies on the health of the SWSS service, it only waits until SWSS has either completely started or failed: https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Before=

@theasianpianist
Copy link
Contributor Author

/Azurepipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lguohan lguohan merged commit 97c605f into sonic-net:master Feb 14, 2021
daall pushed a commit that referenced this pull request Feb 16, 2021
* Add *MUX_CABLE_TABLE* to set of tables to clear on SWSS start, which
will clear HW_MUX_CABLE_TABLE and MUX_CABLE_TABLE
* Order swss to start before pmon to ensure that DBs are cleared before
xcvrd (running inside pmon) starts and re-populates the tables

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
@lguohan
Copy link
Collaborator

lguohan commented Apr 28, 2021

in the chassis supervisor card environment, the pmon needs to before swss.

@theasianpianist theasianpianist deleted the clear-mux-table-swss branch May 13, 2021 23:11
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.

dual tor: Show Mux Cable Status Produces Empty Table After Swss Restart
6 participants