[docker-database-init.sh]: Fix wrong creating of database_global.json in multi asic platform (#17221)
Fix bug: #17161 (comment) multi-asic platforms it will never go to the else part as DATABASE_TYPE is always "" Microsoft ADO (number only): 25072889 Move the checker NAMESPACE_ID == "" back Signed-off-by: Ze Gan <ganze718@gmail.com>
This commit is contained in:
parent
ee38e2447d
commit
a87cddc6c9
@ -70,8 +70,8 @@ if [[ $DATABASE_TYPE == "chassisdb" ]]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# copy/generate the database_global.json file if this is global database service in multi asic platform.
|
# copy/generate the database_global.json file if this is global database service in multi asic/smart switch platform.
|
||||||
if [[ $DATABASE_TYPE == "" ]] && [[ $NAMESPACE_COUNT -gt 1 || $NUM_DPU -gt 1 ]]
|
if [[ $NAMESPACE_ID == "" && $DATABASE_TYPE == "" && ( $NAMESPACE_COUNT -gt 1 || $NUM_DPU -gt 1) ]]
|
||||||
then
|
then
|
||||||
if [ -f /etc/sonic/database_global.json ]; then
|
if [ -f /etc/sonic/database_global.json ]; then
|
||||||
cp /etc/sonic/database_global.json $REDIS_DIR/sonic-db/database_global.json
|
cp /etc/sonic/database_global.json $REDIS_DIR/sonic-db/database_global.json
|
||||||
|
Loading…
Reference in New Issue
Block a user