sonic-buildimage/dockers/docker-database
Marty Y. Lok 2e81eff2e8
[Supervisor][datbase-chassis] Fixthe failure of starting redis_chassis in database-chassis on Supervisor (#18242)
Why I did it
redis_chassis process fails to start in the database-chassis on the supervisor card.

How I did it
The redis and redis_chassis processes in supervisor.conf has been modified to start with 'redis' as user. The modification only added redis and redis group for database containers except database-chassis container. This commit adds code to the docker-database-init.sh to add redis and redis group for the database-chassis to address this issue.

How to verify it
Booting the image on Supervisor. And verify the database-chassis container should be in UP state, and the database-chassis.service is in active(running) state

admin@ixre-cpm-chassis15:~$ docker ps -a
CONTAINER ID   IMAGE                             COMMAND                  CREATED        STATUS        PORTS     NAMES
9691c6111e0f   docker-fpm-frr:latest             "/usr/bin/docker_ini?"   16 hours ago   Up 16 hours             bgp5
...
c7c7159d4e0c   docker-database:latest            "/usr/local/bin/dock?"   31 hours ago   Up 16 hours             database-chassis


admin@ixre-cpm-chassis15:~$ sudo systemctl status database-chassis
? database-chassis.service - database-chassis container
     Loaded: loaded (/lib/systemd/system/database-chassis.service; enabled-runtime; preset: enabled)
     Active: active (running) since Sun 2024-03-03 04:43:12 UTC; 16h ago
    Process: 1640 ExecStartPre=/usr/bin/database.sh start chassisdb (code=exited, status=0/SUCCESS)
   Main PID: 1938 (database.sh)
      Tasks: 10 (limit: 38307)
     Memory: 49.7M
     CGroup: /system.slice/database-chassis.service
             ??1938 /bin/bash /usr/bin/database.sh wait chassisdb
             ??1940 docker wait database-chassis

Notice: journal has been rotated since unit was started, output may be incomplete.
admin@ixre-cpm-chassis15:~$ 

Signed-off-by: mlok <marty.lok@nokia.com>
2024-03-22 14:20:12 -07:00
..
base_image_files [Monit] Deprecate the feature of monitoring the critical processes by Monit (#7676) 2021-06-04 10:16:53 -07:00
critical_processes.j2 [chassis] Fixed critical process not correct for database-chassis docker (#13445) 2023-01-20 10:21:48 -08:00
database_config.json.j2 [dpu]: Add DPU database service (#17161) 2023-11-17 09:10:03 -08:00
database_global.json.j2 [docker-databse]: Revise database_global schema for dpu (#17443) 2023-12-29 14:20:52 -08:00
docker-database-init.sh [Supervisor][datbase-chassis] Fixthe failure of starting redis_chassis in database-chassis on Supervisor (#18242) 2024-03-22 14:20:12 -07:00
Dockerfile.j2 Update the database, teamd, and radv containers to Bookworm (#18108) 2024-02-21 13:22:07 -08:00
flush_unused_database Migrate flush_unused_database from py-redis to sonic-swss-common (#15511) 2023-06-29 15:08:54 -07:00
supervisord.conf.j2 Update the database, teamd, and radv containers to Bookworm (#18108) 2024-02-21 13:22:07 -08:00