Skip to content

Commit

Permalink
Remove waiting loop for piler-app to be active in configure-module/80…
Browse files Browse the repository at this point in the history
…start_services
  • Loading branch information
stephdl committed Apr 24, 2024
1 parent 97fba9c commit 6ae1804
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
10 changes: 0 additions & 10 deletions imageroot/actions/configure-module/80start_services
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,3 @@

systemctl --user enable piler.service
systemctl --user restart piler.service

# before to send the action add-relay-rule or aler-relay-rule we need to wait until the service is active
# does not work as expected in systemd post startup
for ((i = 0; i < 60; i++)); do
if podman exec piler-app /etc/init.d/rc.piler status | grep 'piler is running'; then
break
fi
echo "Waiting for piler-app to be active..."
sleep 1
done
1 change: 1 addition & 0 deletions imageroot/systemd/user/piler-app.service
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ ExecStart=/usr/bin/podman run --conmon-pidfile %t/piler-app.pid \
--env PILER_HOSTNAME=${TRAEFIK_HOST} \
--env MEMCACHED_HOST=127.0.0.1 \
${PILER_IMAGE}
ExecStartPost=/usr/bin/bash -c "while ! podman exec piler-app /etc/init.d/rc.piler status | grep 'piler is running' ; do sleep 5 && echo "Wait after piler-app...." ; done"
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/piler-app.ctr-id -t 10
ExecReload=/usr/local/bin/runagent expand-configuration
ExecReload=/usr/bin/podman kill -s HUP piler-app
Expand Down

0 comments on commit 6ae1804

Please sign in to comment.