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

Fix REST_SERVER typo in mgmt_vars.j2 #8475

Merged
merged 1 commit into from
Aug 24, 2021
Merged

Conversation

bluecmd
Copy link
Contributor

@bluecmd bluecmd commented Aug 13, 2021

Why I did it

The issue was discussed on the mailing list and should be pretty obvious.

The issue:

Aug 13 23:12:29.901117 adele WARNING mgmt-framework#python3: :- operator(): Key 'JINJA2_CACHE' field 'f773745d995b9beba2b87a460e6956e2f0c03c1b' unavailable in database 'LOGLEVEL_DB'
Aug 13 23:12:29.922928 adele INFO mgmt-framework#/supervisord: rest-server Traceback (most recent call last):
Aug 13 23:12:29.922928 adele INFO mgmt-framework#/supervisord: rest-server   File "/usr/local/bin/sonic-cfggen", line 431, in <module>
Aug 13 23:12:29.922928 adele INFO mgmt-framework#/supervisord: rest-server     main()
Aug 13 23:12:29.922928 adele INFO mgmt-framework#/supervisord: rest-server   File "/usr/local/bin/sonic-cfggen", line 396, in main
Aug 13 23:12:29.923219 adele INFO mgmt-framework#/supervisord: rest-server     template_data = template.render(data)
Aug 13 23:12:29.923219 adele INFO mgmt-framework#/supervisord: rest-server   File "/usr/local/lib/python3.7/dist-packages/jinja2/environment.py", line 1304, in render
Aug 13 23:12:29.923219 adele INFO mgmt-framework#/supervisord: rest-server     self.environment.handle_exception()
Aug 13 23:12:29.923219 adele INFO mgmt-framework#/supervisord: rest-server   File "/usr/local/lib/python3.7/dist-packages/jinja2/environment.py", line 925, in handle_exception
Aug 13 23:12:29.923219 adele INFO mgmt-framework#/supervisord: rest-server     raise rewrite_traceback_stack(source=source)
Aug 13 23:12:29.923219 adele INFO mgmt-framework#/supervisord: rest-server   File "/usr/share/sonic/templates/mgmt_vars.j2", line 2, in top-level template code
Aug 13 23:12:29.923373 adele INFO mgmt-framework#/supervisord: rest-server     "rest_server": {% if REST_SERVER is defined and "default" in RESET_SERVER.keys() %}{{ REST_SERVER['default'] }}{% else %}""{% endif %},
Aug 13 23:12:29.923373 adele INFO mgmt-framework#/supervisord: rest-server   File "/usr/local/lib/python3.7/dist-packages/jinja2/environment.py", line 474, in getattr
Aug 13 23:12:29.923373 adele INFO mgmt-framework#/supervisord: rest-server     return getattr(obj, attribute)
Aug 13 23:12:29.923373 adele INFO mgmt-framework#/supervisord: rest-server jinja2.exceptions.UndefinedError: 'RESET_SERVER' is undefined
Aug 13 23:12:29.974559 adele INFO mgmt-framework#/supervisord: rest-server Generating temporary TLS server certificate ...

How I did it

Corrected the typo.

How to verify it

Build the image and try to boot it, the error should be gone.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

The issue is present in 202012 and newer and is required to set the REST server configuration.

Description for the changelog

rest: Fix typo in REST_SERVER configuration.

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

image

@bluecmd bluecmd requested a review from lguohan as a code owner August 13, 2021 23:20
@bluecmd bluecmd changed the title Fix typo in mgmt_vars.j2 Fix REST_SERVER typo in mgmt_vars.j2 Aug 13, 2021
Signed-off-by: Christian Svensson <[email protected]>
@lguohan lguohan merged commit f7de685 into sonic-net:master Aug 24, 2021
qiluo-msft pushed a commit that referenced this pull request Aug 25, 2021
judyjoseph pushed a commit that referenced this pull request Aug 25, 2021
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.

5 participants