Closed dcermak closed 2 months ago
LGTM.
(is it related to the SP5 containers (where ps command was dropped some time back?)
Priyanka Saggu @.***> writes:
LGTM.
(is it related to the SP5 containers (where ps command was dropped some time back?)
Yes, the pipeline started failing tonight as the container image no longer contains procps in 15SP6
Priyanka Saggu @.***> writes: LGTM. (is it related to the SP5 containers (where ps command was dropped some time back?) Yes, the pipeline started failing tonight as the container image no longer contains procps in 15SP6
Thanks Dan. One more follow up question – where was it flagged? (openQA pipelines?)
Dirk Mueller @.***> writes:
@dirkmueller commented on this pull request.
"""check if Postfix service is running inside the container"""
verify PID 1 process is ENTRYPOINT -
/bin/bash /entrypoint/entrypoint.sh postfix start
- assert (
- "/usr/lib/postfix/bin//master -i"
- in auto_container.connection.check_output(
- "ps -eo pid,cmd | grep '^ 1 ' | sed 's/^ 1 //'"
- )
- )
verify PID 1 process is ENTRYPOINT:
/bin/bash /entrypoint/entrypoint.sh postfix start
we don't have ps in the container, so read /proc/1/cmdline instead, it
contains the binary and its arguments split by \x00
- cmdline: bytes = auto_container.connection.file("/proc/1/cmdline").content
- proc_1_cmd = cmdline.replace(bytes((0,)), " ".encode()).decode().strip()
this looks brutally complicated... :/
I've simplified the code as much as possible
This works around the container not shipping ps
[CI:TOXENVS] postfix
CC @Priyankasaggu11929