Migrate SONiC from Redis to Valkey#6
Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Open
Migrate SONiC from Redis to Valkey#6devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Conversation
This commit migrates the SONiC buildimage codebase from Redis to Valkey. Valkey maintains Redis protocol compatibility, so the swsscommon library continues to work without changes. Changes include: - Update Docker Database Container (Dockerfile.j2, supervisord.conf.j2) - Replace redis-tools/redis-server with valkey-tools/valkey-server - Update configuration paths from /etc/redis/ to /etc/valkey/ - Update socket/pidfile paths from /var/run/redis/ to /var/run/valkey/ - Update Database Configuration (database_config.json.j2) - Rename instance 'redis' to 'valkey' - Rename instance 'redis_chassis' to 'valkey_chassis' - Rename instance 'redis_bmp' to 'valkey_bmp' - Rename instance 'remote_redis' to 'remote_valkey' - Update all socket paths accordingly - Update Virtual Switch Platform (database_config.json, Dockerfile.j2) - Apply same redis->valkey naming changes - Update configuration paths - Update P4 Platform (Dockerfile.j2) - Update configuration paths from /etc/redis/ to /etc/valkey/ - Update Database Initialization Script (docker-database-init.sh) - Rename REDIS_DIR to VALKEY_DIR - Update all path references from redis to valkey - Update user ownership from redis:redis to valkey:valkey - Update Utility Scripts (flush_unused_database) - Update error message to reference Valkey instead of Redis Co-Authored-By: Arthur Poon <arthur.poon@windsurf.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why I did it
Migrate SONiC's database infrastructure from Redis to Valkey. Valkey is a Redis-compatible fork that maintains protocol compatibility, allowing the swsscommon library to continue working without changes.
Work item tracking
How I did it
Updated all Redis references to Valkey across the following components:
Core Infrastructure:
dockers/docker-database/Dockerfile.j2: Changed package installation from redis-tools/redis-server to valkey-tools/valkey-server, updated config path to /etc/valkey/valkey.confdockers/docker-database/supervisord.conf.j2: Updated server binary, config paths, socket paths, pidfile paths, and user from redis to valkeydockers/docker-database/database_config.json.j2: Renamed all instances (redis→valkey, redis_chassis→valkey_chassis, redis_bmp→valkey_bmp, remote_redis→remote_valkey) and updated socket pathsdockers/docker-database/docker-database-init.sh: Updated all directory paths and user ownership from redis to valkeyPlatform-Specific:
platform/vs/docker-sonic-vs/Dockerfile.j2: Updated package and config pathsplatform/vs/docker-sonic-vs/database_config.json: Updated instance names and socket pathsplatform/p4/docker-sonic-p4/Dockerfile.j2: Updated config pathUtility Scripts:
dockers/docker-database/flush_unused_database: Updated error messageHow to verify it
Human Review Checklist:
valkey-toolsandvalkey-serverpackages exist in Debian repositories with these exact namesvalkeyuser/group (required for chown commands)/etc/valkey/valkey.confexists and has compatible format with the sed commandsredisreferences that may need updatingWhich release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Migrate SONiC database infrastructure from Redis to Valkey for improved performance and community support.
Link to config_db schema for YANG module changes
N/A - No YANG model changes
A picture of a cute animal (not mandatory but encouraged)
Link to Devin run: https://cisco-demo.devinenterprise.com/sessions/d3987284456146bfb37715f4ed56312a
Requested by: Arthur Poon (arthur.poon@cognition.ai) / @arthurkkp-cog