Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[voq][chassis][dhcp_relay] swss.sh try to start the dhcp_relay service although it is masked #18829

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion files/scripts/swss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,17 @@ function clean_up_chassis_db_tables()

}

is_feature_enabled()
{
s=$1
service=${s%@*}
state=$(sonic-db-cli CONFIG_DB hget "FEATURE|${service}" "state")
if [[ $state == "enabled" ]]; then
echo "true"
else
echo "false"
fi
}
start_peer_and_dependent_services() {
check_warm_boot

Expand All @@ -254,7 +265,14 @@ start_peer_and_dependent_services() {
fi
done
for dep in ${DEPENDENT}; do
/bin/systemctl start ${dep}
if [[ $dep == "dhcp_relay" ]]; then
state=$(is_feature_enabled $dep)
if [[ $state == "true" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After starting the service, should we enable the feature flag for this service?

/bin/systemctl start ${dep}
fi
else
/bin/systemctl start ${dep}
fi
done
for dep in ${MULTI_INST_DEPENDENT}; do
if [[ ! -z $DEV ]]; then
Expand Down
Loading