Skip to content

Commit 9baf54a

Browse files
committed
reorganize component dictionary
1 parent 20407c7 commit 9baf54a

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

files/image_config/warmboot-finalizer/finalize-warmboot.sh

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ VERBOSE=no
44

55
# Define components that needs to reconcile during warm
66
# boot:
7-
# The key would be the component name that would
8-
# reconcile.
9-
# The value is the name of the service that the
10-
# component belongs to.
7+
# The key is the name of the service that the components belong to.
8+
# The value is list of component names that will reconcile.
119
declare -A RECONCILE_COMPONENTS=( \
12-
["orchagent"]="swss" \
13-
["neighsyncd"]="swss" \
14-
["bgp"]="bgp" \
15-
["natsyncd"]="nat" \
10+
["swss"]="orchagent neighsyncd" \
11+
["bgp"]="bgp" \
12+
["nat"]="natsyncd" \
1613
)
1714
EXP_STATE="reconciled"
1815

@@ -30,13 +27,13 @@ function debug()
3027

3128
function get_component_list()
3229
{
33-
CP_LIST=${!RECONCILE_COMPONENTS[@]}
30+
SVC_LIST=${!RECONCILE_COMPONENTS[@]}
3431
COMPONENT_LIST=""
35-
for cp in ${CP_LIST}; do
36-
service=${RECONCILE_COMPONENTS[${cp}]}
32+
for service in ${SVC_LIST}; do
33+
components=${RECONCILE_COMPONENTS[${service}]}
3734
status=$(sonic-db-cli CONFIG_DB HGET "FEATURE|${service}" state)
3835
if [[ x"${status}" == x"enabled" || x"${status}" == x"always_enabled" ]]; then
39-
COMPONENT_LIST="${COMPONENT_LIST} ${cp}"
36+
COMPONENT_LIST="${COMPONENT_LIST} ${components}"
4037
fi
4138
done
4239
}

0 commit comments

Comments
 (0)