Accepting request 982592 from home:dancermak:auto_update:Tumbleweed
Add HEALTHCHECK OBS-URL: https://build.opensuse.org/request/show/982592 OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/pcp-image?expand=0&rev=3
This commit is contained in:
parent
8733532709
commit
eb8261143f
@ -29,17 +29,19 @@ LABEL com.suse.release-stage="beta"
|
||||
RUN set -euo pipefail; zypper -n in --no-recommends pcp hostname shadow gettext-runtime util-linux-systemd; zypper -n clean; rm -rf /var/log/*
|
||||
|
||||
|
||||
ENTRYPOINT ["/usr/bin/container-entrypoint"]
|
||||
ENTRYPOINT ["/usr/local/bin/container-entrypoint"]
|
||||
CMD ["/usr/lib/systemd/systemd"]
|
||||
|
||||
RUN set -euo pipefail; mkdir -p /usr/share/container-scripts/pcp; mkdir -p /etc/sysconfig
|
||||
COPY container-entrypoint /usr/bin/
|
||||
RUN set -euo pipefail; chmod +x /usr/bin/container-entrypoint
|
||||
COPY container-entrypoint healthcheck /usr/local/bin/
|
||||
RUN set -euo pipefail; chmod +x /usr/local/bin/container-entrypoint /usr/local/bin/healthcheck
|
||||
COPY pmproxy.conf.template 10-host_mount.conf.template /usr/share/container-scripts/pcp/
|
||||
COPY pmcd pmlogger /etc/sysconfig/
|
||||
|
||||
# This can be removed after the pcp dependency on sysconfig is removed
|
||||
RUN set -euo pipefail; systemctl disable wicked wickedd
|
||||
|
||||
HEALTHCHECK --start-period=30s --timeout=20s --interval=10s --retries=3 CMD /usr/local/bin/healthcheck
|
||||
|
||||
VOLUME ["/var/log/pcp/pmlogger"]
|
||||
EXPOSE 44321 44322 44323
|
||||
|
16
healthcheck
Normal file
16
healthcheck
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash -eu
|
||||
|
||||
ALL_PCP_SERVICES='pmcd,pmie,pmlogger,pmproxy'
|
||||
PCP_SERVICES=${PCP_SERVICES:-${ALL_PCP_SERVICES}}
|
||||
|
||||
failed=""
|
||||
for service in ${PCP_SERVICES//,/ }; do
|
||||
if ! systemctl is-active $service --quiet; then
|
||||
failed="$failed $service"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -z "$failed" ]; then
|
||||
echo "$0: services not active:$failed"
|
||||
exit 1
|
||||
fi
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 14 10:12:15 UTC 2022 - Dan Čermák <dcermak@suse.com>
|
||||
|
||||
- Add HEALTHCHECK
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 3 09:03:29 UTC 2022 - Dan Čermák <dcermak@suse.com>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user