[swss/syncd] cold start syncd service in swss in attach method (#2639)
start() is called by service startPre method, which is blocking. Starting syncd service here is causing deadlock. attach() is called by service start method, which is non-blocking. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
This commit is contained in:
parent
e5b8302fee
commit
deab95cff6
@ -78,6 +78,14 @@ function clean_up_tables()
|
||||
end" 0
|
||||
}
|
||||
|
||||
startPeerService() {
|
||||
check_warm_boot
|
||||
|
||||
if [[ x"$WARM_BOOT" != x"true" ]]; then
|
||||
/bin/systemctl start ${PEER}
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
debug "Starting ${SERVICE} service..."
|
||||
|
||||
@ -105,13 +113,10 @@ start() {
|
||||
|
||||
# Unlock has to happen before reaching out to peer service
|
||||
unlock_service_state_change
|
||||
|
||||
if [[ x"$WARM_BOOT" != x"true" ]]; then
|
||||
/bin/systemctl start ${PEER}
|
||||
fi
|
||||
}
|
||||
|
||||
attach() {
|
||||
startPeerService
|
||||
/usr/bin/${SERVICE}.sh attach
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user