Skip to content

Tunneldecaporch fixes#573

Merged
sihuihan88 merged 3 commits intosonic-net:masterfrom
stepanblyschak:tunneldecaporch_fixes
Aug 20, 2018
Merged

Tunneldecaporch fixes#573
sihuihan88 merged 3 commits intosonic-net:masterfrom
stepanblyschak:tunneldecaporch_fixes

Conversation

@stepanblyschak
Copy link
Contributor

What I did

  • Allow decap tunnel configuration without "src_ip" field
  • Remove overlay interface when removing tunnel
  • Add test cases to test_tunnel.py to check the above two changes

Why I did it

  • Couldn't create a decap tunnel without "src_ip" field, also there is no need to specify "src_ip" for decap only tunnel

  • After tunnel deletion, created overlay interface still exists, so I fixed that

How I verified it

  • Mannual testing on SONiC switch: created tunnel without "src_ip", deleted tunnel and verified overlay interface is also deleted
  • Run unittests

Details if related
When trying to create tunnel without "src_ip":

[
        {
                "TUNNEL_DECAP_TABLE:IPINIP_V4_TUNNEL" : {
                        "tunnel_type":"IPINIP",
                        "dst_ip":"1.1.1.1",
                        "dscp_mode":"uniform",
                        "ecn_mode":"standard",
                        "ttl_mode":"pipe"
                },
                "OP": "SET"
        }
]

I got orchagent crash:
Aug 10 13:28:53.819634 arc-switch1041 NOTICE swss/swssconfig: :- main: Loading config from JSON file:a.json...
Aug 10 13:28:53.822425 arc-switch1041 NOTICE swss/orchagent: :- addDecapTunnel: Create overlay loopback router interface oid:600000000072c
Aug 10 13:28:53.822587 arc-switch1041 INFO syncd/supervisord: syncd Aug 10 13:28:53 NOTICE SAI_RIF: mlnx_sai_rif.c[241]- mlnx_create_router_interface: Create rif, #0 VIRTUAL_ROUTER_ID=VIRTUAL_ROUTER,(0:0),0,0000,0 #1TYPE=LOOPBACK
Aug 10 13:28:53.823288 arc-switch1041 ERR swss/orchagent: :- main: Failed due to exception: basic_string::_S_construct null not valid
Aug 10 13:28:53.823532 arc-switch1041 INFO kernel: [ 9199.294165] orchagent[14187]: segfault at 8 ip 000000000049318e sp 00007fffa351bc50 error 4 in orchagent[400000+102000]
Aug 10 13:28:53.829530 arc-switch1041 INFO syncd/supervisord: syncd Aug 10 13:28:53 NOTICE SAI_RIF: mlnx_sai_rif.c[532]- mlnx_create_router_interface: Created rif rif 26
Aug 10 13:28:55.576082 arc-switch1041 INFO swss.sh[13747]: 2018-08-10 13:28:55,575 INFO exited: orchagent (terminated by SIGSEGV (core dumped); not expected)
Aug 10 13:28:56.491711 arc-switch1041 INFO swss/supervisord 2018-08-10 13:28:55,575 INFO exited: orchagent (terminated by SIGSEGV (core dumped); not expected)

Stepan Blyschak added 3 commits August 10, 2018 16:23
After tunnel removal there was still overlay loopback
interface in ASIC DB.

Signed-off-by: Stepan Blyschak <[email protected]>
Seperate symmetric and decap tunnel test
Add checks for tunnel removal

Signed-off-by: Stepan Blyschak <[email protected]>
@liatgrozovik
Copy link

@sihuihan88 can you please review and validate? once done please merge

@sihuihan88
Copy link
Contributor

Ansible decap test doesn't include ipv6 from my understanding. Can you also add that test?

@stepanblyschak
Copy link
Contributor Author

@sihuihan88 Please check sonic-net/sonic-mgmt#682.

@sihuihan88 sihuihan88 merged commit 7ac5101 into sonic-net:master Aug 20, 2018
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
* Allow decap tunnel configuration without "src_ip"

Signed-off-by: Stepan Blyschak <[email protected]>

* Remove overlay loopback interface when removing tunnel

After tunnel removal there was still overlay loopback
interface in ASIC DB.

Signed-off-by: Stepan Blyschak <[email protected]>

* Add more test cases to test_tunnel.py

Seperate symmetric and decap tunnel test
Add checks for tunnel removal

Signed-off-by: Stepan Blyschak <[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.

4 participants