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

[db_migrator] Migrate tunnel table #3704

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lolyu
Copy link
Contributor

@lolyu lolyu commented Jan 7, 2025

What I did

Currently, the IPinIP tunnel and decap terms are removed after warm-reboot to 202405:

2025 Jan  6 12:29:59.356200 WARNING syncd#syncd: :- logViewObjectCount: object count for SAI_OBJECT_TYPE_TUNNEL on current view 3 is different than on temporary view: 1
2025 Jan  6 12:29:59.356200 WARNING syncd#syncd: :- logViewObjectCount: object count for SAI_OBJECT_TYPE_TUNNEL_TERM_TABLE_ENTRY on current view 13 is different than on temporary view: 1

Starting from 202405, the decap terms are removed out of TUNNEL_DECAP_TABLE, and TUNNEL_DECAP_TERM_TABLE is used to describe the decap terms.
Let's migrate the TUNNEL_DECAP_TABLE based on the db schema change introduced in 202405.

Signed-off-by: Longxiang Lyu [email protected]

How I did it

  • before migration:
{
    "TUNNEL_DECAP_TABLE:IPINIP_TUNNEL": {
        "dscp_mode": "uniform",
        "dst_ip": "10.0.0.56,10.0.0.58,10.0.0.60,10.0.0.62,10.1.0.32,192.168.0.1",
        "ecn_mode": "copy_from_outer",
        "ttl_mode": "pipe",
        "tunnel_type": "IPINIP"
    }
}
  • after migration:
{
    "TUNNEL_DECAP_TABLE:IPINIP_TUNNEL": {
        "dscp_mode": "uniform",
        "ecn_mode": "copy_from_outer",
        "ttl_mode": "pipe",
        "tunnel_type": "IPINIP"
    },
    "TUNNEL_DECAP_TERM_TABLE:IPINIP_TUNNEL:10.0.0.56": {
        "term_type": "P2MP"
    },
    "TUNNEL_DECAP_TERM_TABLE:IPINIP_TUNNEL:10.0.0.58": {
        "term_type": "P2MP"
    },
    "TUNNEL_DECAP_TERM_TABLE:IPINIP_TUNNEL:10.0.0.60": {
        "term_type": "P2MP"
    },
    "TUNNEL_DECAP_TERM_TABLE:IPINIP_TUNNEL:10.0.0.62": {
        "term_type": "P2MP"
    },
    "TUNNEL_DECAP_TERM_TABLE:IPINIP_TUNNEL:10.1.0.32": {
        "term_type": "P2MP"
    },
    "TUNNEL_DECAP_TERM_TABLE:IPINIP_TUNNEL:192.168.0.1": {
        "term_type": "P2MP"
    }
}

How to verify it

  1. UT
  2. warm reboot from 202311 to 202405.

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

@mssonicbld
Copy link
Collaborator

/azp run

@lolyu lolyu requested a review from yxieca January 7, 2025 04:03
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Longxiang Lyu <[email protected]>
@lolyu
Copy link
Contributor Author

lolyu commented Jan 7, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bingwang-ms
Copy link
Contributor

LGTM. @vaibhavhd Could you please help review?

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