Skip to content

ENT-13720: Install smtp-sink in valgrind check container#6136

Merged
larsewi merged 1 commit into
cfengine:masterfrom
larsewi:valgrind-smtp-sink
May 19, 2026
Merged

ENT-13720: Install smtp-sink in valgrind check container#6136
larsewi merged 1 commit into
cfengine:masterfrom
larsewi:valgrind-smtp-sink

Conversation

@larsewi
Copy link
Copy Markdown
Contributor

@larsewi larsewi commented May 19, 2026

cf-execd's MailResult connects to localhost:25 whenever a cf-agent run produces output. The valgrind check container had no SMTP listener, so cf-execd logged error: Mail report: couldn't connect to host 'localhost' and check_daemon_output caught it as a test failure. This was timing-dependent — it only surfaced when cf-agent completed a run within the test window.

Install postfix in the container for smtp-sink, and run it on 127.0.0.1:25 before the daemons start. cf-execd's mail code path now gets exercised under valgrind instead of silently failing on connect.

Build Status

cf-execd's MailResult connects to localhost:25 whenever a cf-agent run
produces output. Without an SMTP listener it logs
"error: Mail report: couldn't connect to host 'localhost'" which
check_daemon_output then catches as a test failure (flaky depending on
whether cf-agent completes a run within the test window).

Install postfix in the container for smtp-sink and run it on
127.0.0.1:25 before the daemons start. cf-execd's mail code path now
gets exercised under valgrind instead of silently aborted.

Ticket: ENT-13720
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
@larsewi larsewi merged commit 165a531 into cfengine:master May 19, 2026
39 of 40 checks passed
@larsewi larsewi deleted the valgrind-smtp-sink branch May 19, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants