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

[service dependent] describe non-warm-reboot dependency outside systemd #3311

Merged
merged 4 commits into from
Aug 8, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion files/build_templates/teamd.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ ExecStart=/usr/bin/{{docker_container_name}}.sh wait
ExecStop=/usr/bin/{{docker_container_name}}.sh stop

[Install]
WantedBy=multi-user.target swss.service
WantedBy=multi-user.target
7 changes: 7 additions & 0 deletions files/scripts/swss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

SERVICE="swss"
PEER="syncd"
DEPENDENT="teamd"
DEBUGLOG="/tmp/swss-syncd-debug.log"
LOCKFILE="/tmp/swss-syncd-lock"

Expand Down Expand Up @@ -83,6 +84,9 @@ startPeerService() {

if [[ x"$WARM_BOOT" != x"true" ]]; then
/bin/systemctl start ${PEER}
for dep in ${DEPENDENT}; do
yxieca marked this conversation as resolved.
Show resolved Hide resolved
/bin/systemctl start ${dep}
done
fi
}

Expand Down Expand Up @@ -138,6 +142,9 @@ stop() {
# if warm start enabled or peer lock exists, don't stop peer service docker
if [[ x"$WARM_BOOT" != x"true" ]]; then
/bin/systemctl stop ${PEER}
for dep in ${DEPENDENT}; do
/bin/systemctl stop ${dep}
yxieca marked this conversation as resolved.
Show resolved Hide resolved
done
fi
}

Expand Down