fix: sync port_fast to APPL_DB on boot when portfast already configured#87
Open
salahadell wants to merge 1 commit intosonic-net:masterfrom
Open
fix: sync port_fast to APPL_DB on boot when portfast already configured#87salahadell wants to merge 1 commit intosonic-net:masterfrom
salahadell wants to merge 1 commit intosonic-net:masterfrom
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Salah Adel <salah-adel2011@hotmail.com>
d7f83ff to
eb98497
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Author
|
@divyachandralekha @lihuay , Could you please review this fix? It addresses a boot-time APPL_DB sync issue for PortFast configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
After a reboot,
stpdinitializesg_fastspan_config_maskto all-1s(
PORT_MASK_SET_ALL) as a boot-time default. Whenstpmgrdreplayspersisted CONFIG_DB with
portfast=true,stpmgr_config_fastspan()hits the
is_memberguard and returns early without callingstpsync_update_port_fast(). As a result,port_fastis never writtento APPL_DB and
show spanning-treedisplays PortFast as N eventhough it is configured.
This only affects reboots: on first-time setup the CLI creates STP_PORT
entries with
portfast=false, which triggers the disable path and clearsthe mask bits before the user enables PortFast. After reboot the config
is already
trueso no disable/clear step occurs, leaving the guardalways firing on the enable path.
Fix
Ensure
stpsync_update_port_fast()is called before the earlyreturn in both the enable and disable branches of
stpmgr_config_fastspan(). This guarantees APPL_DB reflects the currentportfast state whenever config is replayed, regardless of the initial
mask value.
Testing
show spanning-treeshows PortFast Y after boot.