Skip to content

lnst/Common/Logs.py: reset export logger between set/unset_recipe#442

Merged
jtluka merged 1 commit into
LNST-project:masterfrom
jtluka:export-log-fix
May 13, 2026
Merged

lnst/Common/Logs.py: reset export logger between set/unset_recipe#442
jtluka merged 1 commit into
LNST-project:masterfrom
jtluka:export-log-fix

Conversation

@jtluka

@jtluka jtluka commented May 12, 2026

Copy link
Copy Markdown
Collaborator

Description

Without this the export_handler logger handler would append all recipes executed by a single Controller instance into a shared list.

The export_handler initialization/teardown is moved to set_recipe() and unset_recipe() methods to avoid that.

Tests

Tested locally with attached script: test-containers.py

uv run  ./test-containers.py

And then inspecting the log files with another script: dump-lrc-log.py

uv run ./dump-lrc-log.py /tmp/lnst_container_recipe1_run.lrc controller| less
uv run ./dump-lrc-log.py /tmp/lnst_container_recipe2_run.lrc controller| less

In the dumped logs, check for Summary of used Recipe parameters ... the second dump will include also run from previous recipe (ipv6 AND ipv4).

Reviews

@olichtne @enhaut @Axonis

@jtluka jtluka self-assigned this May 12, 2026
Comment thread lnst/Common/Logs.py Outdated
Comment thread lnst/Controller/Controller.py
Without this the export_handler logger handler would append all recipes
executed by a single Controller instance into a shared list.

The export_handler initialization/teardown is moved to set_recipe() and
unset_recipe() methods to avoid that.

Signed-off-by: Jan Tluka <jtluka@redhat.com>
@jtluka jtluka merged commit 3285994 into LNST-project:master May 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants