Skip to content

better solution for STATIC_ROUTE_EXPIRY_TIME check#12824

Merged
jcaiMR merged 1 commit intosonic-net:masterfrom
jcaiMR:static_rt_fix
Nov 25, 2022
Merged

better solution for STATIC_ROUTE_EXPIRY_TIME check#12824
jcaiMR merged 1 commit intosonic-net:masterfrom
jcaiMR:static_rt_fix

Conversation

@jcaiMR
Copy link
Copy Markdown
Contributor

@jcaiMR jcaiMR commented Nov 24, 2022

Why I did it

  1. swss-common behavior change between 202012 and master
    sonic-net/sonic-swss-common@e95a466
  2. This behavior change will cause different return value:
    master: key not exist, swss-common api will return None.
    202012: key not exist, swss-common api will return empty string.
  3. Based on 1 and 2, modify the original static route expiry code to make the code safe for different kinds of key/value pair in both master and 202012.

How I did it

Add protection code when swss-common api return None/"".

How to verify it

apply in bgpcfgd, verify different key/value pair.

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

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

Copy link
Copy Markdown
Contributor

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants