Update config-gate systemd service
Add error handling to wait_for_config_init.sh Handling the following error: 2025-09-02T07:03:32.706 controller-0 \ wait_for_config_init.sh[22308]: info \ Failed to get properties: Message recipient \ disconnected from message bus without replying 2025-09-02T07:03:32.707 controller-0 systemd[1]: \ info Finished General StarlingX config gate. Test plan: PASS - AIO-SX: iso install + config PASS - AIO-DX: iso install + config PASS - Standard with worker and storage node install + config PASS - DC system controller: iso install + config Closes-Bug: 2122164 Change-Id: Ic05b1f6805b1a798343b48238339056d0c95effe Signed-off-by: Kyale, Eliud <Eliud.Kyale@windriver.com>
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
|
||||
SERVICE=
|
||||
|
||||
script_name=$(basename "$0")
|
||||
|
||||
case $nodetype in
|
||||
controller)
|
||||
SERVICE=controllerconfig.service
|
||||
@@ -26,10 +28,22 @@ case $nodetype in
|
||||
esac
|
||||
|
||||
while :; do
|
||||
systemctl status $SERVICE |grep -q running
|
||||
if [ $? -ne 0 ]; then
|
||||
status="$(systemctl status ${SERVICE} 2>&1)"
|
||||
# verify systemctl status response format
|
||||
# <service> - <Description>
|
||||
# ...
|
||||
if echo "${status}" | grep -q "${SERVICE}"
|
||||
then
|
||||
if ! echo "${status}" | grep -q running
|
||||
then
|
||||
msg="${SERVICE} has finished running."
|
||||
logger -t "${script_name}" "${msg}"
|
||||
echo "${script_name} - ${msg}"
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
logger -t "${script_name}" "${status}"
|
||||
echo "${script_name} - ${status}"
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user