mirror of
https://github.com/Telecominfraproject/ols-nos.git
synced 2025-11-27 11:44:06 +00:00
[systemlag] Lag id boundary set for system lag (#6488)
Signed-off-by: vedganes <vedavinayagam.ganesan@nokia.com> Changes for setting platfrom specific lag id boundary id in the chassis app db. The platfrom specific lag id boundaries are supplied via chassisdb.conf. The lag_id_start and lag_id_end boundary values sourced from this file are set in chassis app db which will be used by lag id allocator to allocate unique lag id in atomic fashion
This commit is contained in:
@@ -101,6 +101,19 @@ function preStartAction()
|
||||
updateSyslogConf
|
||||
}
|
||||
|
||||
{%- if docker_container_name == "database" %}
|
||||
|
||||
function setPlatformLagIdBoundaries()
|
||||
{
|
||||
CHASSIS_CONF=/usr/share/sonic/device/$PLATFORM/chassisdb.conf
|
||||
if [ -f "$CHASSIS_CONF" ]; then
|
||||
source $CHASSIS_CONF
|
||||
$SONIC_DB_CLI CHASSIS_APP_DB SET "SYSTEM_LAG_ID_START" "$lag_id_start"
|
||||
$SONIC_DB_CLI CHASSIS_APP_DB SET "SYSTEM_LAG_ID_END" "$lag_id_end"
|
||||
fi
|
||||
}
|
||||
{%- endif %}
|
||||
|
||||
function postStartAction()
|
||||
{
|
||||
{%- if docker_container_name == "database" %}
|
||||
@@ -162,6 +175,7 @@ function postStartAction()
|
||||
($(docker exec -i ${DOCKERNAME} $SONIC_DB_CLI CHASSIS_APP_DB PING | grep -c True) -gt 0) ]]; do
|
||||
sleep 1
|
||||
done
|
||||
setPlatformLagIdBoundaries
|
||||
REDIS_SOCK="/var/run/redis-chassis/redis_chassis.sock"
|
||||
fi
|
||||
chgrp -f redis $REDIS_SOCK && chmod -f 0760 $REDIS_SOCK
|
||||
|
||||
Reference in New Issue
Block a user