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

[teamd]: Add teamd.sh start script to clean up STATE database #2250

Closed
wants to merge 1 commit into from

Conversation

stcheng
Copy link
Contributor

@stcheng stcheng commented Nov 13, 2018

To align the startup approach same with syncd and swss docker.
Clean up the state database for LAGs when starting the docker.

Signed-off-by: Shu0T1an ChenG [email protected]

for pc in `ip link show | grep PortChannel | awk -F "[ :]" '{print $3}'`;
do
ip link delete dev $pc
done
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we need to delete it here? teamd will delete them. For warm boot, this should let teammgrd to deal with them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

teamd will not delete them if it receives SIGTERM/SIGKILL, the other option is to have teammgrd to listen to SIGTERM/SIGKILL and execute the teamd -k command

Copy link
Contributor Author

Choose a reason for hiding this comment

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

teamd#supervisord: teammgrd Failed: Cannot allocate memory
this is the issue met without removing the deprecated netdevs

Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume you will make further change to make it teamd docker warm restart compatible?

Copy link
Collaborator

Choose a reason for hiding this comment

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

the error you posted is from teammgrd. what memory does teammgrd try to allocate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is not teammgrd, it is teamd, teamd failed to allocate memory to create the netdev.

Copy link
Collaborator

Choose a reason for hiding this comment

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

please comment and mark as temporary solution, the solution is to fix teamd

@@ -5,9 +5,8 @@ After=updategraph.service

[Service]
User={{ sonicadmin_user }}
ExecStartPre=/usr/bin/{{docker_container_name}}.sh start
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we remove this one?

Copy link
Collaborator

Choose a reason for hiding this comment

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

In stead of removing, we can just replace existing script.


In reply to: 232916218 [](ancestors = 232916218)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i think it's better to align all these scripts later we could have some common functions that could simplify these scripts all together

Copy link
Collaborator

Choose a reason for hiding this comment

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

Then the unused scripts should be removed.

To align the startup approach same with syncd and swss docker.
Clean up the state databsae for LAGs when starting the docker.
Remove all obsolete netdevs before creating new ones.

Signed-off-by: Shu0T1an ChenG <[email protected]>
@stcheng
Copy link
Contributor Author

stcheng commented Jan 25, 2019

not needed at this moment
will reevaluate it afterwards

dprital added a commit to dprital/sonic-buildimage that referenced this pull request May 25, 2022
[muxorch] Handling optional attributes in muxorch (sonic-net#2288)
Update netlink messages handler (sonic-net#2233)
Broadcast Unknown-multicast and Unknown-unicast Storm-control (sonic-net#1306)
[vstest]: Increase PollingConfig default timeout (sonic-net#2285)
[FDB] Fix fbdorch to properly handle syncd FDB FLUSH Notif (sonic-net#2254)
[macsecorch]: Support for non-default sa per sc (sonic-net#2250)
Migrating the NAT vs tests from Click to direct DB access (sonic-net#2278)
[neighsync] Ignoring IPv4 link local addresses (sonic-net#2260)
[IntfMgrd] Retry adding ipv6 prefix by setting disabled_ipv6 flag  (sonic-net#2267)
Increase Redis Timeout value for Switch Create Opration for Packet (sonic-net#2243)
Update fdborch.cpp (sonic-net#2261)

Signed-off-by: dprital <[email protected]>
liat-grozovik pushed a commit that referenced this pull request May 26, 2022
[muxorch] Handling optional attributes in muxorch (#2288)
Update netlink messages handler (#2233)
Broadcast Unknown-multicast and Unknown-unicast Storm-control (#1306)
[vstest]: Increase PollingConfig default timeout (#2285)
[FDB] Fix fbdorch to properly handle syncd FDB FLUSH Notif (#2254)
[macsecorch]: Support for non-default sa per sc (#2250)
Migrating the NAT vs tests from Click to direct DB access (#2278)
[neighsync] Ignoring IPv4 link local addresses (#2260)
[IntfMgrd] Retry adding ipv6 prefix by setting disabled_ipv6 flag  (#2267)
Increase Redis Timeout value for Switch Create Opration for Packet (#2243)
Update fdborch.cpp (#2261)

Signed-off-by: dprital <[email protected]>
liushilongbuaa pushed a commit to liushilongbuaa/sonic-buildimage that referenced this pull request Jun 20, 2022
…anch

Related work items: #52, #71, #73, #75, #77, sonic-net#1306, sonic-net#1588, sonic-net#1991, sonic-net#2031, sonic-net#2040, sonic-net#2053, sonic-net#2066, sonic-net#2069, sonic-net#2087, sonic-net#2107, sonic-net#2110, sonic-net#2112, sonic-net#2113, sonic-net#2117, sonic-net#2124, sonic-net#2125, sonic-net#2126, sonic-net#2128, sonic-net#2130, sonic-net#2131, sonic-net#2132, sonic-net#2133, sonic-net#2134, sonic-net#2135, sonic-net#2136, sonic-net#2137, sonic-net#2138, sonic-net#2139, sonic-net#2140, sonic-net#2143, sonic-net#2158, sonic-net#2161, sonic-net#2233, sonic-net#2243, sonic-net#2250, sonic-net#2254, sonic-net#2260, sonic-net#2261, sonic-net#2267, sonic-net#2278, sonic-net#2282, sonic-net#2285, sonic-net#2288, sonic-net#2289, sonic-net#2292, sonic-net#2294, sonic-net#8887, sonic-net#9279, sonic-net#9390, sonic-net#9511, sonic-net#9700, sonic-net#10025, sonic-net#10322, sonic-net#10479, sonic-net#10484, sonic-net#10493, sonic-net#10500, sonic-net#10580, sonic-net#10595, sonic-net#10628, sonic-net#10634, sonic-net#10635, sonic-net#10644, sonic-net#10670, sonic-net#10691, sonic-net#10716, sonic-net#10731, sonic-net#10750, sonic-net#10751, sonic-net#10752, sonic-net#10761, sonic-net#10769, sonic-net#10775, sonic-net#10776, sonic-net#10779, sonic-net#10786, sonic-net#10792, sonic-net#10793, sonic-net#10800, sonic-net#10806, sonic-net#10826, sonic-net#10839, sonic-net#10840, sonic-net#10842, sonic-net#10844, sonic-net#10847, sonic-net#10849, sonic-net#10852, sonic-net#10865, sonic-net#10872, sonic-net#10877, sonic-net#10886, sonic-net#10889, sonic-net#10903, sonic-net#10904, sonic-net#10905, sonic-net#10913, sonic-net#10914, sonic-net#10916, sonic-net#10919, sonic-net#10925, sonic-net#10926, sonic-net#10929, sonic-net#10933, sonic-net#10934, sonic-net#10937, sonic-net#10941, sonic-net#10947, sonic-net#10952, sonic-net#10953, sonic-net#10957, sonic-net#10959, sonic-net#10971, sonic-net#10972, sonic-net#10980
vivekrnv pushed a commit to vivekrnv/sonic-buildimage that referenced this pull request Aug 26, 2022
What I did
Taught MacsecOrch to use the SAI_MACSEC_ATTR_MAX_SECURE_ASSOCIATIONS_PER_SC attribute added in
opencomputeproject/SAI#1420

Why I did it
To support SAI_MACSEC_ATTR_MAX_SECURE_ASSOCIATIONS_PER_SC in MacsecOrch.

How I verified it
The changes have no impact until SAI_MACSEC_ATTR_MAX_SECURE_ASSOCIATIONS_PER_SC is supported by the platform.

Details
Cache the the result of SAI_MACSEC_ATTR_MAX_SECURE_ASSOCIATIONS_PER_SC in MACsecObject.m_max_sa_per_sc.
Set STATE_DB MACSEC_PORT_TABLE's max_sa_per_sc to the value cached in MACsecObject.m_max_sa_per_sc in createMACsecPort.

Signed-off-by: Nathan Wolfe <[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.

5 participants