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.
What I did
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
Details if related
When trying to create tunnel without "src_ip":
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)