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

[action] [PR:20726] [database]: Fix "program:redisprogram:redis_bmp" ERR from supervisor (#20726) #20898

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

mssonicbld
Copy link
Collaborator

== Why I did it ==

Commit 06c469e added an extra redis instance. This resulted in a
two item string without linefeeds in /etc/supervisor/critical_processes:

program:redisprogram:redis_bmp

That resulted in an error in syslog and docker-database failing.

== Work item tracking ==

ERR database#supervisor-proc-exit-listener: Syntax of the line
program:redisprogram:redis_bmp#012 in processes file is incorrect.
Exiting... (#20636)

ossobv#17

== How I did it ==

Replace the jinja2 whitespace eating hyphens from BOL to EOL.

Note that j2 and the jinja2 parser in sonig-cfggen do not behave the
same. The sonig-cfggen is the relevant one.

Before:

$ j2 ./dockers/docker-database/critical_processes.j2.old -f json
<<< '{"INSTANCES":{"foo":"bar","baz":"..."}}'
|
|
program:foo
program:baz

docker exec database sonic-cfggen \

  -j /var/run/redis/sonic-db/database_config.json \
  -t /usr/share/sonic/templates/critical_processes.j2.old

program:redisprogram:redis_bmp

After:

$ j2 ./dockers/docker-database/critical_processes.j2 -f json
<<< '{"INSTANCES":{"foo":"bar","baz":"..."}}'
program:foo
program:baz

docker exec database sonic-cfggen \

  -j /var/run/redis/sonic-db/database_config.json \
  -t /usr/share/sonic/templates/critical_processes.j2

program:redis
program:redis_bmp
|

After this fix, the output in /etc/supervisor/critical_processes is
correct and the error from docker-database is gone.

…onic-net#20726)

== Why I did it ==

Commit 06c469e added an extra redis instance. This resulted in a
two item string without linefeeds in /etc/supervisor/critical_processes:

  program:redisprogram:redis_bmp

That resulted in an error in syslog and docker-database failing.

== Work item tracking ==

ERR database#supervisor-proc-exit-listener: Syntax of the line
  program:redisprogram:redis_bmp#012 in processes file is incorrect.
  Exiting... (sonic-net#20636)

ossobv#17

== How I did it ==

Replace the jinja2 whitespace eating hyphens from BOL to EOL.

Note that j2 and the jinja2 parser in sonig-cfggen do not behave the
same. The sonig-cfggen is the relevant one.

Before:

  $ j2 ./dockers/docker-database/critical_processes.j2.old -f json \
      <<< '{"INSTANCES":{"foo":"bar","baz":"..."}}'
  |
  |
  program:foo
  program:baz

  # docker exec database sonic-cfggen \
      -j /var/run/redis/sonic-db/database_config.json \
      -t /usr/share/sonic/templates/critical_processes.j2.old
  program:redisprogram:redis_bmp

After:

  $ j2 ./dockers/docker-database/critical_processes.j2 -f json \
      <<< '{"INSTANCES":{"foo":"bar","baz":"..."}}'
  program:foo
  program:baz

  # docker exec database sonic-cfggen \
      -j /var/run/redis/sonic-db/database_config.json \
      -t /usr/share/sonic/templates/critical_processes.j2
  program:redis
  program:redis_bmp
  |

After this fix, the output in /etc/supervisor/critical_processes is
correct and the error from docker-database is gone.
@mssonicbld
Copy link
Collaborator Author

Original PR: #20726

@bingwang-ms
Copy link
Contributor

route/test_route_perf.py is failing on multi-asic T1. Retriggered PR test.

@bingwang-ms bingwang-ms enabled auto-merge (squash) December 4, 2024 17:38
@mssonicbld mssonicbld merged commit 2544e48 into sonic-net:202405 Dec 4, 2024
20 checks passed
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