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

[docker-frr] Fix the start.sh where it fails in case no WARM_RESTART in configDB #41

Merged
merged 1 commit into from
Feb 10, 2020

Conversation

zhenggen-xu
Copy link
Owner

[docker-frr] Fix the start.sh where it fails in case no WARM_RESTART in configDB

Signed-off-by: Zhenggen Xu zxu@linkedin.com

This should be back-ported to 201911 branch too.

- What I did
If the configDB has no warm-restart configurations, the start.sh in bgp docker would fail due to python exception as below:

Traceback (most recent call last):
  File "/usr/local/bin/sonic-cfggen", line 322, in <module>
    main()
  File "/usr/local/bin/sonic-cfggen", line 300, in main
    print(template.render(data))
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "<template>", line 1, in top-level template code
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 430, in getattr
    return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'WARM_RESTART' is undefined

- How I did it
Check the WARM_RESTART table first. If does not exist, won't check the bgp_eoiu info to avoid crash.

- How to verify it
After the fix:

without any warm restart configured or if we do "sudo config warm-restart bgp_eoiu false"
bgp docker will not start the bgp_eoiu_marker

if we do:  "sudo config warm-restart bgp_eoiu true"
We can see bgp_eoiu_marker started.

- Description for the changelog

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

…in configDB

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
@zhenggen-xu zhenggen-xu merged commit c884f26 into sonic-cfg-mgmt Feb 10, 2020
li-pingmao pushed a commit to li-pingmao/sonic-buildimage that referenced this pull request Feb 23, 2022
457e94d51 [macsec_linux]: Fixbug cannot dump the PN due to type error (zhenggen-xu#42)
f7c073323 Disable P2P module (zhenggen-xu#41)
7b3b777e2 [ci]: use native arm64 and armhf build pool (zhenggen-xu#40)
d4e91d66c [sonic_operator]: Increase wait timeout (zhenggen-xu#39)
43611ef88e [sonic_operators]: Add log in sonic operators (zhenggen-xu#43)

Signed-off-by: Ze Gan <ganze718@gmail.com>
praveen-li pushed a commit to praveen-li/sonic-buildimage that referenced this pull request Aug 9, 2022
f00efef Longxiang Lyu Wed Mar 16 09:12:46 2022 +0800 Add a command line option to store logs into a separate file (zhenggen-xu#41)
ff2e67d Longxiang Lyu Tue Mar 15 09:10:59 2022 +0800 Add default port cable type (zhenggen-xu#39)
ebbb4d8 Jing Zhang Mon Mar 14 15:41:11 2022 -0700 Prevent switching MUX to "Unknown" (zhenggen-xu#36)
c779b8f Longxiang Lyu Thu Mar 10 21:35:11 2022 +0800 [nonfunctional] Use LinkProberStateMachineBase (zhenggen-xu#38)
b9fedd0 Longxiang Lyu Wed Mar 9 13:03:58 2022 +0800 [NONFUNCTIONAL] Add LinkProberStateMachineBase (zhenggen-xu#37)
bedd42b Longxiang Lyu Wed Mar 9 10:03:00 2022 +0800 Add .clang-format file to format code (zhenggen-xu#28)
9fe4fc6 Guohan Lu Thu Mar 3 17:51:43 2022 -0800 [doc]: add lgtm badge in README.md
c1249d9 Longxiang Lyu Wed Mar 2 18:05:18 2022 +0800 Enable lgtm (zhenggen-xu#33)
b8514c6 Longxiang Lyu Wed Mar 2 13:34:39 2022 +0800 Collect port cable type to use corresponding state machine (zhenggen-xu#31)
9b59ef9 Longxiang Lyu Wed Mar 2 07:19:33 2022 +0800 Improve make clean (zhenggen-xu#32)
@zhenggen-xu zhenggen-xu deleted the cfg-mgmt-eoiu-check branch May 24, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant