Skip to content

[bgpcfgd]: Clarify error messages on reset Loopback0 ip address#5062

Merged
lguohan merged 2 commits intosonic-net:masterfrom
pavel-shirshov:pavelsh/cfgd_bgp_loopback
Jul 30, 2020
Merged

[bgpcfgd]: Clarify error messages on reset Loopback0 ip address#5062
lguohan merged 2 commits intosonic-net:masterfrom
pavel-shirshov:pavelsh/cfgd_bgp_loopback

Conversation

@pavel-shirshov
Copy link
Copy Markdown
Contributor

@pavel-shirshov pavel-shirshov commented Jul 28, 2020

- Why I did it
To clarify error messages in case the ip address for Loopback is already set. It doesn't make sense to call correct ip address as ambiguous in this case

- How I did it
I split the check of constraints into two if clauses. One to check if the ip is correct or not. The second one to check if the ip address was already registered or not.

- How to verify it

admin@str-s6100-acs-1:~$ redis-cli 
127.0.0.1:6379> select 4
OK
127.0.0.1:6379[4]> keys LOOP*
1) "LOOPBACK_INTERFACE|Loopback0|10.1.0.32/32"
2) "LOOPBACK_INTERFACE|Loopback0"
3) "LOOPBACK_INTERFACE|Loopback0|FC00:1::32/128"
127.0.0.1:6379[4]> hset "LOOPBACK_INTERFACE|Loopback0|10.1.0.32/32" NULL NULL
(integer) 0
127.0.0.1:6379[4]> hset "LOOPBACK_INTERFACE|Loopback0|FC00:1::32/128" NULL NULL
(integer) 0
Jul 30 00:23:02.840009 str-s6100-acs-1 WARNING bgp#bgpcfgd: Update command is not supported for set src templates. current ip='10.1.0.32'. new ip='10.1.0.32'

Jul 30 00:23:28.543761 str-s6100-acs-1 WARNING bgp#bgpcfgd: Update command is not supported for set src templates. current ip='FC00:1::32'. new ip='FC00:1::32'

- Which release branch to backport (provide reason below if seleted)

  • 201811
  • 201911
  • 202006

- Description for the changelog

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

@lguohan
Copy link
Copy Markdown
Collaborator

lguohan commented Jul 29, 2020

retest vs please

@pavel-shirshov pavel-shirshov marked this pull request as ready for review July 30, 2020 00:24
@pavel-shirshov
Copy link
Copy Markdown
Contributor Author

retest vs please

@lguohan lguohan merged commit e22de3a into sonic-net:master Jul 30, 2020
@pavel-shirshov pavel-shirshov deleted the pavelsh/cfgd_bgp_loopback branch July 30, 2020 15:07
abdosi pushed a commit that referenced this pull request Aug 9, 2020
To clarify error messages in case the ip address for Loopback is already set. It doesn't make sense to call correct ip address as ambiguous in this case
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
…c-net#5062)

To clarify error messages in case the ip address for Loopback is already set. It doesn't make sense to call correct ip address as ambiguous in this case
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